Tool for creating and editing simple 3D terrain. Developed using Unity and based on the marching cubes algorithm.
A video demonstration is available on YouTube via the following link.
This tool generates random terrain containing hills and valleys by sampling Perlin noise and implementing the marching cubes algorithm. The generated terrain can be rotated, zoomed, edited with a spherical brush, flattened to a given height, expanded or shrunk. The brush tool can create additional terrain only on top of the already existing terrain, not anywhere in the air. This way, the original terrain can be changed to have caves, tunnels, cliffs and floating pieces. Terrain is colored based on its height: the highest peaks are colored purple and the lowest points are colored red.
NOTE: There are currently two major flaws with this project:
- Terrain size must remain relatively small. Otherwise, the terrain mesh becomes messy and unusable.
- Flattening the terrain causes extremely fast performance of future brush actions (creating or erasing additional terrain). The code for the flattening function needs to be changed.
Unity version used: 6000.0.62f1
- Use arrow keys to rotate the terrain.
- Use mouse wheel to zoom in or out.
- Use '+' and '-' buttons to increase and decrease brush size.
- Hold down left click to build terrain and right click to erase terrain at the cursor position.
- Use UI to generate a new random terrain, flatten the existing terrain and expand/shrink the width of the terrain.
Below is a list of learning resources, used during the development of this project, recommended for better understanding of the marching cubes algorithm: