Skip to content

CloneIndex ​

The per-copy iteration variable: outputs which instance is currently being evaluated, so a DrawInstances source chain can vary per clone — a "for loop" over copies.

Category: Utility Menu path: Utility > Clone Index

Ports ​

PortTypeDirectionDescription
indexscalaroutputCurrent clone index, 0 … count−1. An order, not an identity — it renumbers when the driving points change membership
countscalaroutputTotal number of clones (the point count)
normalizedscalaroutputindex ÷ (count−1) — 0 at the first clone, 1 at the last. An order too, like index
randomscalaroutputSeeded per-clone hash in [0, 1), keyed on the driving point's id — a clone keeps its value for its whole life, whatever happens to its neighbours

Parameters ​

ParamTypeDefaultDescription
seedscalar0Seed for the random output

How It Works ​

Place a CloneIndex anywhere in a chain feeding a DrawInstances node. DrawInstances detects it and switches to per-clone evaluation: the source chain re-runs once per instance with index set to 0, 1, 2, … so anything wired from CloneIndex — a Math expression into a shape's radius, a rotation, a color ramp position — takes a different value in each copy.

Outside a per-clone evaluation (previewing the chain directly, or with perClone set to Off) the node reads index 0 of count 1, so the graph still renders sanely.

Usage Examples ​

Basic: five copies, each rotated by its index ​

CloneIndex.index → Math (Multiply ×15) → Transform2D.rotation_in inside the source chain of a DrawInstances over 5 points: copy 0 sits at 0°, copy 1 at 15°, copy 2 at 30°…

Ramped sizes across a grid ​

CloneIndex.normalized → Math (Remap 4→40) → Circle.radius_in → DrawShape → DrawInstances ← Grid: circles grow smoothly from the first grid point to the last.

Per-copy random variation ​

Wire random into any parameter for stable, per-copy randomness that doesn't flicker over time (unlike a Noise sampled per frame). On a particle stream it follows the particle: random is keyed on the point's id, so a copy keeps its value as other particles are born and die. index and normalized are positions in the stream and do renumber on every birth and death — reach for them when you want "first to last", not "this one's own value".

Tips ​

  • Per-clone evaluation runs the source chain once per instance every frame — the cost is N × chain cost. Keep the chain light, or cap it with DrawInstances' maxClones (excess clones share renders round-robin).
  • For variation that's just scale/rotation/opacity/color per point, PointAttributes with an Index-mode ramp is far cheaper — it varies attributes without re-evaluating the chain. Reach for CloneIndex when the content of each copy must differ (different geometry parameters, different effect settings).
  • Combines with DrawInstances time offsets: each clone gets both its own index and its own time offset.
  • DrawInstances' selectionMode controls which clone render each point shows: Sequential = in point order, Random = seeded shuffle keyed on the point, Point Index = the shapeIndex column written on each point (via PointAttributes' Custom target — assign variants spatially with a field).
  • DrawInstances — the consumer that activates per-clone evaluation
  • PointAttributes — cheaper index-driven variation for transform-level differences
  • Time — the analogous "context variable" node for time instead of clone index