WIP interactive, GPU-accelerated fluid simulation using smoothed particle hydrodynamics.
It can do all the simulation work on the GPU using WebGL2! It doesn't use WebGL2 Compute, which isn't widely supported. Instead, it does tricks with regular vertex and fragment shaders.
space
: start/stop simulations
: step forward in time (use while stopped)r
: resetclick and drag
: touch fluid- click
settings
for some tweakable parameters!
- Smoothed Particle Hydrodynamics Techniques for the Physics Based Simulation of Fluids and Solids
- Smoothed Particle Hydrodynamics (Monaghan 1992)
- Batcher's odd-even mergesort
- this one is tough and hard to find recent writing about, but these resources helped a little:
- GPU Gems 2 ch 46: Improved GPU Sorting
- odd-even mergesort network visualizer
- neighbor search inspired by Fast Fixed-radius Nearest Neighbors (Hoetzlein 2014)
- a lot of detail is missing from the slides unfortunately
- SPH Particle Collisions for the Reduction of Particle Clustering, Interface Stabilisation and Wall Modelling
- A generalized wall boundary condition for smoothed particle hydrodynamics
- this also provides some great details about their SPH implementation in general, and I referenced it frequently.