Generator node

Liquid Simulation

A real-time GPU fluid solver (Stable Fluids / Navier-Stokes) producing organic, swirling dye flow across the whole viewport. Drive it with a single X/Y point, with any point cloud, or with a segmentation-mask silhouette that emits dye, obstructs the fluid, and stirs it as it moves — a dancing person literally pushes the liquid around. Reach for it for ink-in-water backdrops, reactive smoke, VJ washes, and any visual that should feel wet and alive.

Inputs

PortTypeDefault
EnableOff pauses the fluid and clears the picture.booltrue
PointsA point cloud whose points each become a moving splat — landmarks, particles, geometry points. Up to 1024 are used; leave it unconnected to fall back to the single X and Y emitter.structure—
XHorizontal position of the single emitter when nothing is cabled to Points, in Grafit units. The fluid is pushed by how the point MOVES, so a parked emitter stirs nothing.float0
YVertical position of the single emitter when nothing is cabled to Points, in Grafit units. Cable an LFO or the mouse to stir the liquid.float0
EmitOff stops new dye from being injected while the emitters still push the fluid — useful for shoving clear liquid around.booltrue
ColorThe colour of the dye being injected. It mixes with dye already in the fluid rather than replacing it.color—
Hue CycleRotations per second the dye hue drifts through the colour wheel. Not clamped; 0 keeps a fixed colour and negative values cycle backwards.float0.0
Hue SpreadFans the hue across the emitter points so a cloud paints a rainbow instead of one flat colour. Clamped to 0…1, where 1 is a full turn.float0.0
RadiusSize of each dye blob, in Grafit units. At least 0.005; around 0.05…0.3 covers a fine jet to a broad cloud.float0.12
ForceHow hard emitter movement pushes the fluid. Not clamped; 1 is natural, high values fling the liquid, negative values push against the motion.float1.0
WanderGentle idle drift for emitters that are standing still, so the liquid keeps living without input. At least 0, and 0 means the fluid moves only when you move it.float0.0
ImageA mask or matte whose silhouette emits, blocks and stirs the fluid — cable Person Segmentation or any image with usable alpha.image—
Mask ModeWhat the silhouette does: Emit makes its outline glow with dye, Obstacle makes the fluid flow around it, Both does each. Out-of-range values snap to the nearest.int2
Mask ForceHow hard the silhouette's own motion stirs the fluid. Not clamped; 1 is natural and negative values push the wrong way on purpose.float1.0
SwirlFeeds the fluid's own curls back into itself, keeping vortices alive instead of letting them smooth out. At least 0; around 10…40 is organic, very high values boil.float25.0
FadeHow fast the dye dissolves away, per second. At least 0, where 0 means the colour never fades and the screen eventually fills.float0.35
DragHow fast the motion itself dies down, per second. At least 0; 0 keeps the fluid coasting forever, high values make it thick and sluggish.float0.25
PressureHow much pressure carries over between frames. Clamped to 0…1, where high values keep the flow smooth and springy and low values make it choppier.float0.8
IterationsHow hard the solver works to keep the fluid incompressible. Clamped to 1…60; 20 is a good balance, low values look gassy and high ones cost frame time.int20
SpeedTime scale for the whole simulation. At least 0, where 0 freezes it in place; above about 3 the solver starts to look unstable.float1.0
QualitySimulation grid size: Low, Medium or High. Higher shows finer filaments and costs more GPU. Out-of-range values snap to the nearest, and changing it restarts the fluid.int1
DisplayWhat to draw: Liquid is the flat dye, Shaded lights it like a 3D fluid, Velocity and Pressure are diagnostic views. Out-of-range values snap to the nearest.int0
ShineStrength of the specular highlight in Shaded mode. At least 0; around 0.2…1 looks wet, higher goes to glass.float0.4
BackgroundSolid colour composited under the liquid. Its alpha is honoured, so leave it transparent to layer the fluid over other nodes.color—
GradientCable a Gradient node here for a gradient background instead of the solid colour. Up to 16 stops are used; unconnected keeps the plain Background.structure—
Gradient AngleDirection of the background gradient, in degrees clockwise, with 0 running left to right. Any value works.float0
ResetA rising edge wipes the fluid, dye and pressure clean. Cable a trigger, or toggle it to start over.boolfalse

