Cloth, ropes and soft bodies
Flags, sheets, curtains, ropes and wobbly things: particles born on a mesh, bound along its edges, hung, torn and draped, played back as your own mesh.
Cloth in VecFlow is particles on a mesh's vertices, held together along its edges by binds. The particles do the physics; the bake plays your mesh back moved by them, with its UVs and materials.
Cloth
Make the cloth as a mesh: a plane subdivided to about 30 to 60 vertices across. More is finer folds and a slower bake.
In a flow, give an event a Birth On Vertices with the mesh as its Object, then Gravity, a Bind with Make Mesh Edges, and a Collide with what it falls on.
Bake. The cloth plays as a copy of your mesh called “mesh (VecFlow)”, with its UVs and materials. Hide the original.
Bound particles are held out of the event's colliders and slide on them by their friction, without bouncing, so cloth drapes and holds on a slope.
Hanging it up
To hang cloth by some of its vertices (a flag's edge, a curtain's top, a sheet's corners):
Put those vertices in a vertex group, at weight 1.
Add a Group Test to the cloth's event, naming the mesh and the group, wired to a new event.
In the new event, add a Pin: with no Object they hold still; with one (a pole, a curtain rail, a character's shoulders) they move with it.
Binds hold across events, so the held particles carry the rest. For wind, give Drag a Wind: the cloth is pulled along with the air. A little Turbulence breaks it into ripples.
How it behaves
| To make it | Change |
|---|---|
| Stretch less | Stiffness 1 (the default) holds every edge's length. More Rounds hold it tighter still on big cloths |
| Heavier or lighter | Spring above 0, with Density in kg/m²: silk 0.05, cotton 0.15, denim 0.4, canvas 0.6. The same spring holds silk taut and lets canvas sag |
| Fold freely or lie smooth | Bend: 0 folds freely (sharp folds can stand up and wobble), 0.3 lies smooth and calm, 1 keeps its shape. A finer mesh bends more easily |
| Settle sooner | Damping up: wobbles die down faster |
| Fold over and pile on itself | Self Collision on, with Thickness about the cloth's own: layers keep that far apart. Slower: use it for drapes and crumples, not for a flag |
| Hold still once it's down | Sleep Below: once all of it moves slower than this for half a second, it sleeps until something disturbs it |
Tearing
A bind breaks when stretched past Break Stretch times its length (1.5 is half again), or when it pulls harder than Break Force: holding one hanging particle takes 9.81. Variation spreads each bind's limit, so tears wander instead of running straight. Torn cloth shows holes along its torn edges.
Particles losing a bind go along the Bind's wire: send them to an event that colours them, or lets them fall away.
Ropes and cables
A mesh with only edges makes a rope: draw a curve, then ObjectConvertMesh. Birth On Vertices and Bind Mesh Edges as for cloth; pin an end with a Group Test.
Its output object shows it as a tube: set Thickness and Material on the output's VecFlow Mesh modifier. With Self Collision, a rope coils as it piles up.
A rope can also be paid out as it goes: a Birth Every Frame from a moving emitter, and Bind Make Chain, which binds each particle to the one born before it.
Soft bodies and goo
- A soft body: fill a shape with particles (Birth All at Once, a Position Volume) and Bind them Nearest, each to its neighbours within Distance. A Stiffness below 1 makes it wobble; add Particle Physics so it doesn't pass through others.
- Sticky goo, clumping snow: Bind On Touch binds any two that come within Distance, all the time. A low Break Stretch lets the strands pull apart again.
Soft bodies and goo show as their particles, not as a mesh.
What goes wrong
- The cloth passes through itself. Turn on Self Collision.
- It stretches like rubber. Stiffness below 1, or too few Rounds for a big, heavy cloth. With Spring, the Spring is too weak for its Density.
- The pinned edge drops a little at the start. Pinned particles are held from the step after they're born, so they fall a few millimetres first. Start the bake a few frames before the shot.
- It never quite comes to rest. Raise Damping. Sleep Below lets it hold perfectly still once it has all but stopped.
- No “(VecFlow)” object. Only Birth On Vertices makes one: particles from other births show as particles.
- The output has no UVs or materials. It copies the mesh the Birth was on: give that mesh its UVs and materials, then bake again.
Related
- Bind, Group Test, Pin
- Liquids: cloth holds water and is pushed by it
Following curves and forming shapes
Particles that run along a path, spiral round it, and fly in to form a logo, a word or a mesh, on cue; a logo reveal start to finish.
Rigid bodies
Bricks, crates, rocks and dice that tumble, stack and come to rest; bodies moved by hand; and joints for chains, doors, wheels and drawers.