A very simple procedural terrain generator, created as a weekend project with C++/OpenGL. Terrains can be updated in real-time or through a configuration file. Afterwards, terrain meshes can be exported to OBJ files.
- Procedural terrain generation w/ perlin noise
- Color multiple terrain types by height
- Export mesh to OBJ (no materials)
- Default settings configurable with config file
- Textures w/ triplanar mapping
- Chunking w/ LOD
- Normal maps
- PBR shading
- Better controls; e.g., sliders, displaying noise textures
- Clone the repository
- Generate GLAD loader files
- Build with CMake
Currently only Linux builds have been tested. You must have the glm
and glfw3
packages installed.
Configure the project with CMake, and then compile the source:
mkdir build
cd build
cmake ..
make
Please see the sample config.txt
for examples on how to configure the default terrain settings.
Keys | Action |
---|---|
1/2 | Adjust Amplitude |
3/4 | Adjust Frequency |
5/6 | Adjust Persistance |
7/8 | Adjust Lacunarity |
Z | Stop camera rotation |
F1 | Toggle wireframe |
F2 | Toggle flat shading |
F5 | Refresh config.txt |
F12 | Export OBJ mesh |