No Man's Sky advertises 18 quintillion planets. That is not because someone modeled them by hand. It is because the game generates terrain, flora, and atmosphere from mathematical functions seeded by the planet's coordinates.
The core idea is procedural generation, and the simplest building block is noise.
Why raw randomness fails
If you fill a height map with random numbers, you get chaos. Real terrain has smooth transitions: hills blend into valleys, coastlines curve gradually. The solution is a noise function that produces smooth, continuous random values.
Perlin noise does exactly this. It generates values that vary gradually across space, so nearby points have similar heights. Feed a 2D grid of Perlin noise into a renderer, add color and lighting, and you get something that looks like terrain.
The trick is layering. A single layer of Perlin noise looks too uniform, like rolling hills with no variation. Games stack multiple layers at different frequencies and amplitudes. Low-frequency layers define the broad shape of continents. High-frequency layers add rocks, cracks, and surface detail. This is called fractal Brownian motion, and it is the reason generated worlds look organic instead of synthetic.
What No Man's Sky adds
Sean Murray and the team at Hello Games went further than basic layered noise. Their GDC talk outlines several techniques:
Domain warping twists the noise field itself. Instead of sampling noise at the raw coordinates, you sample at coordinates that have been displaced by another noise function. This creates caves, overhangs, and twisted terrain that straight noise cannot produce.
Filtering and image processing cleans up the raw noise. Unfiltered procedural terrain often looks muddy or repetitive. The team runs filters to emphasize ridges and valleys, suppress bland regions, and sculpt the terrain into more interesting shapes.
DEM blending mixes in real-world elevation data for grounding. The risk is making everything look like Earth, which is familiar but boring. The game uses this sparingly, blending real data with warped noise to keep things alien but plausible.
Biome rules layer on top of the terrain. Temperature, humidity, and elevation determine what plants and animals spawn. These rules are also procedural, driven by the same coordinate seeds that generated the planet itself. Visit the same planet twice, you get the same terrain and the same wildlife. Visit a different planet, everything changes.
The result is a universe where every planet is deterministic (the same seed always produces the same world) but effectively infinite (the coordinate space is so large you will never see the same planet twice).
If you want to see the Perlin noise graphs and a deeper walkthrough of the layering math: How No Man's Sky Creates 18 Quintillion Planets.
Top comments (0)