TerraFractal, part 3: noise doesn’t drain

The first version of the refinement did what most terrain generators do. Take the simulated surface, and add octaves of noise on top, scaled by what the simulation said: more for young mountains, less for old plains, rougher on granite, smoother on sediment.

From orbit it looked right. Close up, the water was wrong.

Hills on a plain, or holes in it

My original mountain noise only added height. Hills sitting on a base that already drained. That has very few drainage problems: water runs around the hills and down the base. The rivers came from the simulation and ran to the foot of the mountains, and the noise was meant to make plausible slopes for streams to come down and meet them.

But positive noise adds its average height everywhere. The planets had too much land at around 1 km above sea level. I never fully pinned down whether the noise or the simulation itself was the cause, but switching to noise that averages zero fixed the volume.

And broke the drainage. Zero-mean noise is half dips. A dip below the base that drains is a hole, and a hole traps water.

Left
Left: positive-only relief sits on a base that drains. Right: zero-mean relief digs below it, and every dip is a pit.

Fixing it afterwards

The natural response is to route the rivers after the noise, then carve them in. That’s what I did, with more and more sophistication: a landmass-wide river network, catchment regions, per-tile small streams, each one cutting through whatever the noise put in its way.

From the first version
From the first version: a river carved straight through noise-generated mountains. The channel is a flat cut that ignores the slopes around it.
Also from the first version
Also from the first version: a river forced through relief that didn’t know about it, leaving vertical walls.

Measured, about a third of the small stream length in wet mountains ended up in gulches far deeper than the stream’s flow could ever cut. Streams of a few cubic metres a second in canyons hundreds of metres deep. That’s not a tuning problem. If the noise puts a ridge across a valley, the river has to either go around it, or cut through it, or pond behind it. Without knowing which is right, each fix just picked one.

What I learned

  • Drainage and volume are separate problems. Whether relief is positive decides whether it drains. Its average decides how much land there is. Zero-mean noise fixed the second by breaking the first. They have to be fixed separately: keep relief positive, take the average out of the base.
  • The noise never knew where the rivers were. And noise valleys don’t form a tree. They close into pits, stop, or run across the slope. A river network is a tree: every branch joins a bigger one.
  • Each scale had its own patch. Global network, then catchments, then tile streams. Each ran on ground generated without it, each invented its own handover to the next, and each had to reconcile with ground that ignored it.

The obvious next step was to stop generating the ground blind, and build it from the structures that matter, the ridges and the rivers, instead. That’s part 4.