Sort

Sort points, geometry, or primitives by attribute, distance, or direction.

What it does

Sort reorders whatever comes in. Points, geometry, or shapes are reordered by an attribute, by position along an axis, by distance from a point, in a spiral, or shuffled with a random seed. An image or a Volume has its pixels or Z-depth slices reordered instead: rows or columns sorted by brightness, a colour channel, or density, with an optional pass to accumulate, blend, or take the maximum across the sorted stack.

The mode list and the parameters shown follow what is wired into Input.

When to use it

ParameterTypeDefault
inputOneOf([Collection, Field, FieldOf(Color)])
sort_typeString"Pixel Sort"
axisString"Vertical"
fieldOneOf([FieldOf(Color), RasterArray, Field])
step_sizeNumber1
max_lengthNumber2048
modeString"Attribute"
attributeString"@index"
axis_angleNumber0
centerVec3(0, 0, 0)
spiral_centerVec2(0, 0)
twistNumber1
seedNumber0
directionString"Ascending"
reindexBooleantrue
add_totalBooleantrue
volume_sort_keyString"Luminance"
propagationString"None"
blend_radiusNumber1
strengthNumber1

Gotchas

In Axis mode, 0° sorts left-to-right and 90° sorts bottom-to-top. Any angle between sorts along a diagonal.

Spiral mode's Twist controls tightness: 0 gives a pure clockwise sweep around the centre, higher values a tighter, more coiled winding.

Reindex and Add Total, which refresh @index/@u/@total after a reorder, are visible only when the input is a shape, not for Geometry or Points collections. Reindexing after sort currently applies there only.

Frame Reorder (under Sort Type, for image sequences) is present in the UI but does not yet change frame order. Only Pixel Sort is active for that input type today.

Worked example

  1. Add a Sort node and wire in a collection of shapes.

  2. Leave Mode on Attribute and set Attribute to @index for a stable pass-through order, or type a custom attribute name to sort by that value.

  3. Switch Mode to Proximity and set Center to sort elements by distance from that point: nearest first in Ascending, farthest first in Descending.

  4. Try Spiral mode: set Spiral Center and raise Twist to build a winding order, useful for staggered reveal animations.

  5. For an image, wire it into Input instead, set Axis to Vertical or Horizontal, and pick a Volume/pixel Sort Key like Luminance for a pixel-sort glitch effect.

See also

Resample · Partition · Separate · Points