Skip to content
REAL-TIME NAVIER–STOKES · 512² GRID · LIVE

Fluid,
painted with light.

A real fluid solver running sixty times a second — advection, pressure projection, vorticity — entirely on the GPU. Drag your cursor and stir the colour. It obeys the same equations as water.

See the solver Drag anywhere to paint the flow
Grid
512²
Pressure
22Jacobi / frame
Divergence
~0incompressible
Brush
1your cursor
01 / ADVECTION

The fluid carries itself.

Every point in the field asks one question: where was I a moment ago? It reaches backward along the flow and pulls that colour forward. Do it for every pixel, every frame, and motion becomes a medium.

02 / INCOMPRESSIBILITY

Nothing is created. Nothing is crushed.

Real fluid cannot pile up. A pressure solve runs twenty-two times a frame, pushing back wherever the flow tries to compress, until the field is perfectly divergence-free — the single step that makes it feel like water instead of smoke.

03 / VORTICITY

Curls that refuse to die.

Numerical fluids lose their swirl too fast. So we measure the spin at every point and feed a little of it back in — vorticity confinement — and the eddies keep turning, the way they should.

04 / PAINT

Your cursor is the only brush.

Move across the field and you inject both colour and momentum. The solver does the rest. No two strokes ever settle the same way.

HOW IT WORKS

A water tank in your browser.

Semi-Lagrangian advection

Each cell traces its velocity backward and samples the colour it came from — unconditionally stable at any timestep.

Jacobi pressure solve

Twenty-two relaxation passes approximate the pressure that keeps the velocity field incompressible.

Vorticity confinement

Curl is measured and re-injected so small eddies survive instead of smearing away.

Ping-pong fields

Velocity, dye, pressure and divergence each live in float textures, read and rewritten every frame.

Colour & momentum splats

Your cursor injects a gaussian of dye and force; an ambient jet keeps the tank alive when you are still.

Raw Three.js + R3F

Nine hand-written GLSL passes, manual render targets. Honors prefers-reduced-motion.

PHYSICS YOU CAN FINGER-PAINT

Go on,
make a mess.