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
| Port | Type | Default |
|---|---|---|
| EnableOff pauses the fluid and clears the picture. | bool | true |
| 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. | float | 0 |
| 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. | float | 0 |
| EmitOff stops new dye from being injected while the emitters still push the fluid — useful for shoving clear liquid around. | bool | true |
| 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. | float | 0.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. | float | 0.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. | float | 0.12 |
| ForceHow hard emitter movement pushes the fluid. Not clamped; 1 is natural, high values fling the liquid, negative values push against the motion. | float | 1.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. | float | 0.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. | int | 2 |
| 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. | float | 1.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. | float | 25.0 |
| FadeHow fast the dye dissolves away, per second. At least 0, where 0 means the colour never fades and the screen eventually fills. | float | 0.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. | float | 0.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. | float | 0.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. | int | 20 |
| SpeedTime scale for the whole simulation. At least 0, where 0 freezes it in place; above about 3 the solver starts to look unstable. | float | 1.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. | int | 1 |
| 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. | int | 0 |
| ShineStrength of the specular highlight in Shaded mode. At least 0; around 0.2…1 looks wet, higher goes to glass. | float | 0.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. | float | 0 |
| ResetA rising edge wipes the fluid, dye and pressure clean. Cable a trigger, or toggle it to start over. | bool | false |
Outputs
| Port | Type |
|---|---|
| ImageA mask or matte whose silhouette emits, blocks and stirs the fluid — cable Person Segmentation or any image with usable alpha. | image |
| Width | float |
| Height | float |
Live Preview
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:
- Splat injection — emitters inject velocity (always) and dye (gated by Emit) as additive Gaussian splats of Radius.
- 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. - Advection — velocity and dye are advected through the velocity field, dissipating at Drag and Fade per second.
- Vorticity confinement — curl is measured and re-injected at Swirl strength, restoring the small eddies numerical diffusion eats.
- Projection — divergence, a pressure decay (Pressure), and Iterations Jacobi passes make the field incompressible, then the pressure gradient is subtracted.
- 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 Mode | Value | Behavior |
|---|---|---|
| Emit | 0 | The silhouette outline emits dye |
| Obstacle | 1 | The silhouette is a solid obstacle the fluid flows around |
| Both | 2 (default) | Outline emits and the body obstructs — plus mask motion pushes the fluid via Mask Force |
Display picks what the output texture shows:
| Display | Value | Output |
|---|---|---|
| Liquid | 0 | The dye field with a soft HDR rolloff — the standard ink look |
| Shaded | 1 | Pseudo-3D liquid surface: dye alpha is treated as a height field, normal-mapped with diffuse and specular controlled by Shine |
| Velocity | 2 | Velocity direction as hue, magnitude as brightness — a flow-field debug/aesthetic view |
| Pressure | 3 | Diverging blue/red pressure map |
Quality sets the field resolutions (short viewport edge):
| Quality | Value | Sim resolution | Dye resolution |
|---|---|---|---|
| Low | 0 | 128 | 512 |
| Medium | 1 (default) | 256 | 1024 |
| High | 2 | 384 | 1536 |
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
| Port | Default | Meaning |
|---|---|---|
| Enable | true | Off clears the output texture |
| Points | — | Point cloud of emitters, max 1024 splats; unconnected falls back to X / Y |
| X | 0 | Single-emitter horizontal position, Grafit units (used only when Points has no cable) |
| Y | 0 | Single-emitter vertical position, Grafit units |
| Emit | true | Gates dye emission; velocity injection continues regardless |
| Color | (0.2, 0.55, 1.0, 1.0) | Dye color |
| Hue Cycle | 0.0 | Hue rotations per second (0 = fixed color) |
| Hue Spread | 0.0 | 0–1 extra hue offset spread across the points of a cloud |
| Radius | 0.12 | Splat radius, Grafit units (min 0.005) |
| Force | 1.0 | Scale on injected velocity — how hard emitters push |
| Wander | 0.0 | Idle drift amplitude for near-stationary emitters (0 = fully user-driven) |
Mask
| Port | Default | Meaning |
|---|---|---|
| Image | — | Generator/segmentation texture used as mask; unconnected = point-driven only |
| Mask Mode | 2 | 0 Emit · 1 Obstacle · 2 Both |
| Mask Force | 1.0 | Scale on motion-derived velocity from the moving silhouette |
Solver
| Port | Default | Meaning |
|---|---|---|
| Swirl | 25.0 | Vorticity confinement strength — higher keeps more small eddies alive |
| Fade | 0.35 | Dye dissipation per second; higher = shorter trails |
| Drag | 0.25 | Velocity dissipation per second; higher = motion dies faster |
| Pressure | 0.8 | 0–1 pressure decay per frame; higher retains more of the previous solution |
| Iterations | 20 | Jacobi projection iterations, clamped 1–60 — higher = more incompressible, more cost |
| Speed | 1.0 | Time scale of the simulation; 0 = freeze |
| Quality | 1 | 0 Low · 1 Medium · 2 High field resolutions |
Display
| Port | Default | Meaning |
|---|---|---|
| Display | 0 | 0 Liquid · 1 Shaded · 2 Velocity · 3 Pressure |
| Shine | 0.4 | Specular 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 Angle | 0 | Background gradient angle in degrees, clockwise-positive |
| Reset | false | Clears 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
Bothand 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
Velocityover 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.