Liquids
Water that fills, pours, splashes and carries things off: filling and inflows, choosing a spacing, tanks, thick and sticky liquids, floating bodies, and the surface mesh.
A liquid is particles that keep their volume: they fill containers, slosh, splash and pour. The bake also makes the liquid's surface as a mesh each frame, which is what you render.
Start from
- Liquid: a dam break, a column of water falling and running along a glass tank.
- Fill With Water: your selected mesh full of water, which falls and splashes.
Where the liquid comes from
A Birth with Mode Fill, in the event with the Liquid:
- Fill once: the Object's mesh fills with liquid on the Start frame, then the liquid is on its own. A closed mesh: a column to collapse, a glass of water, a drop.
- An inflow: with Stop on, the mesh is kept full from Start to End, and the liquid in it goes at the Birth's Velocity. A tap, a hose, a wave pouring in. Shape the mesh like the stream's start: a short cylinder for a tap.
Turn off the fill mesh's rendering, as the starters do: the liquid shows as its own surface.
Spacing: detail against time
Each particle stands for a cube of liquid Spacing across. It sets how small a drop or how thin a sheet can be, and what the bake costs: half the spacing is eight times the particles, and about twice as many substeps.
| Spacing | For | Particles in a 1 m cube |
|---|---|---|
| 5 cm (the default) | Big, rough looks; testing | 8,000 |
| 3 cm (the starters) | A tank, a dam break | 37,000 |
| 1.5 cm | A bucket's worth splashing | 300,000 |
| 5 mm and less | A glass, a pour into a cup | Millions: a GPU bake |
Work at a coarse spacing, with Draft for quick looks (it doubles the spacing), and bake the fine one last. Every Liquid in a flow shares one Spacing; each may have its own density, viscosity and the rest (see Two liquids).
Tanks, floors and moving walls
A Collide in the liquid's event gives it its walls: its objects and the ground. A collider's mesh holds liquid off both its sides, so an open box is a tank, and a plane is a wall. Walls can move: a paddle stirs the liquid, a tipping bucket pours it, a boat hull pushes a wake.
The Collide also says how the liquid feels its walls:
- Stickiness: how hard the liquid clings to them, pulled back onto them as it leaves. Honey on a spoon, paint on a ceiling. Stick Map paints it on, by a vertex group: sticky only where the map is.
- Liquid Friction: how much the walls hold back the liquid running along them. 0 slips freely; a thick liquid on a rough wall runs slower at the wall than in the middle.
- Wet Map: the collider keeps a map of where the liquid has touched it, for its material, which dries over Dry seconds (0: stays wet). See Wet maps.
Thick, sticky and beading
Preset, on the Liquid operator, sets Viscosity, Density and Surface Tension to a real liquid's: water, milk, oils, syrups, honey (runny, typical or thick), chocolate, ketchup, lava and more. Change any of them after.
- Viscosity, in real units (m²/s): water 0.000001, olive oil 0.0001, honey 0.007 (0.002 runny to 0.04 thick), melted chocolate 0.01, lava 0.05. Thick liquids coil as they pour and are held back by walls.
- Surface Tension, in N/m (water 0.07): pulls the surface in, so drops round up and thin streams bead. It's felt at the scale of the spacing, so it shows only with a fine one, or turned up.
- Density: how heavy the liquid is, which decides what floats in it.
- Viscosity by a value: a float value on each particle multiplies its viscosity, so a liquid can be thick in one place and runny in another: cooling lava, honey warmed at one end.
Pastes: standing until pushed
Yield Stress (Pa) makes a paste: below it, the liquid holds its shape like a solid; pushed harder, it flows. Ketchup that sits in a heap on the plate, toothpaste that keeps its ribbon, wet cement that slumps only so far. With it, Flow Index says how it thins as it's sheared: below 1 it runs easier the faster it's pushed (ketchup 0.3), 1 is plain, above 1 it stiffens. Yield Rounds solves it more carefully, for a sharp edge between standing and flowing; 2 is usually enough.
The Preset menu has ketchup, mayonnaise, toothpaste, melted chocolate, wet cement and thick paint, from measured values.
Stretchy liquids
Elasticity (Pa) makes the liquid spring back part of the way when it's pulled or sheared, as slime, egg white or putty do. Memory (s) is how long it remembers its shape: short, and it soon flows like a plain thick liquid; long, and it bounces. Stretch Limit caps how far it can be stretched before it stops pulling harder, and Tear At lets it tear: past that stretch, it forgets the rest.
Stringiness draws the liquid out into strings and threads as it's pulled apart, cheese or honey stretched off a spoon; String Break is how far, in spacings, a string reaches before it parts.
Presets: slime, silicone putty, whipped cream, egg white. These are looks, not measured values: change them to taste.
Two liquids
Put each liquid in its own event, each with its own Liquid: they share the Spacing, and each has its own Density, Viscosity and the rest. A heavier one sinks through a lighter one, oil floats on water, honey pours into milk.
- Interface Tension, on, with Tension There: the tension where this liquid meets another, instead of its own Surface Tension. High keeps them apart in round blobs, oil in water; 0 lets them blur at the edge.
- Mix: how fast this liquid's values, such as its color, spread into its neighbours where it touches another. 0 keeps a sharp edge; higher, and the colors bleed into each other.
To give each its own material, turn on One Mesh per Liquid in the Liquid panel.
Splashes that hold together
Keep Sheets keeps thin sheets and streams whole as they stretch, so a splash's crown and a thin pour hold together instead of breaking into beads. It's on at 1. Pair it with the Sheets surface, below.
Sheets Max Age, Sheets Speed, Sheets Angle, Sheets Share, Break Up and Sheets Region say where sheets are kept whole: only young liquid, only between two speeds, only where it's spreading steeply, only some gaps (less leaves holes, as lace), not along threads (so they part into drops), and only inside a closed mesh. All off, it keeps every sheet, as before.
A Crown kicks liquid up in a ring round a point at a time: the crown of a drop landing in milk, with spikes round it that throw off drops. Its Strength is the same however many substeps the bake takes.
Vorticity Boost puts back the swirls a coarse spacing smooths out: splashes and wakes roll and curl more. 0 is off; start small (0.01 to 0.05).
Lonely Life deletes a particle that has been alone, far from the rest, for that long: stray drops that would hang in the air, cleared away.
Trapped Air keeps pockets of air the liquid closes round: the air under an upside-down cup holds its volume and pushes back instead of filling with liquid. Rigid bodies and cloth close it in too. It costs time; turn it on only for shots that need it.
Things in the liquid
- Floating and sinking: rigid bodies in another event float by their density against the liquid's: wood (600) floats, stone (2,500) sinks. The liquid carries them off, and they push it.
- Cloth: cloth bound along its edges, in another event, holds liquid and is pushed by it.
- Whitewater: spray, foam, bubbles and mist where the liquid crashes: see Whitewater.
The surface mesh
After the bake, the particles object gets an output object, “name Liquid”: the liquid's surface, made fresh each frame, smooth shaded, in the VecFlow Water material. The liquid's particles aren't shown. The Liquid panel sets how the surface is made (these need a new bake, of the surface):
-
Surface: Fast is quickest and bumpy where particles are few; Smooth keeps drops and rims under heavy smoothing; Sheets (the default) gives flat sheets, smooth streams and round drops at lower counts, at about twice Fast's work; Filled is Sheets with pinholes closed, merging drops that nearly touch.
-
Detail: grid cubes across the gap between particles. Twice as fine is about four times the faces.
-
Smoothness: how wide the bumps are that come off the surface, in gaps between particles. At 1 (the default) the lumps clumps of particles leave come off; thick, glassy liquids such as honey look best at 2 to 3. Shapes twice as wide keep their form, and thin streams stay whole. Wider takes longer to mesh.
-
Fill Creases: how wide the creases and wrinkles are that fill in. At 1 the small ones between particles go; at about 3 a thick liquid's folds melt together, as honey's do. Drops closer than this join.
-
Hold In and Out: how far the smoothing may move the surface into, and out of, the one the particles make, in gaps between them. At 0 (the default) it goes as far as it likes, and a wide Smoothness thins drops and sheets as it rounds the lumps. Held at about 0.25 in and 1 out, the lumps still come off, drops keep their size and stay apart, and Smoothness can go higher.
The first two at 0 keep every lump and crease, for pulp, jam or anything that should look rough. The Liquid operator's Preset sets both to suit the liquid.
The same panel's Surface Shape settings push the surface out or in, cut it to the camera's view, keep only the main body, carry values onto the mesh, and give each liquid a mesh of its own: see Liquid looks.
Its Render Look (Water Colour, Roughness, IOR, Foam Colour) changes the water material at once, with no new bake. To use your own material, pick it in the Render Look's material field.
Big liquids on the GPU
Liquids are the heaviest thing VecFlow bakes. On an NVIDIA card they bake many times faster, and with several cards a big liquid is shared across them, the result the same to the bit. See Compute and More than one GPU.
What goes wrong
- The water leaks through a thin wall. A wall thinner than the spacing can let particles through at speed: raise the bake's Substeps, or make the wall's mesh closed and thicker.
- The surface is lumpy. Too few particles across it: a finer Spacing, the Sheets surface, or more Smoothness.
- Splashes turn to beads. Keep Sheets is 0, or the spacing is too coarse for the splash.
- A deep tank jiggles or sinks. Lower Compression (it's how much the liquid may squeeze), or more Most Rounds.
- Fast, violent water explodes. Lower Step Size: substeps get shorter for the fastest particles.
- It shows nothing after the bake. Look for the “name Liquid” object: the liquid shows only as its surface.
- A paste flows anyway. Its Yield Stress is below what its own weight presses: a tall heap needs more. Or raise Yield Rounds.
- A paste or a stretchy liquid bakes on the CPU. These, and the other newer liquid settings, aren't on the GPU yet: the bake says so and uses the CPU.
Related
Destruction
Cut a mesh into pieces with the Fracture tool, glue them into one body, and smash it: on the ground, with a ball, or one piece at a time.
Liquid looks
Shaping the liquid's surface for the shot: pushed out or in, cut to the camera, only the main body, values carried onto the mesh, a mesh for each liquid, and wet maps on what it touches.