Rivers drawn from flow data, sized by how much water they carry
Published
In short: rivers are now drawn from river data, each as wide as its flow, running on to the sea. Nothing lands, grows or is built on them.
The ground’s colour comes from a satellite map with 500 m pixels. On it only the biggest rivers show, about a pixel wide, so the Chao Phraya through Bangkok, about 400 m across, was missing. Now rivers are drawn on their own, from river data. The test area is again the plain around Bangkok.

Where the rivers come from
The rivers come from HydroRIVERS, a line map of the world’s rivers[1] made by the HydroSHEDS project. For each stretch of river it also gives an estimate of the long-term average flow. Through central Bangkok, that is 828 m³ a second. HydroRIVERS is free to use, commercial use included, with credit; see credits.
How wide
A river’s width grows with its flow as a power law[2]. The game uses the common square-root form: width = A × √flow. A is set so the Chao Phraya through Bangkok comes out at about 400 m, which gives A ≈ 13.9. Every other river follows the same rule.
Rivers under 60 m wide are left out. At that size they would break up into dots, and most would hide under the forest anyway.

How it is drawn
Each area gets one baked texture, 200 by 200 km at about 49 m a pixel. It does not store the river’s colour: it stores the distance to the nearest river bank. That keeps banks smooth and sharp far below a pixel, at the cost of about one texture lookup for the ground.
Colour
The real Chao Phraya is muddy brown. In the game the rivers are a clean blue-green: in the developer’s words, “it’s after-earth era so nature is pristine”. The sea’s own blue was tried first, and was “too blue”.

Reaching the sea
The river data’s coastline sits 8 to 20 km inland of the game map’s coast round Bangkok, so at first the rivers stopped short of the sea. Now each river mouth is carried on to the map’s sea, and over its last 2.5 km the river turns to the sea’s blue, so the two meet without a seam.

Real water
Rivers are water for the game, not just paint. No trees grow on them, nothing lands on them and no buildings stand on them, so a river through town leaves a clear band. Roads cross as bridges, with a light rim along each edge.
A bug along the way
The game decides what is water by colour: clear blue is water. The new blue-green was too green for that test, so for a few minutes Bangkok’s buildings stood in the river. The fix: the water test now reads rivers as sea-blue, whatever colour they are drawn in. A new test checks the buildings the game actually puts up, so this can’t come back unnoticed.
Related
- Forest where the map says forest, 100 km round
- Rivers sized by flow: why the width rule, the cut-off and the colour
- Credits
Sources
- HydroRIVERS, HydroSHEDS.
HydroRIVERS represents a vectorized line network of all global rivers
- The hydraulic geometry of stream channels and some physiographic implications (Leopold and Maddock, 1953), U.S. Geological Survey, Professional Paper 252.
vary with discharge as simple power functions at a given river cross section