Liquid
Make particles a liquid that keeps its volume: it pours, splashes and fills, floats rigid bodies and pushes cloth, with a surface mesh made by the bake.
Particles are a liquid that keeps its volume: it pours, splashes and fills, off this event's Collide objects and ground, floating and pushing rigid bodies and cloth (with those of other events with this operator: one liquid). Fill an object with it using Birth, Fill. The bake makes its surface, shown as a mesh beside the particles.
- Add it
- EventAdd OperatorPhysicsLiquid
- Sends on
- Nothing: it has no wire.
- Influence
- No: a value can’t weigh it.
When to use it
Water, juice, paint, honey, oil, lava: anything that pours. The liquid keeps its volume, so it fills containers, sloshes and splashes. Rigid bodies float in it and are carried off; cloth holds it.
Set it up
Make a closed mesh where the liquid starts (a box of water to fall), and a tank or ground for it to land in.
In an event, add a Birth with Mode Fill and the mesh as its Object, then Gravity, Liquid, and a Collide with the tank and the ground.
Bake. The liquid's surface shows as a mesh, “name Liquid”, beside the particles. Its look and how smooth it is are in the sidebar's Liquid panel.
Settings
As the flow editor’s sidebar shows them. Changing any of them marks the bake old; those marked Keyframable can also change through a bake.
How far apart its particles are: each stands for a cube of liquid this size. Half the spacing is eight times the particles, and about twice as many substeps. Every liquid in a flow has the same spacing; each may be its own density, the heavier sinking through the lighter.
How heavy for its size, in kg/m³: water 1,000, wood about 600, sand about 1,600, stone about 2,500, steel 7,850. A heavy body pushes light ones aside, and particles push rigid bodies by it.
How thick it is (kinematic viscosity, m²/s): water 0.000001, olive oil 0.0001, honey 0.002 to 0.04 (0.007 typical), melted chocolate 0.01, lava 0.05, pitch 1 and up. Preset sets real liquids'. Walls hold thick liquid back.
How hard its surface pulls itself in (N/m), so drops round up and thin streams bead: water 0.07. Felt at the scale of the spacing, so it shows only with a fine spacing, or raised.
How far thin sheets and streams are kept whole as they stretch: particles are seeded into the gaps that open in them, so a splash's crown and a thin pour hold together instead of breaking into beads. 0 for none. Seeding adds a little liquid.
Keep the air the liquid closes around: a pocket of it, like 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.
How much it may be squeezed together, on average, before the solve stops. Less holds deep tanks flatter and steadier; slower.
The share of the spacing its fastest particle may go in one substep: substeps get shorter to keep to it. Less is steadier and slower.
How far, in spacings, the objects it meets (this event's Collide objects and rigid bodies) may go in one substep: substeps get shorter to keep to it, so a body falling into still water is met layer by layer instead of being swallowed several deep in one step. 1 is a good start; 0 for no limit.
How far each substep evens out a particle's velocity toward its neighbours'. It steadies the liquid, and thickens it the finer the spacing and the shorter the substeps: 0.5 at 2 mm and 240 fps is as thick as glycerine. 0.05 to 0.1 keeps fine water lively; raise it if the liquid ripples in a checkerboard.
The air's pressure on the liquid, in atmospheres. Inside the liquid, away from its surface, the water may then pull by up to that much before it lets go, as water under the air's weight does: it closes behind a body passing through instead of letting go of its back, so bodies feel a sphere's drag, not a cavitating one's. 1 is the air's; 0 as before, pushing only. Does nothing with Trapped Air.
A number value each particle's viscosity is times (0 runny, 1 as set, 10 ten times as thick): paint it with Set Value or Property Transfer, as for lava cooling. Empty for none.
How hard it must be pushed before it flows at all (Pa): ketchup about 20, mayonnaise 80, toothpaste 150. It holds its shape below it. 0 for none.
How its thickness changes as it's sheared: 1 as water, below 1 it thins as it flows (ketchup 0.3), above 1 it thickens (cornstarch). Viscosity is its thickness sheared once a second.
How many times each substep its viscosity is worked out again from how it flows: more holds a yield stress more exactly, slower.
How hard it springs back toward a shape it held (Pa): slime 100, silicone putty 5,000. Needs Memory. 0 for none.
How long it remembers a shape (s): it forgets half of a stretch in about 0.7 of this. Short: it springs back a little and flows; long: rubbery.
The most it remembers being stretched: a cap, so a pulled strand doesn't snap back hard.
A strain past which it forgets the stretch beyond: pulled that far, it tears instead of springing back. 0 never.
How much it draws out into strings and threads as it's pulled apart: honey, glue, cheese. 0 for none.
Keeps swirls going that the spacing would smear out (m²/s): each particle spins and trades spin with the liquid's turning. 0 for none; 0.1 to 0.5 livens a splash.
A particle with no liquid and no wall about it for this long is deleted: stray drops that would only fly off. 0 never.
Sheets older than this aren't kept whole: an old splash parts into drops. 0 for any age.
Kept whole only where it pulls apart this fast at least and at most (m/s). Both 0 for any speed.
Kept whole only where it parts along its way, within this angle of it: streaks along a pour, not across it. 0 for any way.
Lets threads part into drops while sheets are kept whole: no seeding along a thread. 0 keeps threads too.
Where it meets another liquid, pull by this tension instead of its own (the two's average): oil on water, 0.02.
How fast its colour runs into the colours of the liquid about it (a rate a second): inks swirling together. 0 for none.
Spacing: the detail, and the cost
Each particle stands for a cube of liquid Spacing across. Finer spacing shows smaller drops and thinner sheets, but half the spacing is eight times the particles and about twice as many substeps: some sixteen times the work. Start coarse (the default is 5 cm; the Liquid starter uses 3), and use Draft, which doubles it, for quick looks.
Every Liquid in a flow is one liquid, with one Spacing and Density.
Thick and sticky
Viscosity is in real units (m²/s): water 0.000001, olive oil 0.0001, honey 0.01, molten chocolate 0.05, pitch 1 and up. Walls hold thick liquid back.
Surface Tension (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 spacing, or turned up.
Keep Sheets and Trapped Air
Keep Sheets keeps thin sheets and streams whole as they stretch, seeding particles into the gaps that open in them, so a splash's crown and a thin pour hold together instead of breaking into beads. It adds a little liquid. 0 turns it off.
Trapped Air keeps the air the liquid closes round: a pocket under an upside-down cup holds its volume and pushes back instead of filling with liquid. Rigid bodies and cloth close it in too, and the air pushes back on them: a plate dropped over a sealed tank hangs on its air, a body plunging into a closed jar squeezes it, and the cavity a falling body drags down pulls on the body until it pinches off. It costs time; leave it off unless the shot needs it.
Solver settings
Compression, Most Rounds and Step Size trade speed for steadiness. Less Compression holds deep tanks flatter and steadier. A smaller Step Size shortens substeps for fast, violent liquid. Object Step does the same for the objects the liquid meets, its Collide objects and rigid bodies: how far, in spacings, one may go in a substep. Still water has no fast particles, so without it a body falling in is swallowed several layers deep in one substep and the water answers late and hard; 1 is a good start, 0 turns it off. Smoothing is how far each substep evens out a particle's velocity toward its neighbours'. It steadies the liquid, and it thickens it the finer the spacing and the shorter the substeps: at 2 mm and 240 fps the default 0.5 is as thick as glycerine, and a ball dropped in feels twice a sphere's drag. 0.05 to 0.1 keeps fine water lively; raise it if the liquid ripples in a checkerboard. Air Pressure is the air's weight on the liquid, in atmospheres. The liquid's pressure is measured from its surface, where it is nothing, and it only pushes; so once a body goes faster than its depth's pressure can follow (about 1.3 m/s at 10 cm down) the water lets go of the body's back as if it cavitated, and the body feels twice a sphere's drag. With Air Pressure 1 the water inside, away from its surface, may pull by up to an atmosphere, as real water does: it closes behind the body and the drag is a sphere's. 0, the default, is as before. With Trapped Air the water at a bubble's surface still holds no tension against its air; the rest may pull. The defaults suit most shots. See Quality and seeds.
Works with
- Collide: its objects and ground are the liquid's walls. A collider's mesh holds liquid off both its sides, so an open box is a tank. Moving walls carry the liquid.
- Rigid Body in another event: bodies float by their density, and are carried off.
- Bind Mesh Edges in another event: cloth holds liquid and is pushed by it.
- Whitewater, in the same event, for spray, foam and bubbles.
- An event takes one Liquid, and can't also hold Particle Physics, a Rigid Body, Bind, Flock, Pin, Follow Curve or Goal.
Problems you may see
event: a Liquid flows on its own, so it can't take operator as well
A Liquid moves its particles itself; an operator that moves them too can't share its event. Move the operator to another event.
event: operator: an event takes only one
Rigid bodies float in a Liquid only with the engine's own solver: with this build the liquid flows through them
This engine build can't make rigid bodies float. Install the current VecFlow zip.
Errors stop a bake; warnings don’t. Every message is on the Messages page.
Related
Rigid Body
Make particles solid bodies that tumble, hit each other, stack and come to rest: bricks, crates, rocks, debris, dice; each the shape it shows.
Whitewater
The liquid makes spray, foam and bubbles where it crashes or crests, each sent along its own wire to an event that says how long it lasts.