VecFlow0.1.0
Flows

How order and mixing matter

The rules of a flow: what order operators go in, what one event can hold, what can't share an event, and what works across events.

VecFlow 0.1.0

Operators in an event run top to bottom, and some can't share an event. The editor checks all of it as you work, and says what's wrong in plain words. This page gathers the rules in one place.

Order in the stack

An operator sees what those above it did. Within a step, each operator works on the particles as the ones above left them. So:

  • Speed goes above Position on a surface. Position's Speed Out and Inherit Motion add to the speed particles have; a Speed below it sets their speed afresh, and replaces both. The editor warns: “Speed below Position replaces its speed. Move Speed up”.
  • Set Value goes below what it reads. A Set Value reading the particle's speed sees the speed a Speed above it gave; above it, it sees the speed they came with.
  • Tests: the first match wins. Once a test picks a particle out, the tests below leave it alone that step. Put the test that matters most first. A Delete above a test removes particles before the test sees them.
  • Speed in a Goal's event sets how particles set off toward their targets: Goal takes them after the rest of the stack has run.

Position in a Box or along a Curve needs a Birth above it, in the same event: it places those births as they're made, so it can't place particles arriving along a wire. On a Surface or in a Volume, it places every particle as it enters the event, born there or sent there.

A Sweep along a curve runs as the births go from their first frame to their last, so the Birth above must Stop.

One per event

An event can hold only one each of:

A second one is an error: “an event takes only one”. To use two Binds (say, cloth along its edges and sticky on touch), put the particles in two events.

What can't share an event

These move particles their own way, so they can't take another that moves them too:

In the eventCan't also haveBecause
Rigid BodyParticle Physics, or Pin (unless the bodies are Kinematic)A rigid body moves on its own
LiquidParticle Physics, Rigid Body, Bind, Flock, PinA liquid flows on its own
Follow Curve or GoalCollide, Particle Physics, Bind, Rigid Body, Liquid, Flock, PinThey take particles where they go, through anything
A steered Follow CurvePinPin holds them, so it can't steer them

A Follow Curve (not steered) or Goal also isn't moved by the event's forces: Gravity, Drag, Turbulence, Attract, Swirl and Particle Force do nothing to its particles, and the editor warns. A steered Follow Curve feels them all, and the event's colliders too.

To have particles follow a curve and then fall, send them on (from the curve's end, or by an Age Test) to an event with Gravity and Collide.

What needs something else

OperatorNeeds
Birth, FillA Liquid in the same event: it fills with that liquid
WhitewaterA Liquid in the same event, and a wire from Spray, Foam or Bubbles to another event
SpawnA wire, to another event
Struck TestA Rigid Body in the same event
Bind, Mesh EdgesA Birth On Vertices in the same event (a warning: it binds nothing without one)
Bind, PiecesA Birth On Pieces in the same event (a warning too)
Rigid Body, Hull or ConcaveA Shapes collection, or a Birth On Pieces: they take each particle's shape
Rotation, BankKeep Doing It on (a warning: it does nothing without it)
Operators naming an objectThe object, of the right kind: a curve for Follow Curve, a mesh with vertices for Birth On Vertices

And the flow as a whole needs at least one event, and a Birth somewhere. An event that nothing is born in or sent to is a warning: its operators never act.

Across events

Particles in different events meet when both events have the same operator:

  • Particle Physics: they bump into those of every event with it.
  • Particle Force: they pull (or push) those of every event with it.
  • Flock: they flock with those of every event with it.
  • Rigid Body: they hit the rigid bodies of every event.
  • Liquid: every Liquid in the flow is one liquid. They all share one Spacing and Density.
  • Bind: cloth with Self Collision keeps out of other cloth and ropes with it on.

Colliders are per event: a Collide works only on its own event's particles. Give each event the Collide it needs.

A Goal can take another event's particles as its targets.

On this page