Closed masonmahaffey closed 6 years ago
If you would like to see an example https://voxelverse.io/g/s/cooltester1/testPerlinNoise . In the world editing menu you can mess with the xyz lengths to see examples.
Although technically that is simplex noise which is supposedly an updated version of perlin noise with a bit more flexibility.
Excellent. I've been reading about this a lot and am going to try to implement it.
@terrac Is there a repository for voxelverse?
Sorry, no respository. I'd suggest looking at https://github.com/andyhall/noa-testbed/blob/master/lib/worldgen_worker.js for the basics of how to implement it.
Thanks for the answers @terrac!
@mason0958 The demo Terry linked combines a couple of things. First it samples 2D noise to generate a height map, and then it samples a different set of 3D noise to decide where clouds are. Then within certain ranges it also decides whether to generate trees using a hash.
In all three cases the noise and hash functions are just ways of getting predictable random numbers (noise functions give you numbers that change smoothly, hash functions give numbers that change unpredictably). The "predictable" is the key - you can't really have anything truly random in world generation, because voxels at the edge of each chunk will get generated more than once (once for the chunk they're in and once for the chunk they border), and the values need to be the same each time.
Excellent! I can't wait to look at the code. I've been reading a lot how this works and it's pretty neat.
@andyhall Just out of curiosity, have you used perlin noise before for procedural world generation?