Skip to main content

Procedurally Generated Planets

"Planet Settings"

This project is based on a youtube series by Sebastian Lague 'Procedural Planet Generation' (https://youtu.be/QN39W020LqU?si=L8g_dw9MDlF44L-G). I started this project because I am interested in Geometry and the idea of using shapes to generate world features is powerful. So far I have managed to follow and implement till the second video in the series.

In order to manipulate a spherical mesh, the first step is to make the mesh. The general spherical coordinate system for the mesh concentrates too much of the detail at the poles. To solve this problem we generate a mesh for a cube with 6 faces and normalise the vertices so they are equidistant from the center. This generates a sphere-like cube.

The next step is to make a settings editor that allows to adjust the shape and colour. For now, the planet does not have many features so a slider for the size and a solid colour as all it has. We also clean up the look for the editor adding seperate sections for colour and size, as well as a button to manually update the changes.

Terrain Generation

Lague's procedure was pretty simple. We add some random coherent noise to the vertices of the mesh. The resulting shape is a bit chaotic, but we can add some controls like roughness and strength. Roughness is how quickly the values changes from vertex to vertex, while strength is a multiplier for displacement.