Hydraulic erosion
Generate a heightmap, then drop thousands of water particles onto it. Each droplet carries sediment downhill, carves channels, and deposits material in valleys. The same process that carved the Grand Canyon over millions of years — compressed into seconds.
How water shapes landscapes
Every river valley, canyon, and delta on Earth was carved by the same process: water falling as rain, flowing downhill, picking up loose material, and depositing it when the current slows. This simulation models that process with thousands of individual water droplets, each one a tiny agent of geological change.
The droplet algorithm
Each simulated raindrop lands at a random position on the heightmap. It computes the local gradient and flows downhill, accelerating on steep slopes and slowing on flat ground. As it moves, it erodes terrain proportional to the difference between its sediment capacity (how much material the water can carry, determined by speed and water volume) and its current sediment load. When the droplet slows or its capacity drops below its load, it deposits sediment. The droplet gradually evaporates, losing water each step until it vanishes.
Terrain generation
The initial terrain is generated using multiple octaves of simplex-like noise (fractal Brownian motion). Low frequencies create broad mountains and valleys; high frequencies add fine detail. The result is a plausible heightmap that looks like natural terrain even before erosion begins.
Why it matters
Hydraulic erosion simulation is used in computer graphics to generate realistic terrain for games and film. It is also used in geomorphology to understand landscape evolution, predict flood patterns, and study how climate change affects erosion rates. The same algorithm that makes a game world look real helps scientists understand the one we live in.