DrawInstances
Stamp a rendered texture — an image, a whole effect chain, or another layer's output — at every point in a Points set, with per-point rotation, scale, opacity, and color tint.
Category: Render Menu path: Render > Draw Instances
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
in | imageRgba16f | input (multi) | Source palette: connect one or more textures. Per-point selection cycles/randomizes across them (like CloneToPoints' Shapes input, but in the texture domain) |
points_in | points | input | Points to stamp at. Also accepts a Shape (its vertices are used) |
out | imageRgba16f | output | All instances composited in point order |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
scale | scalar | 1.0 | Uniform scale multiplier on top of per-point scale attributes |
rotation | scalar | 0 | Extra rotation in degrees on top of per-point rotation attributes |
opacity | scalar | 1.0 | Uniform opacity multiplier on top of per-point opacity attributes |
anchor | vec2 | 0.5, 0.5 | Which point of the stamp rect lands on the target point. (0.5, 0.5) = center, (0, 0) = top-left |
fitMode | enum | None | None stamps content at natural size. Fit scales content to fit inside the cell (contain). Fill crops content to the cell's aspect and fills it exactly (cover) |
cellSize | vec2 | 200, 200 | Cell dimensions in comp px (when fitMode ≠ None) |
cornerRadius | scalar | 0 | Rounded-rect mask radius in px, applied in stamp-local space so it rotates/scales with each instance |
selectionMode | enum | Sequential | How each point picks its variant — palette source in palette mode, clone render in per-clone mode: Sequential (in point order, i mod N), Random (seeded hash), Point Index (reads the point's index — write it with PointAttributes' Index target; shapeIndex also honored) |
seed | scalar | 0 | Seed for Random selection / Random time offsets |
group | string | "" | Attribute-name filter — only points whose named scalar attribute exceeds the threshold receive an instance. Empty = all points |
groupThreshold | scalar | 0.5 | Threshold for the group filter |
timeOffsetMode | enum | Off | Per-instance time offsets: Sequential (i × offsetFrames cascade), Random (shuffled over the same span), Attribute (per-point scalar × offsetFrames) |
offsetFrames | scalar | 2 | Frames of offset per step |
offsetAttribute | string | index | Point attribute driving offsets in Attribute mode |
maxTimeSamples | scalar | 8 | Offsets are quantized into this many distinct sample frames (max 32) |
perClone | enum | Auto | Auto re-evaluates the source chain once per instance when a CloneIndex node is upstream. Off disables per-clone evaluation |
maxClones | scalar | 32 | Cap on per-clone re-evaluations; excess clones share renders round-robin |
Expose Channels
When enabled (E button on node header), adds input ports that override params via edge connections:
| Port | Type | Overrides |
|---|---|---|
scale_in | scalar | scale |
rotation_in | scalar | rotation |
opacity_in | scalar | opacity |
How It Works
DrawInstances is CloneToPoints for pixels. Each source input is captured as a stamp (its content rect — an image's actual dimensions, or the comp area for effect chains and generators) and drawn once per point as a GPU-instanced textured quad, reading the same per-point attributes CloneToPoints reads: rotation (radians), scale (scalar or per-axis vec2), opacity, and color (RGB tint). All instances render in a single MSAA draw call; point order is paint order, so later points stack on top.
With time offsets, each instance samples its source chain at frame − offset, re-evaluating the chain live at the offset frames (quantized to maxTimeSamples buckets). The result is a pure function of the timeline — scrubbing anywhere always renders the same picture.
With a CloneIndex node in the source chain, the chain is re-evaluated once per instance with a distinct index — each copy can drive any parameter from its own index (see CloneIndex). selectionMode then controls which clone render each point shows: Sequential assigns in point order, Random shuffles (seeded), and Point Index reads the index written on each point — so a field written through PointAttributes' Index target can assign clone variants spatially.
Usage Examples
Basic: Clone an effect chain to points
Build Circle → DrawShape → Glow, connect its output into DrawInstances in, and a Grid into points_in. Every grid point gets the full glowing-circle render. Drive per-point variation with PointAttributes (scale, rotation, opacity, color — including Index-mode ramps).
Image grid: photos in animated cells
Connect several images into in (they cycle per point), set fitMode to Fill with a square cellSize and a cornerRadius — mixed-aspect photos become uniform rounded tiles. Animate the points (keyframed Transform2D in geometry mode, PointDeform, PointsAlongPath) and the tiles travel in formation.
Clone another layer
Add a LayerSource, pick the layer, wire it into in. The layer's rendered output — animation, effects and all — stamps at every point.
Staggered copies
Set timeOffsetMode to Sequential with offsetFrames 3: each instance plays the source animation 3 frames behind the previous one — a cascading wave from a single animated source.
Tips
- The stamp for a shape/effect chain is the whole comp picture, re-anchored at each point — content offset from comp center stays offset from the point. Center your source content for predictable stamping.
- Point order = paint order.
PointDelete/sorting upstream controls stacking. - Time offsets re-run the source chain per sample frame. For expensive chains, put a FileCache upstream — offset frames then read from disk (the same guidance as Echo/Slitscan). The node shows a "may be slow" chip when this applies.
- Per-clone evaluation costs one full chain eval per instance per frame — keep the chain light or
maxClonesmodest. - Sources are capped at 16; total render layers (sources × time samples) at 32.
Related Nodes
- CloneToPoints — the vector-domain counterpart (instances live geometry instead of rendered pixels)
- CloneIndex — per-instance iteration variable for per-clone evaluation
- PointAttributes — write the per-point rotation/scale/opacity/color this node reads
- LayerSource — bring another layer's render in as a stamp source
- DrawPoints — simple colored dots when you don't need a texture per point