Outputs

PortType
ImageA mask or matte whose silhouette emits, blocks and stirs the fluid — cable Person Segmentation or any image with usable alpha.image
Widthfloat
Heightfloat

Live Preview

Interactive — Dye advected through a velocity field

How It Works

Each frame the node encodes a complete fluid step in compute and render passes on the GPU, before any generator render pass:

  1. Splat injection — emitters inject velocity (always) and dye (gated by Emit) as additive Gaussian splats of Radius.
  2. Mask ingest — if an image is connected, its luminance becomes a sim-resolution mask; a normal-flow estimate (v ≈ -(∂m/∂t)·∇m / |∇m|²) converts mask motion into velocity, and the silhouette outline emits a soft dye band.
  3. Advection — velocity and dye are advected through the velocity field, dissipating at Drag and Fade per second.
  4. Vorticity confinement — curl is measured and re-injected at Swirl strength, restoring the small eddies numerical diffusion eats.
  5. Projection — divergence, a pressure decay (Pressure), and Iterations Jacobi passes make the field incompressible, then the pressure gradient is subtracted.
  6. Display — a fullscreen pass renders the chosen field into the node's texture, compositing the background underneath.

Emitter sources combine freely. The Points input takes any point structure (up to 1024 splats) — each point's velocity is derived from its frame-to-frame motion (index-matched, clamped at 20 units/s). When no cable is attached to Points, the X / Y ports act as a single emitter; a connected but empty cloud stays empty. Wander is strictly opt-in idle motion: near-stationary points (moving under 0.05 units/s) get a gentle golden-angle-decorrelated drift so a parked emitter still stirs the fluid — at 0 the simulation never animates by itself.

Mask Mode decides what a connected Image does:

Mask ModeValueBehavior
Emit0The silhouette outline emits dye
Obstacle1The silhouette is a solid obstacle the fluid flows around
Both2 (default)Outline emits and the body obstructs — plus mask motion pushes the fluid via Mask Force

Display picks what the output texture shows:

DisplayValueOutput
Liquid0The dye field with a soft HDR rolloff — the standard ink look
Shaded1Pseudo-3D liquid surface: dye alpha is treated as a height field, normal-mapped with diffuse and specular controlled by Shine
Velocity2Velocity direction as hue, magnitude as brightness — a flow-field debug/aesthetic view
Pressure3Diverging blue/red pressure map

Quality sets the field resolutions (short viewport edge):

QualityValueSim resolutionDye resolution
Low0128512
Medium1 (default)2561024
High23841536

Changing Quality or the viewport aspect recreates all field textures and resets the simulation (a resize invalidates the field contents anyway). Reset clears everything on demand.

Background composites under the liquid inside the display pass: a solid color (alpha 0 = transparent, the default) or, when a Gradient node is cabled in, a multi-stop linear gradient at Gradient Angle degrees (clockwise-positive, per the Grafit rotation convention). Emitter color can animate: Hue Cycle rotates the hue in turns per second and Hue Spread spreads an extra hue offset across the points of a cloud.

The simulation covers the full viewport: Width and Height report the viewport fit size in Grafit units (origin at center, shorter edge mapping to [-1, 1]), so a Canvas node covers exactly the visible frame. Output is premultiplied alpha, and Enable = false clears the texture.

The velocity field also stays CPU-readable (shared-storage textures, snapshot refreshed at up to ~240 Hz with bilinear sampling), which is what lets a Liquid Flow node sample this simulation to push particles, points or any other geometry along the same currents.

Parameters in Depth

Emitters

