mgcarpathian_np_step_mnt (Step mountain size noise) noise_params 0, 8, (509, 509, 509), 2590, 6, 0.6, 2.0
# 3D noise for mountain overhangs, cliffs, etc. Usually small variations.
-mgcarpathian_np_mnt_var (Mountain variation noise) noise_params 0, 1, (499, 499, 499), 2490, 5, 0.6, 2.0
+mgcarpathian_np_mnt_var (Mountain variation noise) noise_params 0, 1, (499, 499, 499), 2490, 5, 0.55, 2.0
# First of 2 3D noises that together define tunnels.
mgcarpathian_np_cave1 (Cave1 noise) noise_params 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0
# 3D noise for mountain overhangs, cliffs, etc. Usually small variations.
# type: noise_params
-# mgcarpathian_np_mnt_var = 0, 1, (499, 499, 499), 2490, 5, 0.6, 2.0
+# mgcarpathian_np_mnt_var = 0, 1, (499, 499, 499), 2490, 5, 0.55, 2.0
# First of 2 3D noises that together define tunnels.
# type: noise_params
np_hills = NoiseParams(0, 3, v3f(257, 257, 257), 6604, 6, 0.5, 2.0);
np_ridge_mnt = NoiseParams(0, 12, v3f(743, 743, 743), 5520, 6, 0.7, 2.0);
np_step_mnt = NoiseParams(0, 8, v3f(509, 509, 509), 2590, 6, 0.6, 2.0);
- np_mnt_var = NoiseParams(0, 1, v3f(499, 499, 499), 2490, 5, 0.6, 2.0);
+ np_mnt_var = NoiseParams(0, 1, v3f(499, 499, 499), 2490, 5, 0.55, 2.0);
np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0);
np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0);
np_cavern = NoiseParams(0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0);
}
// Steps function
-float MapgenCarpathian::getSteps(float noise1, float noise2)
+float MapgenCarpathian::getSteps(float noise)
{
- float w = fabs(noise2);
- float k = floor(noise1 / w);
- float f = (noise1 - k * w) / w;
+ float w = 0.5f;
+ float k = floor(noise / w);
+ float f = (noise - k * w) / w;
float s = std::fmin(2.f * f, 1.f);
return (k + s) * w;
}
float ridged_mountains = pow(rter, 3.f) * ridge_mnt;
// Step (terraced) mountains
- float step_mnt = hilliness * getSteps(n_step_mnt, fabs(mnt_var));
+ float step_mnt = hilliness * getSteps(n_step_mnt);
float step_mountains = pow(ster, 3.f) * step_mnt;
// Final terrain level
// Step (terraced) mountains
float ster = noise_step_terrain->result[index2d];
float n_step_mnt = noise_step_mnt->result[index2d];
- float step_mnt = hilliness * getSteps(n_step_mnt, fabs(mnt_var));
+ float step_mnt = hilliness * getSteps(n_step_mnt);
float step_mountains = pow(fabs(ster), 3.f) * step_mnt;
// Final terrain level