Partition

Partition elements into indexed groups by attribute, text structure, or spatial proximity.

What it does

Partition assigns index attributes, @index, @id, @total and @u, to every shape in a collection according to how they are grouped. With Group By at None each shape gets a sequential index. With any other Group By, shapes sharing a group (the same word, the same colour, the same grid cell) receive the same index, and @u gives a normalised 0–1 position through the groups for driving colour, size, or timing per group.

Group By covers three families: attribute-based (an existing column, text structure such as Words or Lines, or a Custom attribute name typed in), bucketed (Size, or Distance from a point, into equal bands), and spatial (Spatial Grid, Row/Column, Voronoi cells from reference points, position Along a reference curve, or Proximity clustering). Hierarchical adds per-group numbering (@group_index, @local_index, @local_total, @local_u) alongside the overall index.

When to use it

ParameterTypeDefault
inputOneOf([Collection])
reference_pointsOneOf([Collection, Vec3Array])
reference_curveOneOf([Curve])
group_byString"None"
custom_attributeString""
splitBooleanfalse
hierarchicalBooleanfalse
offsetNumber0
strideNumber1
wrapNumber0
size_bucketsNumber5
reference_pointVec2(0, 0)
bandsNumber5
grid_columnsNumber4
grid_rowsNumber4
grid_detectionString"Auto"
manual_columnsNumber4
cluster_radiusNumber50
min_neighborsNumber0
strengthNumber1

Gotchas

The Group By dropdown also lists any groupable attribute already present on the input, prefixed with @ (for example @layer). Picking one is identical to choosing Custom and typing that name, and only dense integer, boolean, or text columns are listed. Colour and Size are always offered; presets such as Words or Lines appear only once the matching attribute is present.

Proximity clustering treats Min Neighbors as an optional density filter. At 0, every shape within Cluster Radius of another joins a cluster. Raise it and shapes with too few nearby neighbours are dropped into a separate "noise" group rather than forming their own small cluster.

Voronoi needs points wired into Reference Points, and Along Path needs a curve wired into Reference Curve. Both pins appear only after the matching Group By mode is picked.

Split is meant to turn the output into a list of sub-collections, one per group, instead of the single annotated collection. That behaviour is not wired up yet: turning Split on returns the same annotated collection, without the index-shaping controls (Offset, Stride, Wrap), which apply only to the non-split output.

Worked example

  1. Add a Partition and wire in a collection of shapes (or a Text node's output).

  2. Set Group By to Words (or Lines) to index shapes per word instead of per character.

  3. Read @u (the Normalized output) into a Colour node's ramp position, so each word gets a distinct colour across the group.

  4. Turn on Hierarchical for per-group local numbering alongside the overall index.

See also

Sort · Separate · Color Map · Attributes