Page 2 of 2
Re: How to add seed to Perlin noise?
Posted: Mon Aug 29, 2016 3:07 pm
by Rishavs
Hmmm...
I am still not very happy with the seeding. I generally end up with 5-6 similar shapes with minor differing details.
Still, this is something I can optimize later. I am in a good place right now.
This is my hexagon map with heightmap.
- hexmap.png (49.21 KiB) Viewed 2962 times
Re: How to add seed to Perlin noise?
Posted: Mon Aug 29, 2016 4:45 pm
by pgimeno
Maybe taking different sections of the "Perlin map"?
If your map is, say, 20x20, you can use the intervals [20*seedX, 20*seedX+20) and [20*seedY, 20*seedY+20) for some constants seedX, seedY (or maybe 30 instead of 20, to allow for some separation between maps).
Re: How to add seed to Perlin noise?
Posted: Mon Aug 29, 2016 5:35 pm
by raidho36
Yep, that is what you're supposed to do to get different snapshot of noise here. You need to sample different coordinates, one thing you could do is just offset the whole thing.
Re: How to add seed to Perlin noise?
Posted: Mon Aug 29, 2016 7:11 pm
by Rishavs
very interesting idea. Will try it tomorrow and report back.
Thanks!!
Re: How to add seed to Perlin noise?
Posted: Tue Aug 30, 2016 4:17 pm
by Rishavs
taking your advise i changes my noise to :
Code: Select all
local elv_merged_noise =
1.00 * love.math.noise ( 1 * (dx + seed), 1 * (dy + seed))
+ 0.50 * love.math.noise ( 2 * (dx + seed), 2 * (dy + seed))
+ 0.25 * love.math.noise ( 4 * (dx + seed), 4 * (dy + seed))
+ 0.13 * love.math.noise ( 8 * (dx + seed), 8 * (dy + seed))
+ 0.06 * love.math.noise ( 16 * (dx + seed), 16 * (dy + seed))
+ 0.03 * love.math.noise ( 32 * (dx + seed), 32 * (dy + seed))
+ 0.02 * love.math.noise ( 64 * (dx + seed), 64 * (dy + seed))
+ 0.01 * love.math.noise (128 * (dx + seed), 128 * (dy + seed))
and now i am getting completely diverse shapes. Thanks everyone.