Water

This is a water simulation modeling water as thousands of small balls colliding with each other. You can interact with it by adding objects such as a cup or a helix. You can also dynamically change the domain constraints and the engine settings. The smaller the timestep, the more precise it is.

This project runs fully on GPU and can handle up to a million balls. It is implemented with the experimental WebGPU API, which allows GPGPU in the browser for massively parallel computing.

You might need to manually enable WebGPU in your browser.


Average FPS:
Average iterations per second:
Particles count:
Grid:

Engine


Rendering

 
#CA8BBC
 
#0076EC
Hidden
Hidden
Color by population
Final

Particles

Medium amount
Small amount
Fair amount
Medium amount
Big amount
Huge amount
Giant amount

Obstacles

Helix
None
Capsules
Helix
Cup
Rotate
None
Rotate

Domain

None
None
Rotate
Contract

Debug

World normals
Local position
Screenspace normals
World normals
Water depth
Water
Depth
Balls