Sort surface node

Reorders points and primitives in different ways.

All Parameters Inputs

The Sort op allows you to reorder points and primitives in different ways. Sometimes the primitives are arranged in the desired order, but the point order is not.

Tip

To change the order of vertices within a primitive, use the Reverse SOP.

Uses / Works in Relation With

  • Allow points and primitives to be sorted in different ways.

  • Sorting along a vector aids with transparency viewing in GL.

Parameters

Point / Primitive

Point/Primitive Sort

Type of sort to perform.

No change

Leaves the points and primitives in their original order. This allows one to reorder the points without affecting the primitive order.

By vertex order

Sorts points to match the order of the vertices on the primitives that they belong to. If you have a curve whose point numbers do not increase along the curve, this will reorder the point numbers so they match the curve direction.

By x

Sorts points or primitives by increasing X value.

By y

Sorts points or primitives by increasing Y value.

By z

Sorts points or primitives by increasing Z value.

Reverse

Reverses the order of the points or primitives. The highest numbered becomes the lowest numbered, and vice versa.

Random

Using the random seed, each point or primitive is assigned a random priority. They are then reordered according to that priority. This has the effect of generating a random ordering of the points or primitives.

Shift

Shift all of the point or primitives indices forward by an offset. Each point or primitive number gets the offset added to it to get its new number. If this exceeds the number of points or primitives, it wraps around.

Proximity to Point

The distance to a point in space is used as a priority. The points or primitives are then sorted so that the 0th entity is the one closest to that point.

Along Vector

Provides a generalization of the By X, By Y, and By Z methods. Points are sorted in increasing distance along the given vector. This vector is signed. A value of (0, 1, 0) will be the equivalent of sorting By Y, while a value of (0, -1, 0) will be the reverse.

By Expression

The specified expression is evaluated for each point or primitive. This determines the priority of that primitive, and the entities are reordered according to that priority. The point or primitive with the least evaluated expression value will be numbered 0 after the sort. This will preserve the relative order of entities with the same expression value, so multiple Sort SOPs could be used to perform a multi-key sort.

Seed

Seed used for random number generator in Random sort.

Offset

Amount to shift point/primitive order in Shift sort.

Point

Position to reference when sorting by proximity to point.

Vector Object

Sort along a vector specified by object’s xform

Vector

Specify an arbitrary vector to sort along

Expression

Specifies an expression to sort by. Each object is reordered so the elements who evaluated to a higher expression value will be found after those with a lower value. Elements with equal expression value maintain their relative position.

Inputs

1 - Source data

Any geometry type.

Usages in other examples

Example name Example for

Copy surface node

Load | Launch

Copy surface node

Load | Launch

Clip surface node

Load | Launch

Point surface node

Load | Launch

Force surface node

Load | Launch

Magnet surface node

Load | Launch

Particle surface node

Load | Launch

Particle surface node

Load | Launch

Particle surface node

Load | Launch

Particle surface node

Load | Launch

Particle surface node

Load | Launch

Particle surface node

Load | Launch

Paste surface node

Load | Launch

Match Topology surface node

Load | Launch

Creep surface node

Load | Launch

Attractor particle node

Load | Launch