PortDefaultMeaning
EnabletrueOff clears the output texture
Points—Point cloud of emitters, max 1024 splats; unconnected falls back to X / Y
X0Single-emitter horizontal position, Grafit units (used only when Points has no cable)
Y0Single-emitter vertical position, Grafit units
EmittrueGates dye emission; velocity injection continues regardless
Color(0.2, 0.55, 1.0, 1.0)Dye color
Hue Cycle0.0Hue rotations per second (0 = fixed color)
Hue Spread0.00–1 extra hue offset spread across the points of a cloud
Radius0.12Splat radius, Grafit units (min 0.005)
Force1.0Scale on injected velocity — how hard emitters push
Wander0.0Idle drift amplitude for near-stationary emitters (0 = fully user-driven)

Mask

PortDefaultMeaning
Image—Generator/segmentation texture used as mask; unconnected = point-driven only
Mask Mode20 Emit · 1 Obstacle · 2 Both
Mask Force1.0Scale on motion-derived velocity from the moving silhouette

Solver

PortDefaultMeaning
Swirl25.0Vorticity confinement strength — higher keeps more small eddies alive
Fade0.35Dye dissipation per second; higher = shorter trails
Drag0.25Velocity dissipation per second; higher = motion dies faster
Pressure0.80–1 pressure decay per frame; higher retains more of the previous solution
Iterations20Jacobi projection iterations, clamped 1–60 — higher = more incompressible, more cost
Speed1.0Time scale of the simulation; 0 = freeze
Quality10 Low · 1 Medium · 2 High field resolutions

Display

PortDefaultMeaning
Display00 Liquid · 1 Shaded · 2 Velocity · 3 Pressure
Shine0.4Specular strength / surface tightness in Shaded mode
Background(0, 0, 0, 0)Solid backdrop under the liquid; alpha 0 = transparent
Gradient—Gradient-node stops (max 16) — overrides the solid Background
Gradient Angle0Background gradient angle in degrees, clockwise-positive
ResetfalseClears velocity, dye and pressure fields

Interactions worth knowing: Swirl fights Drag — high Swirl with low Drag gives long-lived turbulence, while high Drag flattens everything into slow drift. Fade governs how long dye persists independently of how long motion persists. Iterations mostly changes how "tight" and non-smearing the flow looks; Radius and Force together decide whether an emitter paints or blasts.

Use Cases

  • Ink drop follows the mouse: Mouse position → X / Y, Radius 0.15, Emit on — classic ink-in-water trails
  • Person stirs the liquid: a Vision segmentation mask → Image with Mask Mode Both and Mask Force 1.5 — the silhouette emits from its outline, blocks the flow, and pushes it as it moves
  • Audio-reactive dye: Audio FFT → Remap → Force, and a beat signal → Emit, so the fluid only paints on hits; Hue Cycle 0.15 keeps the palette rolling
  • Particles riding the current: Liquid Simulation → Liquid Flow → a particle or point system, so geometry moves along exactly the same field the visuals show
  • Multi-point stirring: Geometry to Points (circle) → Point Animation (orbit) → Points, so a ring of emitters churns the frame; add Hue Spread 1.0 for a rainbow vortex
  • Flow-field art: Display Velocity over a black Background gives a hue-mapped flow map that composites beautifully in Additive blend on a Canvas

Tips

  • Like all generators, the output only reaches the screen through a Canvas node — and the simulation is viewport-sized, so a Canvas at Width/Height covers it exactly
  • Quality is the main performance lever; High (384/1536) is significantly heavier than Medium. Iterations is the second lever
  • Changing Quality or resizing the render window resets the fields — set up your output resolution before dialing in a look
  • Nothing self-animates: with no motion on the emitters and Wander at 0, the fluid settles and stops. Wander is the deliberate opt-in for a "living" idle state
  • A connected but empty Points cloud emits nothing — that is intentional, so a vision/particle source that momentarily has no points doesn't fall back to a stray center splat
  • The background gradient only activates with a real Gradient cable; otherwise the solid Background color (transparent by default) is used
  • Set Speed to 0 to freeze the field for a still frame without clearing it; use Reset when you want an actually empty tank

Open Liquid Simulation in the interactive catalog →

Liquid Simulation is one of 381 nodes in Grafit Pro.

Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.

More Generator nodes