Skip to content

Flow Nodes

Flow nodes control the execution path and structure of a graph. They allow you to repeat transforms, split points along a condition, or delegate work to a separate graph asset.


Loop

Category: Flow
Description: Applies a transformation to points iteratively.

Ports

DirectionNameType
InputInPoint
OutputOutPoint

Settings

FieldTypeDefaultDescription
iterationsint (1–20)3Number of iterations to run.
offsetPerIterationVector3(0, 0, 0)World-space position offset added per iteration.
rotationPerIterationVector3(0, 0, 0)Euler-degree rotation added per iteration.
scalePerIterationVector3(1, 1, 1)Scale multiplier per iteration. (1, 1, 1) means no change.
accumulatePointsbooltrueControls the loop mode (see below).

Modes

Accumulate mode (accumulatePoints = true)
Each iteration duplicates all source points, applying a cumulative transform at factor i+1. The total output count is sourcePoints × iterations. Use this to create arrays, scatter copies, or fractal-like repetition.

Iterative mode (accumulatePoints = false)
The transform is applied in-place to the same set of points, building on the result of each previous iteration. The output count equals the input count. Use this to move or rotate the same points over time.

Notes

  • Scale is computed as 1 + (scalePerIteration − 1) × factor, so a value of (1.2, 1.2, 1.2) adds 20 % per iteration.
  • Transforms are applied in TRS order: translate → rotate → scale.
  • The iterations range is clamped to 1–20 in the Inspector.

Branch

Category: Flow
Description: Routes points to different outputs based on an attribute threshold comparison.

Ports

DirectionNameType
InputInPoint
OutputTruePoint
OutputFalsePoint

Settings

FieldTypeDefaultDescription
sourceSelectorPPGAttributeSelectorBuiltIn(Density)The attribute to evaluate for each point. Can be a built-in property or a custom named attribute.
thresholdfloat0.5The value to compare the attribute against.
compareCompareModeGreaterThanComparison operator (see table below).

CompareMode Values

ValueCondition
GreaterThanattribute > threshold
LessThanattribute < threshold
GreaterOrEqualattribute >= threshold
LessOrEqualattribute <= threshold

IPPGAttributeConsumer

Branch implements IPPGAttributeConsumer. When sourceSelector targets a custom attribute, the attribute name is reported as consumed so upstream nodes can produce it correctly.

Notes

  • Points exactly equal to threshold are sent to False when using GreaterThan, and to True when using GreaterOrEqual.
  • Both output ports always receive a PPGPointData object (possibly empty). Downstream nodes that require points should tolerate zero-count inputs.
  • The True and False outputs share the same metadata as the input.

Sub Graph

Category: Flow
Description: Executes another PPG graph asset as a nested sub-graph within the current graph.

Ports

DirectionNameType
InputInAny
OutputOutAny

Settings

FieldTypeDefaultDescription
subGraphPPGGraphAssetnullThe graph asset to execute. Must contain a Graph Input node to receive data.

Behavior

  1. The data arriving at In is forwarded to the sub-graph's Graph Input node.
  2. The sub-graph executes fully (instancers are skipped to avoid double-spawning).
  3. All data produced by the sub-graph's Graph Output node is forwarded to Out.
  4. Intermediate data produced inside the sub-graph is disposed after execution; only the data passed to Out (and the original In data) survives.

Recursion Protection

  • A direct or indirect recursive reference (a graph calling itself) is detected at runtime and produces an error log. Execution is aborted for the offending node.
  • The maximum nesting depth is 16. Exceeding it also aborts execution with an error.

Notes

  • If subGraph is not assigned the node logs a warning and produces no output (execution continues).
  • Sub-graph execution failures (errors in child nodes) are reported as warnings and cause the Sub Graph node to return false, stopping the parent graph at that point.
  • The node accepts and outputs Any data type, so it can wrap graphs that operate on Points, Splines, or Surfaces.

Procedural Placement Graph for Unity