does anyone know how to make the erosion simulation better?
it doesn't look good enough
i can credit you if you help.
i'm trying to make world gen that you can explore for this
(it has about 200 people each day)
Generating...
Chunk view
Click terrain to select a chunk

here is the code. if you know how to make it better, tell me.
i might add it to minekhan, it has lots of players.
i can credit you if you help
if you changed the code, just save it on html.cafe and tell me.

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.