The goal for this project was to explore techniques to procedurally generate spherical terrain.
In order to achieve this goal, the following steps were taken:
- Generated a spherical mesh (Modified previous cylinder generation code)
- Generated 3D perlin noise and applied a height modification in order to simulate terrain
- Applied color gradient in fragment shader to differentiate terrain
The planet generator was then refactored to allow the creation of multiple planets which were used to simulate asteroids
- glBufferSubData was used to update the planets mesh
- Impacts were calculated using a variety of factors including:
- Asteroid size
- Planet rotation
- Terrain height
Terrain Modification
References