duane wrote:Ivà wrote:As far as I know, gcc-4.8 throw the errors above but gcc-4.9 is ok. I don't know why anyway, sorry.
The ubuntus are using 5.2.1. Even my Debian stable is up to 4.9.2. If anyone is still using 4.8, they might want to consider upgrading.
Ivà wrote:Ubuntu LTS and Linux Mint are still on 4.8.2. You must install explicitly the gcc-4.9-base package to get the 4.9.1 version.
Gael de Sailly wrote:What have you changed precisely ? (just to know, you can merge it in the core anyway :) )
float MapgenValleys::baseGroundFromNoise(s16 x, s16 z, float valley_depth, float terrain_height, float *rivers, float valley_profile, float inter_valley_slope, float *valley, float inter_valley_fill, float cliffs, float corr)
{
// The square function changes the behaviour of this noise:
// very often small, and sometimes very high.
float valley_d = pow(valley_depth, 2);
// valley_d is here because terrain is generally higher where valleys
// are deep (mountains). base represents the height of the
// rivers, most of the surface is above.
float base = terrain_height + valley_d;
// "river" represents the distance from the river, in arbitrary units.
float river = fabs(*rivers) - river_size;
*rivers = -31000;
// Use the curve of the function 1−exp(−(x/a)²) to model valleys.
// Making "a" vary (0 < a ≤ 1) changes the shape of the valleys.
// Try it with a geometry software !
// (here x = "river" and a = valley_profile).
// "valley" represents the height of the terrain, from the rivers.
*valley = valley_d * (1 - exp(- pow(river / valley_profile, 2)));
// approximate height of the terrain at this point
float mount = base + *valley;
float slope = *valley * inter_valley_slope;
// Rivers are placed where "river" is negative, so where the original
// noise value is close to zero.
if (river < 0) {
// Use the the function −sqrt(1−x²) which models a circle.
float depth = (river_depth * sqrt(1 - pow((river / river_size + 1), 2))) + 1;
*rivers = base;
// base - depth : height of the bottom of the river
// water_level - 2 : don't make rivers below 2 nodes under the surface
mount = fmin(fmax(base - depth, water_level - 2), mount);
// Slope has no influence on rivers.
slope = 0;
}
// The penultimate step builds up the heights, but we reduce it
// occasionally to create cliffs.
float delta = sin(inter_valley_fill) * slope;
if (delta != 0) {
if ((spflags & MG_VALLEYS_CLIFFS) && cliffs < 0.2)
mount += delta;
else
mount += delta * 0.66;
// Use yet another noise to make the mountains look more rugged.
if ((spflags & MG_VALLEYS_RUGGED) && mount > water_level && fabs(inter_valley_slope * inter_valley_fill) < 0.3)
mount += (delta / fabs(delta)) * pow(fabs(delta), 0.5) * fabs(sin(corr));
}
return mount;
}kaadmy wrote:How are villages done for the terrain?
duane wrote:I haven't given up on getting Valleys C into the codebase, but it's still proving to be a challenge. Here are some screenshots of my latest attempts.
sofar wrote:Just pulled your branch and noticed:
seed: 17472738859635311922
- spawn was quite deep under ground. I'm assuming you haven't paid attention to the spawn position yet.
- floating islands at y+=128, lots of them, clearly disjoint but related to the nearby high topography
- some cut-off trees (topside) suggesting chunks didn't properly finish generating
- lack of flat plains, could just be the seed (I travelled 4km or so +/-)
- could use some more water lilies in some of the near-water biomes, they're really quite rare as well
other than that, appears to work well and fast!
duane wrote:Make sure you're using the valleys_c branch. I'm going to delete the merge branch, just to avoid confusion. I haven't had any spawn problems since I updated the *AtPoint functions a few hours ago, but I'll check it.
The floating islands are there in the original lua too (in the exact same places). If there's a way of getting rid of them without getting rid of the nice mountains, I don't know it. Of course that's what I did with the fast flag option, but it lacks the character of the original
paramat wrote:Don't bother with the fast flag, if this 3D terrain noise is coded correctly it won't have much impact on mapgen speed, also the surface terrain should be faithful to the lua version and be interesting, however i agree the c++ version needs simple caves using 2 3D noises instead of 5. Am i right in thinking the current c++ cave code is your own duane? it looks fine to me.
Also, the c++ version should perhaps have a larger scale river noise than the original (noise 2 has spread 256 and 5 octaves, this creates small river systems with small river loops), however that can be tuned later when we set the default noise parameters.
blert2112 wrote:Using the C mapgen... How can I mellow out the terrain some? It's a bit too mountainous for my liking and I would like some flatter areas. Going to play with the noises a bit and see what happens in the mean time.
blert2112 wrote:BTW, I still get Lua OOM crashes a plenty even with just the helper mod installed. ... Yes, yes... it's LuaJit's problem, well there are ways around that but no one seems to care too much. (Sorry, ranting) Anyway, I recompiled without LuaJit so we shall see if that helps.
paramat wrote:>i'm busy but will review the PR as soon as possible.
Gael de Sailly wrote:I've not found the time to change plants parameters. ... Is there anyone that can do it?
duane wrote:I've started a project based on the Valleys Mapgen master which puts the original's soil types and vegetation into the Valleys C++ mapgen (using most of the same code and encountering all of the same problems). You can download the zip here.
It automatically selects Valleys C++ as the mapgen, so you obviously have to have compiled the C++ code here. It looks very familiar, but there are still problems with the beaches. It's fairly slow on my machine. I'd be interested to know how it works for others.
blert2112 wrote:So, what is the difference between this one and the 'valleys_c' helper mod?
blert2112 wrote:Darkage is an optional dependency... If you use my fork of Darkage (the 'reg_ore-FIX' branch) you can speed it up a bit as I have converted it to register_ore (type 'sheet')
Nathan.S wrote:Flowers seem to be very rare in my worlds with this mapgen, I looked at the code for the flowers and it looks like they are being placed as mgv6 decorations. I know very little about mapgen, is there a version of mgv7 decorations that I can change/add to the code so I'll get flowers back?
Users browsing this forum: No registered users and 21 guests