One noise function, stacked on itself
Real landscapes look rough at every scale at once: continent-sized swells, hill-sized bumps, boulder-sized texture. A single layer of smooth noise can't produce that — it looks like rolling fog. The fix, fractal Brownian motion (fBm), is almost too simple to believe: take a smooth noise function, sample it several times at doubling frequency and halving amplitude, and add the results together.
height(x, y) = Σ amplitude^i · noise(frequency^i · x, frequency^i · y) for i = 0..octaves
typical: frequency = 2 (called "lacunarity")
amplitude = 0.5 (called "persistence" or "gain")
Each added layer is called an octave. The first octave (low frequency, high amplitude) lays down the continents and mountain ranges; the next octave adds hills at twice the frequency and half the strength; further octaves add ridges, then rocks, then pebble-scale texture, each one contributing less than the last. Five or six octaves is usually enough to fool the eye into seeing a landscape with detail at every scale, because that's genuinely how the power spectrum of real terrain behaves — a well-known result in geomorphology is that natural terrain elevation approximately follows a power-law spectrum close to that of fractional Brownian motion.
Where the noise itself comes from
The base noise is usually Perlin noise (Ken Perlin, 1983 — originally built for the movie Tron) or its faster cousin Simplex noise. Both work by scattering pseudo-random gradient vectors on a lattice and smoothly interpolating between them, which produces noise that is continuous and differentiable — no sharp jumps — unlike naive per-pixel random numbers, which look like static rather than terrain.
Erosion: the step that makes it believable
Raw fBm terrain looks like noise wearing a landscape costume — technically fractal, but geologically implausible, because it never accounts for the fact that water moves material downhill. Hydraulic erosion simulation fixes this by tracking simulated rain droplets: each droplet picks up sediment proportional to its speed and the slope beneath it, carries that sediment downhill, and deposits it wherever the droplet slows down — at the base of a slope, in a natural basin, at the edge of a lake. Run thousands of droplets and ridgelines sharpen, valleys carve themselves out, and sediment naturally piles up into fans and deltas exactly where real rivers would leave it.
for each droplet (thousands):
pos = random point on the map
while droplet has velocity and is on the map:
slope = gradient(heightmap, pos)
velocity += slope * gravity
capacity = velocity * water_volume
if sediment > capacity: deposit the excess
else: erode min(capacity - sediment, maxErodeDepth)
pos += velocity
This is a particle-based erosion model — cheap enough to run thousands of droplets in real time — as opposed to the grid-based shallow-water erosion models used offline in film production, which solve the full fluid equations over the heightmap and are far more expensive but capture braided rivers and standing water more faithfully.
Sea level and biomes are just thresholds
Once the heightmap exists, turning it into a recognisable landscape is mostly thresholding. Anything below the chosen sea level renders as ocean; a narrow band just above it becomes beach; biome colouring beyond that typically keys off both elevation and a second, independently generated noise field standing in for moisture or temperature — cold and high becomes rock or snow, warm and wet becomes forest, warm and dry becomes desert. None of this needs new physics: it is the same fBm technique generating a second, uncorrelated map that gets combined with the first.
Why the same technique reappears everywhere
fBm shows up far outside terrain: cloud and marble textures, planet surfaces, coastlines, and even stock-price generators use the identical layered-octave trick, because the same statistical signature — self-similar roughness across scales — turns out to approximate an enormous range of natural processes. This is also why the technique has a real scientific pedigree: Benoit Mandelbrot's foundational fractal geometry work in the 1970s used coastlines and terrain specifically as motivating examples of natural fractals with a measurable fractal dimension between 1 and 2.
Frequently asked questions
Why does terrain generated from a single noise layer look wrong?
One noise octave has one characteristic bump size, so it looks like rolling fog rather than a landscape — real terrain has detail at many scales simultaneously. Stacking several octaves of noise at doubling frequency and halving amplitude (fractal Brownian motion) reproduces that multi-scale roughness.
What does erosion actually change about the heightmap?
Simulated water droplets remove material from steep, fast-flowing areas (carving ridgelines and valleys) and deposit it where they slow down, such as basins and slope bases. This single pass turns a mathematically fractal but geologically implausible heightmap into something that looks like it was actually shaped by rain and rivers.
Is Perlin noise random?
It's pseudo-random but deliberately smooth: it interpolates between randomly-oriented gradient vectors placed on a lattice, so nearby points produce similar values and the result has no sharp jumps — unlike pure per-pixel randomness, which looks like television static rather than terrain.
Try it live
Everything above runs in your browser — open Terrain Generator and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Terrain Generator simulation