Box Based 3D terrain generation algorthms? (procedural generation)
I have been looking at this game called Minecraft and was intrigued by how it can dynamically generate random maps that look and feel right. What types of algorithms are used to generate开发者_开发技巧 terrains based on cubes like this?
Thanks
Perlin noise usually works really nicely.
Its also worth looking into midpoint dispacement (or the diamond square algorithm)
Alredy passed this step after playing minecraft..;) http://madeinsoviets.net/index.php?option=com_content&view=article&id=7&Itemid=5 You can use usual hill alghorithm, then represent each height as a cube. Other parts of landscape use other algorithms (trees, caves and so on).. You need to prepare yourself to write very fast rendering engine - JME3 failed;( (maybe becouse i don't use it correctly). p.s. i hear somewhere that minecraft utilizes voxel based data system.. - this is whole another story... - "Sparse voxel octree" in wiki (cannot use > 1 hyperlink)
http://codeflow.org/entries/2010/dec/09/minecraft-like-rendering-experiments-in-opengl-4/
I found this great walkthrough of a Minecraft-like OpenGL 4 rendering engine (made as an experiment) which really sums up some of the things you're asking about. Even though he is generating another kind of terrain (a flying rock) he does use Simplex Noise (enhanced variant of Perlin noise) to generate the terrain.
精彩评论