Fluid simulation is the numerical computation of how a liquid moves through space and time, solved frame by frame so that water, mud, honey or lava behave plausibly in a rendered shot. In 3D graphics & animation, it belongs to the Simulation & effects toolset and sits between particle systems and smoke solvers: the artist defines sources, colliders and forces, and the solver produces a sequence of volumes or meshes that are cached and rendered.
Production fluid solvers approximate the Navier-Stokes equations, which describe conservation of momentum and mass in a fluid. Film and game studios rarely aim for engineering accuracy. The goal is visual plausibility at a controllable cost, which is why the field favors hybrid methods, adaptive resolution and heavy caching over exact physics.
How a fluid solver advances each time step
A fluid solver repeats the same sequence of operations for every time step, and several steps usually fit inside one animation frame. Each step moves the fluid, applies external influences and then corrects the velocity field so that the liquid does not gain or lose volume.
- Advection carries velocity and other quantities along the current flow.
- External forces such as gravity, wind or custom force fields are added.
- Collision handling pushes fluid out of colliders and applies boundary conditions.
- Pressure projection solves a large linear system that makes the velocity field divergence free, which enforces incompressibility.
- Surface extraction converts the result into a level set or polygon mesh for rendering.
The pressure solve is usually the most expensive stage, because it couples every cell of the domain. Solvers use a preconditioned conjugate gradient method or a multigrid scheme here, and their convergence tolerance has a direct effect on whether a liquid slowly shrinks or keeps its volume.
Step size is governed by the CFL condition: fluid should not travel more than a few cells in a single step. Fast splashes therefore require more simulation substeps, and an artist who lowers the substep count to save time often sees particles tunnel through thin colliders.
Grid, particle and hybrid methods
Fluid simulation methods differ mainly in where the fluid state is stored: on a fixed grid, on moving particles, or on both. Each choice trades detail, stability and memory differently.
| Method | State stored on | Strength | Weakness |
|---|---|---|---|
| Eulerian grid | Fixed voxel grid | Stable pressure solve | Numerical dissipation blurs detail |
| SPH | Particles only | No grid, natural splashes | Hard to keep incompressible |
| FLIP | Particles and grid | Lively, low dissipation | Noisy surfaces, needs particle count |
| APIC | Particles and grid | Preserves rotation, less noise | Slightly more damping than FLIP |
| Position based fluids | Particles with constraints | Fast, robust for real time | Less physical, can look soft |
The FLIP fluid approach dominates film liquids because it transfers velocity changes rather than whole velocities between particles and grid, which keeps small swirls alive. Many tools blend FLIP with a small share of PIC, typically a FLIP ratio of 0.9 to 0.99, to calm the noise. Smoothed-particle hydrodynamics remains common in real-time and engineering contexts where a grid is impractical.
Key parameters that shape the result
A handful of settings control most of the look and the cost of a liquid simulation. Understanding them saves more time than any hardware upgrade, because resolution scales the cost cubically in three dimensions.
| Parameter | What it controls | Typical effect of raising it |
|---|---|---|
| Voxel size | Spatial resolution of the grid | Smaller cells add detail and memory use |
| Particle separation | Density of fluid particles | Finer splashes, larger caches |
| Substeps | Time steps per frame | Better collisions, longer simulation |
| Viscosity | Resistance to shear flow | Thicker, slower liquid such as honey |
| Surface tension | Cohesion at the free surface | Rounder droplets, beading on objects |
| Narrow band width | Depth of simulated layer | More volume simulated below the surface |
Halving the voxel size multiplies the cell count by roughly eight times, and simulation time often grows even faster because more substeps are needed. For this reason studios run low-resolution previews for timing and art direction, then increase resolution only for approved shots.
Fluid simulation compared with neighboring effects
Fluid simulation in the narrow sense means liquids with a free surface, which distinguishes it from gas solvers and other procedural effects in the same Topic. The boundaries matter when choosing a tool and planning a shot.
| Effect | Medium | Typical output | Key difference |
|---|---|---|---|
| Liquid simulation | Water, oil, mud | Mesh or level set | Tracks a sharp free surface |
| Smoke and fire simulation | Gas and combustion | Density and temperature volumes | No surface, buoyancy driven |
| Ocean simulation | Open sea surface | Displacement maps | Spectral waves, not a full solver |
| Whitewater simulation | Foam, spray, bubbles | Secondary particles | Derived from a base liquid sim |
| Granular simulation | Sand, snow, grain | Particles | Friction instead of fluid pressure |
Large water shots usually combine these layers: a spectral ocean for the distant surface, a FLIP simulation near the action, and whitewater particles for foam and mist. The layers are blended at render time so that the expensive solver covers only the region the camera actually inspects.
Tools and production workflow
Production fluid work follows a set up, simulate, cache, mesh, render pipeline, and every stage writes data to disk. Houdini is the industry reference for FLIP liquids, while Maya uses Bifrost, Blender ships Mantaflow, and 3ds Max artists often rely on tyFlow or third-party plugins.
- Simulation cache files store particles or volumes per frame and can reach hundreds of gigabytes for a hero shot.
- Meshing converts particles into a surface; smoothing and dilation settings strongly affect the final look.
- Colliders need clean, closed geometry with enough thickness relative to the voxel size.
- Retiming and wedging (running variations of one parameter) help directors choose a take without repeated manual tweaking.
Limitations and common mistakes
Most failed fluid simulations come from scale and resolution errors rather than solver bugs. A short diagnostic list helps narrow the cause quickly.
| Symptom | Likely cause | Fix |
|---|---|---|
| Water looks like syrup | Scene built at wrong scale | Model in real meters or adjust gravity |
| Volume slowly disappears | Loose pressure tolerance | Tighten solver tolerance or iterations |
| Fluid leaks through walls | Collider thinner than a voxel | Thicken collider or add substeps |
| Blobby, noisy surface | Too few particles per cell | Raise particle count, refine meshing |
| Simulation explodes | Extreme forces or tiny gaps | Reduce force strength, clean geometry |
Real-world scale is the single most important warning: a liquid in a cup modeled ten times too large falls slowly and reads as a giant flood. Real-time engines face a different limit, because they rarely afford a full 3D solve and instead fake liquids with height fields, shaders and short particle bursts.
Put simply
Fluid simulation lets the computer work out how water would really move. Nobody has to draw every splash by hand. The artist pours virtual liquid into a scene and adds walls and objects. The software then calculates where each tiny piece of liquid goes, frame after frame.
Think of a box filled with millions of tiny marbles. They push on each other and refuse to be squeezed. The result looks like real water because it follows the same basic rules of motion. It needs much computing time, so artists test small versions first.
In practice
A small visual effects team works on a commercial in which a glass bottle falls into a kitchen sink full of water. The artist rebuilds the sink at real-world scale in meters, imports the animated bottle as a collider, and runs a FLIP simulation with a coarse particle separation to check timing in about twenty minutes.
After the director approves the motion, the artist refines the particle separation, raises the substeps to four per frame to keep the fast bottle from passing through the liquid, and adds a whitewater pass for bubbles. The final simulation runs overnight on one workstation, produces roughly 180 GB of cache, and is meshed and rendered with a refractive water shader. The result is a six-second shot that reads as real water without any hand-animated splash.