Set Target operator

The Set Target operator automates the assignment of the birth ID of one particle to a custom data channel of another.

Think of setting a target as a way to tell one particle to focus on another. The “target” is merely the birth ID of another particle in the flow. Many operators allow you to use that target ID in various ways. For example, you can tell particles to bind to their target in a Particle Bind operator, or chase their target in a Find Target operator, etc.

Use a Display Data operator to view which target IDs have been assigned to which particles, or to draw a line between particles and their targets in the viewport.


Set Target Rollout

  • Mode: the method to use to assign particle targets.

  • Channel: the custom data float channel to assign target IDs to.

  • Only set target if current target invalid: particles with a valid (non-deleted) target will not have their target set.

  • Prevent target loops: when enabled, prevents looping particle hierarchies (ie, a particle’s target cannot also target it).

  • Prevent duplicate assignments: when enabled, particles will attempt to get a unique target (a target not already assigned to other particles).

Duplicate prevention happens on a per-step basis. That means if particle A is given a target of 1 at frame 0, then particle B won’t get a target of 1 at frame 0. However, if particle A was given a target of 1 at frame 0, that won’t prevent particle B from getting a target of 1 at frame 1.

  • Prevent invalid assignments: when enabled, target values that are not a valid particle ID, or that are equal to the ID of the assigning particle, won’t be assigned.

  • Move to target: Moves particles to the location of their target particle.

  • Link to target: Links particles to their target particle.

If you need more control over the “move to target” and “link to target” behavior, use the same-named operators instead. These options are merely shortcuts providing fast/simple move and link functionality.

Uniqueness

  • Seed: the seed value for all varied parameters.

  • Seed by time: the seed value will be incremented with the current time in ticks.

Target Filters Rollout

Events

  • All events: all particles in the flow will be considered for targeting.

  • This event only: only other particles in the event will be considered for targeting.

  • Exclude this event: only other particles in other events will be considered for targeting.

Simulation Groups

  • Simulation groups: controls which particle simulation groups will be targeted.

Clusters

  • Enable clustering: controls whether target candidates will be determined by cluster values.

  • Channel: the particle data channel to get cluster values from.

  • Cluster if equal: target candidates must have equal cluster values.

  • Cluster if equal: target candidates must have unequal cluster values.

Family

  • Target all/siblings/non-siblings: controls whether targets will be filtered by their familial relationships.

Raycasting

  • No raycasting/hit/no hit: controls whether targets will be filtered by a raycast against the defined object list.

  • Object list: the list of objects to raycast against, when raycast filtering is enabled.

Angle

  • Filter by angle: controls whether targets will be filtered by their angle to one another.

  • Perpendicular/parallel: controls whether targets will be filtered based on their perpendicular/parallel angle to a given axis.

  • Thresh: the threshold to the desired angle within which particles will pass the angle filter.

  • World Z-Axis: the world z-axis (0,0,1) will be the reference vector to which angles will be computed.

  • Object Z-Axis: the local z-axis of a defined object will be the reference vector to which angles will be computed.

  • Object: the object from which to derive the local z-axis.

Proximity Rollout

Target from neighbors

  • Absolute closest: the closest particle will become the target candidate for the current particle, regardless of distance.

  • Select within radius: all neighbor particles within a given radius will be target candidates for the current particle.

  • Cluster within radius: all neighbor particles within a given radius will have their target set as the current particle.

  • Consider particle shapes: the vertices of particle shapes will be considered during the neighbor search, allowing for more accurate neighbor detection. If this setting is disabled, only particle positions will be considered.

“Consider particle shapes” doesn’t offer the usual closest-surface sampling methods (face, hybrid, etc), because those would be prohibitively slow for anything other than a small number of particles. A simple point search (potentially augmented with implicit points) is the most performant alternative.

  • Accuracy: when greater than 1, a random sampling of implicit points will be scattered over the particle shapes which will also be included in the neighbor search, improving the accuracy of the results.

The higher the accuracy value, the greater the number of implicit points. The calculation for the total number of implicit points added is: [numShapeFaces * ((accuracy-1) * 10)]. Setting this value too high can significantly slow down the neighbor search.

Radius

  • Absolute radius: the neighbor search radius will be an absolute value.

  • Radius: the specific neighbor search radius value.

  • Shape radius: the neighbor search radius of each particle will be set to each particle’s shape mesh radius.

  • Scale radius: the neighbor search radius of each particle will be set to each particle’s maximum scale dimension.

  • Multiplier: the multiplier to apply to shape/scale neighbor search radius values.

  • Variation %: the per-particle percentage of variation to apply.

Axial bias

  • X/Y/Z: controls how much proximity bias to add along specified world-space axes. Values of 1 add no bias. Values higher than 1 bias the proximity search along the axis. Values less than 1 bias the proximity search away from the axis.

By tuning the proximity bias values, you can cause neighbors to be found only along certain axes. For example, all bias values set to 1 will find neighbors in a perfectly circular shape around each particle…wherase a very high bias value in the X axis and low bias values in the Y/Z axes, will find neighbors more often along the X axis.

Neighbor selection

  • Random: a random particle will be chosen from the list of neighbor candidates as the target.

  • Closest: the closest particle will be chosen from the list of neighbor candidates as the target.

  • Furthest: the furthest particle will be chosen from the list of neighbor candidates as the target.

  • Closest to object: the closest particle to the given scene objects will be chosen from the list of neighbor candidates as the target.

  • Furthest from object: the furthest particle from the given scene objects will be chosen from the list of neighbor candidates as the target.

  • Smallest surface area: the particle with the smallest surface area will be chosen from the list of neighbor candidates as the target.

  • Largest surface area: the particle with the largest surface area will be chosen from the list of neighbor candidates as the target.

  • Youngest: the youngest particle (using particle age as the metric) will be chosen from the list of neighbor candidates as the target.

  • Oldest: the oldest particle (using particle age as the metric) will be chosen from the list of neighbor candidates as the target.

  • Must have an overlapping edge: when enabled, the meshes of candidate particles must have at least one overlapping edge. Note: this option is very slow.

Objects

  • Object list: the list of objects used in the relevant closest/furthest modes.

Siblings Rollout

  • Sibling type: controls which siblings will be considered particle target candidates.

Value Rollout

  • Static: a specified value will be used as the target ID.

  • Value: the specified target ID Value.

  • Random: a random value within a min/max range will be used as the target ID.

  • Min/Max: the min/max range from which to choose a random target ID.

  • Birth ID: a permutation of each particle’s own birth ID will be used as the target ID.

  • Offset: the amount to offset each particle’s own birth ID.

  • Event count offset: the amount to offset by the total number of particles in the current event.

Event count offset is a multiplier on the total number of particles in the current event. Setting this value to something other than 0 will change the offset by [value * eventParticleCount]. This is useful in situations where you have multiple events with the same number of particles and you want each particle in one event to target each corresponding particle in another event. Setting the basic Birth ID offset value to the total number of particles in the event will have the same effect, but using the event count offset parameter instead allows you to create procedural setups where you don’t know the exact number of particles in the event beforehand, or where the number of particles in the event is changing.

  • Custom float: the target ID will be taken from a custom float data channel.

  • Channel: the custom float data channel to take the target ID from.

  • Offset: the amount to offset the target ID value taken from the custom float data channel.