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.

Multigrid-Inspired Scaling: Multiple resolution levels (L1-L4) process erosion at different scales progressively, inspired by multigrid methods used in fluid dynamics and heat diffusion.

Isotropic Everywhere:

  • Simplex noise for terrain generation (more directionally uniform than Perlin)
  • FD8 multi-directional flow routing distributes water across all 8 neighbors instead of single-direction D8
  • Bicubic interpolation for smoother, more isotropic grid transitions
  • Scharr gradient operator for directionally consistent slope calculations

Download

Download
multigrid-eulerian-erosion.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/multigrid-eulerian-erosion/

Leave a comment

Log in with itch.io to leave a comment.