Logic node
Replicator
The visual sibling of the Loop node: a dive-in container that holds exactly one generator chain (plus the data nodes feeding its parameters) and renders it N times into a single offscreen texture — one clone per iteration, each seeing its own Iteration Index / T / Count. From the outside, the Replicator is a perfectly ordinary generator with Image, Width, and Height outputs: one texture, one Canvas, no per-clone memory explosion.
Inputs
| Port | Type | Default |
|---|---|---|
| EnableOff clears the image and skips the whole replication — none of the internal chain runs. | bool | true |
| IterationsHow many clones of the internal generator get drawn, each seeing its own Index and T. Clamped to 0…256; every clone is a full draw, so fill rate is the real budget. | int | 10 |
Outputs
| Port | Type |
|---|---|
| Image | image |
| Width | float |
| Height | float |
| Count | int |
How It Works
Double-click the Replicator to enter its body. Inside you place one generator (Circle 2D, Rectangle, Text as Image, Image, …) and any data nodes that drive its inputs — typically an Iteration node feeding Math into the generator's position, scale, rotation, or color. A second renderable child is refused at insertion (containerMaxRenderableChildren: 1).
Execution is split between CPU and GPU:
- CPU (render-command phase): the Replicator evaluates its data body N times through the same shared body evaluator as the Loop — children topologically ordered by their internal cables, loop-invariant children (not downstream of Iteration) evaluated once, varying children once per pass, the Iteration node seeded with
Index,T,Countbefore each pass. For every pass it calls the internal generator's own render-command builder with that iteration's resolved inputs, snapshotting N child commands into one Replicator command. - GPU: the Replicator's renderer looks up the child generator's renderer in the registry and replays the N commands into the Replicator's single render pass — standard premultiplied-alpha generator blending, exactly like N sibling shapes drawn into one texture.
Change detection. The whole pipeline is gated by the same body fingerprint the Loop uses (iteration count, topology, every child parameter including live drags, bridges, resolved published-input values — plus the Replicator's render layer). An unchanged fingerprint reuses the cached command array, and because the command is identical, the downstream texture-reuse layer can skip the GPU work entirely: a static replication is close to free. Bodies containing live nodes (Time, Get Variable, Render Size) rebuild every frame.
Values in. Connect anything to the wildcard + input to publish it into the body — a boundary port is created and an internal Port node is auto-created and bridged, exactly as on Loop and Macro Groups. Published inputs are constant across the N clones of one frame; per-clone variation always comes from the Iteration node.
Clone-data arrays out. Publish any internal data output (a Math result, a computed X/Y) via Inspector → Published Ports, and the boundary port emits a .structure array with one element per clone — the very numbers that placed the clones, exported so other objects can follow them. These arrays are collected during the render-phase body evaluation and served by the node's data output on the next process pass, so a data consumer is at most one frame behind the pixels. Published names that collide with the fixed outputs (Width, Height, Count, Image) are skipped — rename the published port.
Child policy (v1). The Loop's data allowlist plus the Generator category:
| Rule | Nodes |
|---|---|
| Allowed categories | Math, Logic, Array, String, JSON, Color, Structure, Generator |
| Allowed by name | Constant, Get Variable, Time, Render Size, Iteration, Port, Reroute, Comment Box |
| Blocked (stateful/event) | Smooth, FFT, Integrator, Counter, Do Once, Delay, Array Accumulate, Array Sample, Array Set |
| Blocked (device-bound generator) | Audio Spectrum |
| Blocked (no nesting in v1) | Loop, Replicator |
When Enable is false, the body is empty, or Iterations is 0, the render pass clear leaves a transparent texture (the standard generator contract) and the caches are dropped. Deleting the Replicator deletes its entire body.
Parameters in Depth
Enable (bool, default true) — master switch. Disabled, the Replicator outputs a cleared, fully transparent texture; nothing is evaluated or drawn. Accepts a bool cable or a float (treated as true above 0.5).
Iterations (int, default 10) — the clone count, clamped to 0…256. Each clone is a full generator draw into the shared texture, so the real budget is GPU fill-rate, not node count: 256 full-screen clouds are very different from 256 small circles. Connected ints or floats are accepted (floats truncated).
+ (wildcard, any type) — publish-input port. Each connected cable becomes a named boundary input bridged to an auto-created internal Port node; a fresh + appears below. Use it to drive the whole replication from outside — a radius from an LFO, a color from a Gradient, an array to index per-clone.
Image / Width / Height (outputs) — the standard generator triple. The texture always spans the full viewport in Grafit units (Width = 2 × max(aspect, 1), Height = 2 / min(aspect, 1)), so a Canvas in Auto size covers it exactly; clones position themselves inside that space via the internal generator's own coordinates.
Count (int output) — the clamped clone count actually rendered this frame. Any published clone-data outputs appear below it as structure-array ports.
Use Cases
- Row of shapes: Circle 2D inside; Iteration
Index→ Math (Multiply by 0.1) → CirclePosition X. Ten circles in a row, one cable to one Canvas outside. - Ring of clones: Iteration
T→ Math (Multiply by 360) → Math sin/cos → generator X/Y; publish a "Radius" input through+and breathe the whole ring with an LFO from outside. - Typographic rain: Text as Image inside, with per-clone X offset from
Indexand Y fromT; publish a speed input and drive it with Time for falling glyph columns. - Image mosaic: an Image generator inside, Iteration-driven position and scale — N copies of one asset arranged into a grid or spiral, still a single texture and a single Canvas.
- Audio-reactive bar field: Audio FFT outside → its array into
+; inside, Array Get with IterationIndexpicks the band and drives a Rectangle's Height — a spectrum built from real clones. - Follower objects: publish the internal X/Y Math outputs as clone-data arrays, then index them outside with Array Get to pin a UI Text label or another Canvas onto a specific clone's position.
Tips
- Iterations is capped at 256 and each clone is a full generator draw — fill-rate is the budget. For hundreds or thousands of small elements use the Particle System or the Points system instead; those are GPU-instanced.
- Exactly one generator chain is allowed in the body (v1). To replicate a composite look, bake it first (e.g. one Image or a single richer generator) rather than trying to add a second renderable child.
- A static replication costs almost nothing after the first frame — the fingerprint cache reuses the command array and the texture is not re-rendered. Adding a Time node inside forces a full rebuild every frame; prefer publishing animated values in through
+so the cache invalidates only when the value actually changes. - Published clone-data arrays update on the render cadence and lag the pixels by at most one frame — fine for followers and labels, but remember it when frame-exact sync matters.
- Per-clone state is undefined in v1 — stateful nodes (Smooth, Counter, Delay…) are blocked inside. Compute stateful signals outside and publish them in.
- The
Toutput of Iteration hits both 0.0 and 1.0; for closed rings where the first and last clone would overlap, derive the angle fromIndex / Countvia Math instead.
Open Replicator in the interactive catalog →
Replicator is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.