I am trying some terrain generation using Redblob games articles as ref.
For Perlin noise almost all resources on the net have some form of seed to change the noise output.
However the inbuilt love noise doesnt allows me to add a seed in it.
How can i add a seed value to change the noise output?
I tried adding a seed as a 3rd dimension but that made my heightmap very fuzzy.
I have tried noise (freq/seed * x, freq/seed * y). But that completely messes up my map(as i first convert the seed into a decimal between 0-1)
Code: Select all
local merged_noise =
1 * love.math.noise (1 * seed * nx, 1 * seed * ny)
+ 0.5 * love.math.noise (2 * seed * nx, 2 * seed * ny)
+ 0.25 * love.math.noise (4 * seed * nx, 4 * seed * ny)
+ 0.13 * love.math.noise (8 * seed * nx, 8 * seed * ny)
+ 0.06 * love.math.noise (16 * seed * nx, 16 * seed * ny)
+ 0.03 * love.math.noise (32 * seed * nx, 32 * seed * ny)
How do you do it?
This is how redblob games ad the seed, but only because the lib allows it.
I'd love to get my output as similar to his as possible.
Code: Select all
var rng1 = PM_PRNG.create(seed1);
var rng2 = PM_PRNG.create(seed2);
var gen1 = new SimplexNoise(rng1.nextDouble.bind(rng1));
var gen2 = new SimplexNoise(rng2.nextDouble.bind(rng2));