Reputation: 181
I'm currently in the process of coding a procedural terrain generator for a game. For that purpose, I divide my world into chunks of equal size and generate them one by one as the player strolls along. So far, nothing special.
Now, I specifically don't want the world to be persistent, i.e. if a chunk gets unloaded (maybe because the player moved too far away) and later loaded again, it should not be the same as before.
From my understanding, implicit approaches like treating 3D Simplex Noise as a density function input for Marching Cubes don't suit my problem. That is because I would need to reseed the generator to obtain different return values for the same point in space, leading to discontinuities along chunk borders.
I also looked into Midpoint Displacement / Diamond-Square. By seeding each chunk's heightmap with values from the borders of adjacent chunks and randomizing the chunk corners that don't have any other chunks nearby, I was able to generate a tileable terrain that exhibits the desired behavior. Still, the results look rather dull. Specifically, since this method relies on heightmaps, it lacks overhangs and the like. Moreover, even with the corner randomization, terrain features tend to be confined to small areas, i.e. there are no multiple-chunk hills or similar landmarks.
Now I was wondering if there are other approaches to this that I haven't heard of/thought about yet. Any help is highly appreciated! :)
Cheers!
Upvotes: -1
Views: 981
Reputation: 3604
This video explains how the team at Microsoft implemented the terrain generation in modern Minecraft to be much more interesting.
https://www.youtube.com/watch?v=ob3VwY4JyzE
I believe with this information anyone could create some form of this algorithm. The basics of it boils down to overlapping cos/sin functions that act as interference to each other. Then other filters / layers are added onto that. How they decide where a BIOME goes is also really interesting.
Hope this is helpful to anyone that finds this page.
Upvotes: 0
Reputation: 462
Post process!
After you do the heightmaps, run back through adding features.
This is how Minecraft does it to get the various caverns and cliff overhangs.
Upvotes: 2