A downloadable project

Eulerian Multigrid-Inspired Hydraulic Erosion

An interactive WebGPU terrain erosion simulation that explores advanced computational approaches to realistic landscape generation.

The Challenge

Traditional hydraulic erosion simulations often struggle with GPU efficiency - my previous Lagrangian approach required expensive atomic operations that created bottlenecks. I wanted to explore whether multigrid-inspired techniques, combined with an Eulerian framework, could create more GPU-friendly erosion while maintaining physical accuracy.

Technical Details

Eulerian Water Balance: Instead of tracking individual water particles, the simulation maintains water mass conservation across a grid, eliminating the need for atomic operations and improving GPU performance.

Thermal Erosion: In addition to hydraulic erosion, the simulation also does a thermal erosion pass with different angle of repose depending on terrain wetness (proximity to water).

Water redistribution: A final pass uses a Margolus neighborhood and redistributes water by doing a binary search for the water level in a 2x2 segment of the grid.

Download

Download
eulerian-erosion.zip 6.2 MB
Download
multigrid-eulerian-erosion-OLD.zip 1.5 MB

Install instructions

To start it, use node.js and in the terminal run:

npm install 
npm run dev

You can also try it here: https://metarapi.github.io/eulerian-erosion/

Leave a comment

Log in with itch.io to leave a comment.