Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this questionDoes any have an algorithm for creating infinite terrain/landscape/surface?
Constraints
- The algorithm should start by a random seed
- The algorithm should be one to one, (the same seed gives the same result)
- Other input parameter are allowed as long as 2 is fulfilled
- The algorithm may output a 2d map
- It suppose to create only surface with varying height (mountains), not three, ocean etc.
- I’m looking for an algorithm and not a software.
- It should be fast
None of other related questions in here answers this question. If anything is unclear please let me know!
I would suggest something like Perlin noise, I've used it before for something like you're describing above, and it fits the bill. Check out this Example and you can see the sort of output you would expect from the noise generator.Here is a link to algorithm p-code too.
http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
As others already said perlin noise is a possibility. Gpugems 3 has a nice capter about procedual generation using (IIRC, it has been some time since I read this) 3D Perlin noise.
Of course there are other methods too, e.g. Vterrain.org might be worth a look.
精彩评论