[SIGGRAPH 1987 - Marching Cube] Implemented by unity and add some game-like features with threading and texture. Also, each information about biome is saved as unity asset. You can create Texture2DArray with biome asset easily with Unity wizard.
Marching cube algorithm is a long-established algorithm introduced in SIGGRAPH in 1987. Due to its simple implementation and easy algorithm, it is popularly used to create meshes based on point crowds in games. In the Marching cube algorithm, if a vertex is marked as an selected, the corresponding edge is added accordingly. By storing 256 combinations that can be made with 8 vertices as an array (in this project, I stored data as static int array), when the weight made by 3D perlin noise reaches a certain level or higher, the corresponding edge is created. Also, by interpolating the position of the edge vertices based on each weight, the mesh was created more naturally. In the example below, the vertices with black vertices are marked, and corresponding edges and meshes are created accordingly.
Preview of Marcing cube | Combination of vertices | Result of Random Terrain |
---|---|---|
Before texture | After texture |
---|---|
- Threading - Need to modify little.
- Texturing - Is there any way to simplify textuing processes?
- Fix Noise (Symmetric Issue)
- Improve Noise quality
- Biome - Height map texture is boring.
- Memory and resource management - Currently all the chunks are loaded as gameobject.