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

ParameterTypeDefaultWhat it does
inputCollection—Shapes to add index attributes to
reference_pointsCollection or Vec3[]—Reference points for Voronoi grouping (seed positions)
reference_curveCurve—Reference curve for Along Path grouping
group_byString"None"How to group shapes for indexing
custom_attributeString""Attribute name to group by (e.g., @layer, @category)
splitBooleanfalseWhen enabled, output becomes a list of sub-collections (one per group) instead of the annotated collection
hierarchicalBooleanfalseAdd @group_index, @local_index, @local_total, @local_u per group
offsetNumber0Offset added to final index: final = group_idx * stride + offset. Renumbers ids — does NOT reorder groups (sort the rows for that).
strideNumber1Multiplier for index spacing: final = group_idx * stride + offset. Renumbers ids — does NOT reorder groups, so -1 will not reverse a run; sort the rows for that.
wrapNumber0Wrap index using modulo (0 = no wrap) — folds several groups onto one id. Renumbers, does not reorder.
size_bucketsNumber5Number of equal-area buckets for Size grouping
reference_pointVec2(0, 0)Distance reference point (X, Y)
bandsNumber5Number of equal-distance bands
grid_columnsNumber4Number of grid columns
grid_rowsNumber4Number of grid rows
grid_detectionString"Auto"Auto-detect rows/columns or specify manually. One of: Auto, Manual.
manual_columnsNumber4Number of columns (Manual mode)
cluster_radiusNumber50Maximum distance between shapes to be considered in the same cluster
min_neighborsNumber0Minimum neighbors within radius to form a cluster core. 0 = all points cluster (connected components). Higher values filter sparse outliers to noise group -1 (DBSCAN).
strengthNumber1Effect strength / wet-dry (0 = no effect, 1 = full). Editable, wirable, keyframable.

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