Skip to content

Loops, For Each and Solvers ​

A Loop runs part of a node graph several times in one frame. A Solver runs part of a graph once per frame and carries the result from one frame to the next. Both are built the same way: two boundary nodes, an In and an Out, and whatever you wire between them.

Add them from the node menu's Loop category:

EntryWhat it makes
LoopLoop In + Loop Out, running a set number of passes
For Each PointA Loop that runs once per point of a stream
For Each PathA Loop that runs once per path of a shape
SolverSolver In + Solver Out, carrying values from frame to frame
SwitchA node that picks one of its inputs — not a zone, but at home inside one

Adding a Point Emitter with auto-wire on builds a complete particle system: the emitter feeding a Point Solver inside a Solver, drawn with Draw Points. Picking Point Solver from the menu builds the Solver around it. A Point Solver only moves particles by one frame, so one outside a Solver shows a NO SOLVER badge.

The frame ​

Each loop or solver is drawn inside a frame, in the same style as a node group: blue for loops, coral for solvers. Its label shows the settings (LOOP × 12 · FEEDBACK, FOR EACH POINT · JOIN, SOLVER). A dashed arrow above the frame, labelled Next pass or Next frame, shows the value travelling back from the Out to the In.

The frame's left and right edges run through the middle of the In and Out nodes. Their left-hand ports are outside the zone (values coming in, results going out) and their right-hand ports are inside (the values in play on each pass).

Drag the frame to move the whole zone.

What is inside ​

A node is inside a zone because of how it is wired, not where it sits. Anything that depends on the In and feeds the Out is part of the zone and runs every pass. Nodes that only feed the zone from outside (a shape it copies, a noise field it samples) stay outside and are computed once, which keeps loops fast. A node you drop over a frame without wiring it is not part of the zone, and the frame does not grow to include it.

A wire that leaves a zone other than through its Out gets nothing, because the node it comes from only exists inside the loop. Those wires are drawn dashed in red; route the value through the Out instead.

Zones can sit inside other zones (a Loop inside a Solver, a Loop inside a Loop). A Solver has to be at the top level.

Values ​

The things that travel through a zone — a shape, points, an image, a number, a vector or a colour — are its values. Each value appears as a matching port on the In and the Out. A ↺ beside a value means it is carried forward: into the next pass (a Loop in Feedback mode) or the next frame (a Solver).

  • A new zone starts with one value, In. It takes whatever you wire into it and becomes that type; unwire it completely and it is open again.
  • + add value at the bottom of the In node adds another (B, C…).
  • Remove one from the Values list in Properties; its wires go with it.

Settings ​

Select the In or the Out: both show the zone's settings in Properties.

  • Loop: Iterate Over (Count, Points, Paths), Count, Mode (Feedback: each pass works on the previous result; Join: every pass is collected), Join Images (how joined pictures composite), and Preview Pass (which pass the Node Preview and Debug nodes inside show).
  • Solver: Pre-Roll (frames simulated before the layer starts).

See Loop In and Solver In for the details, and Switch for choosing between branches.

Editing ​

Deleting, copying or duplicating either end of a zone takes the other end with it — an In without its Out does nothing.

Clean up node layout (node graph toolbar) knows about zones: nodes feeding a zone from outside go to the left of its In, unrelated nodes are kept out of its frame, and nested frames get room for their labels.