Sort operator

The Sort operator allows you to sort particles by their custom properties.

Sorting particles is useful when you want to control the order in which they are processed by other operators. For example, if you have a stack of particles that are unordered, and you want to process them by another operator from top-to-bottom, you could assign their “position Z” value to a custom float channel using a Custom Properties operator, then use a Sort operator to sort their event particle order using that “position Z” value as the sort value, in descending order. Then you could use another operator (ex: Split) to process them in the desired order. Note: the Sort operator is meant for sorting internal particle properties (like ID or event order), not physical properties (like position in space) - you can sort ID or event order using physical properties as the sort criteria (as explained in the prior example), but the Sort operator isn’t meant to be used to modify physical properties directly.


Sort mode

  • Sort particles by IDs: sorts particle IDs by re-assigning IDs based on their ordered sort value.

Because “sort particles by IDs” potentially re-assigns particle IDs, this can impact any previously-assigned ID-dependent properties (ex: particle bindings). Make sure you sort by IDs prior to assigning ID-dependent properties in the flow.

  • Sort event particle order: sorts particles’ explicit ordering within the event based on their ordered sort value.

Sort value

  • Channel: the custom float channel from which each particle’s sortable value will be derived.

Clustering

  • Enable clustering: when enabled, particles will only be sorted with other particles that have the same cluster value.

Enabling clustering allows you to sort groups of particles independently from each other.