Cusp Planet Generator
A planetary map generator using 3D Perlin noise
Procedural generation is something of a hobby for me, with landform generation receiving perhaps the largest share of my attention. Previous experiments used Perlin noise as a base and focused on improving topography, but with Cusp my priorities were different. I would accept the simple, flawed terrain offered by Perlin noise; instead, I wanted to focus on bringing these worlds into the third dimensions, adapting old techniques to generate heightmaps in 3D space and learning new ones to render those maps seamlessly on a sphere.
First, I created a globe by projecting a cubic mesh, divided into a uniform grid, onto a sphere using a mapping that would keep the grid cells close to uniform. Then, extending Perlin noise to operate on 3-dimensional inputs, I would generate a heightmap texture for each of the sphere’s six “faces”, using the evenly spaced points on the globe’s surface as inputs. The experiment was an heartening success: the faces fit together elegantly, and while my chosen cube-sphere mapping distorts cells along the boundaries between faces, the seams are difficult to notice even upon close inspection — nearly invisible at the scale at which the simulator displays. The result is a near-infinite supply of planets that are smooth, coherent, and believable (geometrically if not geologically).
Music courtesy of r.u.u.n.e.