3D Procedural Terrain Generation

Marching Cubes

The geometry for this project is developed using the marching cubes algorithm. This involves representing the world as a density field and building a mesh based on the density value of each voxel. The density field is built using perlin noise and fractal brownian motion. The octaves, frequency and lacunarity can be altered to change the type of generation as needed.

Infinite Generation

The world is broken up into tile actors. They each create a bounding cube around their area and sample the noise with each vertex in the cube. Tiles are placed around the player as they move and are removed when too far away. This creates infinite generation in all directions.

Caves

The surface of the world connects to a cave layer below the surface. This is made by sampling the noise in 3D and blending the two layers together over a section of the tile.