̶M̶u̶l̶t̶i̶g̶r̶i̶d̶ ̶i̶n̶s̶p̶i̶r̶e̶d̶ Eulerian hydraulic erosion
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.
Updated | 20 days ago |
Status | Prototype |
Category | Other |
Author | SapereAude1490 |
Tags | acerola, compute-shader, hydraulic-erosion, webgpu |
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.