Resample operator

The Resample operator allows you to spawn or delete particles, based on their hierarchical relationship.


Resample Rollout

Mode

  • Interpolate: in this mode, particles will be spawned between matching particle pairs.

  • Optimize: in this mode, particle pairs will be condensed by deleting adjacent particles.

Interpolate Rollout

Interpolate

  • Siblings: particles in an adjacent sibling relationship will be resampled.

  • Parent/children: particles in a parent/child relationship will be resampled.

  • Target: particles and their target (if it exists) will be resampled.

  • Particle binds: controls whether the bindings between particle pairs will be resampled.

  • Target channel: the custom data float channel from which to get the target particle ID.

A particle is a child of another particle if it was spawned from that other particle. Two particles are considered siblings if they were spawned from the same parent particle. Two particles are considered adjacent siblings if they were spawned in order, one immediately before or after the other.

Particles

  • Close sibling loops: controls whether groups of sibling particles will be turned into closed loops (turn this on to resample particles generated from closed splines).

  • Sort by ID: controls whether particle pairs will be sorted by ID prior to resampling. Enabling this can help maintain greater coherency in the result. Disabling this means particle pairs will be resampled at random.

  • Interpolate velocity: when enabled, particle pairs will have their velocity implicitly integrated prior to resampling.

  • Flip ordering: Flips the order of resampled particles. For example, particle/child resampling normally orders new particles from parent to child. Flipping the order will order them from child to parent.

Particle Binds

  • ID: when enabled, a particle bind’s ID must match the ID value in order to be resampled.

  • Resample lengths of new binds: when enabled, new binds (binds created between resampled particles that were previously bound together) will have their reset length set to the interpolated distance between resampled particles.

Example: when “resample lengths of new binds” is enabled, if two particles bound together with a bind length of 5.0 are resampled once (ie, a single new particle is created between them), the resulting two binds created to connect the original particles with the resampled one will each have their rest length set to 2.5. When disabled, they will retain the original bind’s rest length of 5.0.

Targets

  • Resample target hierarchy: when enabled, the resampled children of target pairs will be assigned successive target values which maintain the original target hierarchy.

When “resample target hierarchy” is disabled, the resampled children of a a target pair (a particle A which targets a particle B) will be assigned whatever target value particle A has (ie, all children will target particle B). However, when “resample target hierarchy” is enabled, the children will successively target each other, in order (ie, particle A will target child A, child A will target child B, child B will target child C and child C will target particle B). Enabling this value maintains the hierarchy of targets along the chain of resampled child particles.

By distance

  • Enable: controls whether resampling will occur when two particle pairs are separated by a certain distance.

  • Thresh: the minimum distance required between two particle pairs before resampling will occur.

By probability

  • Enable: controls whether resampling will occur between particle pairs on a random probability.

  • Thresh: the random probability that two particle pairs will be resampled.

Subdivision

  • Count: the number of new particles spawned during a resampling of particle pairs.

  • Jitter position %: controls the amount of position jitter to apply to new particles. Position jitter is an amount of random offset applied to new particle positions, parallel to the vector formed between the two original particles that are being resampled.

Interpolation Limits

  • Particles per pair: limits the total number of new particles that can be spawned between any two matching pairs (sibling or parent/child pairs)

  • Enable max pairs: limits the total number of new particles that can be spawned, per time step.

  • Max pairs: the maximum number of particle pairs that can be resampled, per time step.

When “particle binds” is enabled, if pair particles A and B are resampled such that particle C is spawned between them, any bindings between A and B will be resampled such that A will be bound to C, and C will be bound to B.

(A–B) > (A–C–B)

Set custom float data

  • None: no resampled particles will have a custom float value assigned to them.

  • All: all resampled particles will have a custom float value assigned to them.

  • Subset per resample operation: a certain number of resampled particles, per resample operation, will have a custom float value assigned to them.

  • Channel: the custom float data channel to assign a value to.

  • Value: the value to assign to the custom float data channel.

Use the custom float data settings to mark certain resampled particles, for further processing later.

Uniqueness

  • Seed: the seed value for all varied parameters.

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

Optimize Rollout

Optimize

  • Siblings: particles in an adjacent sibling relationship will be optimized.

  • Parent/children: particles in a parent/child relationship will be optimized.

  • Target: particles and their target (if it exists) will be optimized.

  • Target channel: the custom data float channel from which to get the target particle ID.

By angle between two pairs

  • Enable: controls whether particles will be deleted if the angle between their adjacent pairs is below a certain threshold.

  • Thresh: the angle threshold.

By length of pair

  • Enable: controls whether particles will be deleted if the distance between them and their adjacent particle is below a certain threshold.

  • Thresh: the length threshold.

By distance from end to next junction

  • Enable: controls whether particles adjacent to a single junction particle will be deleted if the distance between them and the junction is below a certain threshold.

  • Thresh: the distance threshold.

Misc

  • Max optimization: particles will only be deleted if the length of the resulting pair (the pair formed by both of the deleted particle’s adjacent particles) is below this threshold.

  • Iterations: the number of times to re-perform the overall optimize algorithm.

Certain optimizations can result in more particles becoming optimization candidates after the algorithm completes one iteration. Increasing the iteration count will optimize those new candidates in the same time step.

  • Preserve all junctions: junctions (particles with more than two adjacent particles) will not be deleted.