Copying & instancing

Make many copies of one thing, laid out in space — without modelling each one, and without grinding to a halt.

What instancing is

Instancing means stamping out many copies of a template — a grid of tiles, dots along a path, a forest of one tree — where each copy can have its own position, rotation, scale, and colour, but DNA keeps only one real copy of the geometry behind the scenes. That's the magic: a million instances cost almost the same to carry as one, so big layouts stay smooth.

It's different from genuinely duplicating geometry (which makes a million real copies and gets heavy fast). Reach for instancing whenever the copies are the same thing placed differently.

The Iterator

utility.iterator is the workhorse. Feed it a template and pick how the copies are laid out:

Crucially, each copy knows which copy it is. While it builds them, the Iterator hands every copy its own values to read — @index (which copy), @id (a stable id), @total (how many), @index_x/y/z (row/column/layer in a grid), @path_t (how far along a path, 0→1). So "scale each copy a bit more than the last" is just reading @index; "fade copies along a path" is just reading @path_t. You author the relationship once and every copy fills in its own number — that's per-element context at work.

Each per-copy input (rotation, offset, scale, colour…) takes either a single value — shared by every copy — or a list, where each copy reads its own entry.

Stamp: instancing by hand

When you want to place copies yourself rather than distribute them procedurally, utility.stamp lets you click and drag in the viewport to drop each instance, setting its position, scale, and rotation as you go. Same idea — one template, many lightweight copies — but art-directed.

A common recipe: scatter, then instance

Pair sop.scatter with the Iterator: scatter points across a surface, shape, or volume, then use the Iterator in Points mode to put a copy of your template on each point. Drive per-instance variety straight from the points' attributes (their @id, position, or any value you've added), and you get a natural, non-repetitive spread.

Instancing vs looping

These get confused because both "repeat" — but they're different jobs:

The short version: instancing places copies; a loop repeats a computation.

A single value handed to every copy gives you… identical copies. To get variety, read a per-copy attribute (@index, @path_t) or feed a list instead of one value.

See also