Dye In Water Screensaver
The Dye In Water screensaver runs a stable-fluids simulation and injects colour into it, so the dye records where the fluid has been. It runs in the browser with nothing to install; press ESC to exit.
How the Dye In Water screensaver works
The saver renders with three.js on your GPU. The library is vendored into this site rather than fetched from a CDN, and loads only when a 3D screensaver actually runs.
It reads nothing external — the simulation runs in the browser.
The scene resizes with the window and releases its WebGL context when the saver stops, so shuffle mode and Multi-view can cycle 3D savers without exhausting the browser's context limit.
If WebGL is unavailable the saver says so on screen rather than showing an empty black box.
A worked example
The velocity field is advected by itself, which is what makes fluid look like fluid: momentum carries the flow into curls that persist and interact rather than fading immediately. Advection is semi-Lagrangian — for each cell the simulation looks backwards along the velocity to find where its contents came from, which is what makes the method unconditionally stable. Dye is carried passively and fades slowly so the sheet clears.
Settings & tips
- Accent and Background recolour the scene; Speed changes the pace of the motion and the camera.
- Add it to a Multi-view grid, though 3D savers are heavier than 2D ones and a few per screen is plenty.
- Press ESC at any time to leave fullscreen.
Frequently asked questions
- What makes 'stable fluids' stable?
- Looking backwards rather than forwards. Pushing values forward can overshoot and blow up at large time steps; sampling backwards can only ever interpolate between values that already exist, so the simulation cannot diverge. Jos Stam introduced it in 1999.
- Is this accurate enough for engineering?
- No, and it was never meant to be. Stam's method was designed for computer graphics: it trades physical accuracy for stability and speed, which is exactly the right trade for something you look at.
- Does this need a special browser or plugin?
- No. It uses WebGL, which every current desktop and mobile browser supports. Nothing is installed and no plugin is required.
- Does it cost anything or need an account?
- No. Every screensaver here is free, runs in the browser and needs no sign-up.