
diff --git a/mapgen.lua b/mapgen.lua
index ac5dcb0..14fd808 100644
--- a/mapgen.lua
+++ b/mapgen.lua
@@ -292,8 +292,8 @@ function vmg.generate(minp, maxp, seed)
v2 = math.abs(v2) - river_size -- v2 represents the distance from the river, in arbitrary units.
local river = v2 < 0 -- the rivers are placed where v2 is negative, so where the original v2 value is close to zero.
local valleys = v3 * (1 - math.exp(- (v2 / v4) ^ 2)) -- use the curve of the function 1−exp(−(x/a)²) to modelise valleys. Making "a" varying 0 < a ≤ 1 changes the shape of the valleys. Try it with a geometry software ! (here x = v2 and a = v4). This variable represents the height of the terrain, from the rivers.
- local mountain_ground = base_ground + valleys -- approximate height of the terrain at this point (could be slightly modified by the 3D noise #6)
- local slopes = v5 * valleys -- This variable represents the maximal influence of the noise #6 on the elevation. v5 is the rate of the height from rivers (variable "valleys") that is concerned.
+ local mountain_ground = base_ground
+ local slopes = 0
if river then
local depth = river_depth * math.sqrt(1 - (v2 / river_size + 1) ^ 2) -- use the curve of the function −sqrt(1−x²) which modelizes a circle.duane wrote:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
diff --git a/mapgen.lua b/mapgen.lua
index ac5dcb0..14fd808 100644
--- a/mapgen.lua
+++ b/mapgen.lua
@@ -292,8 +292,8 @@ function vmg.generate(minp, maxp, seed)
v2 = math.abs(v2) - river_size -- v2 represents the distance from the river, in arbitrary units.
local river = v2 < 0 -- the rivers are placed where v2 is negative, so where the original v2 value is close to zero.
local valleys = v3 * (1 - math.exp(- (v2 / v4) ^ 2)) -- use the curve of the function 1−exp(−(x/a)²) to modelise valleys. Making "a" varying 0 < a ≤ 1 changes the shape of the valleys. Try it with a geometry software ! (here x = v2 and a = v4). This variable represents the height of the terrain, from the rivers.
- local mountain_ground = base_ground + valleys -- approximate height of the terrain at this point (could be slightly modified by the 3D noise #6)
- local slopes = v5 * valleys -- This variable represents the maximal influence of the noise #6 on the elevation. v5 is the rate of the height from rivers (variable "valleys") that is concerned.
+ local mountain_ground = base_ground
+ local slopes = 0
if river then
local depth = river_depth * math.sqrt(1 - (v2 / river_size + 1) ^ 2) -- use the curve of the function −sqrt(1−x²) which modelizes a circle.
vmg_noise_2 = 0, 1, (512,512,512), -6050, 5, 0.6, 2
vmg_noise_3 = 3, 2, (512,512,512), -1914, 1, 1, 2Gael de Sailly wrote:In fact you've simply disabled valleys…
A cleaner solution : change noises 2 and 3 in minetest.conf. It don't disable valleys, it just makes it smoother and larger.Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
vmg_noise_2 = 0, 1, (512,512,512), -6050, 5, 0.6, 2
vmg_noise_3 = 3, 2, (512,512,512), -1914, 1, 1, 2

duane wrote:That produces gentler terrain as well as making the rivers larger and farther apart, which might be an advantage. It also tends to make larger forests and plains. (Same map seed in both pics.)
Users browsing this forum: Bing [Bot] and 9 guests