how it works
Two-stage multi-layer erosion based on
SoilMachine.
Terrain is stored as a stack of typed soil layers per cell (Bedrock → Rock → Gravel → Soil → Sand),
with a top Air layer tracking surface water.
1: Global simulation:
It simulated erosion on a coarse 96×96 grid.
2: Local simulation:
For each chunk,
It zooms in 4× and simulates erosion on the 3×3 chunks around it.
This allows nearby chunks to affect this chunk.
But it also needs to limit the effects to 1 chunk distance, so the chunk doesn't get affected by chunks that are outside the 3×3 area.
To limit it: each step, everything only affects 1 cell away. the number of steps is the same as the chunk size.
(snapshot model: all particles read terrain once per step, all writes applied simultaneously).
This makes the map bigger and more detailed.
Maybe it can zoom in more times and do more local simulations to generate even bigger maps.