Relax

Summary

The Relax applies a relaxation algorithm to spread instances apart and prevent overlaps. It uses iterative solving to push overlapping instances away from each other, creating more evenly distributed spacing.

Optionally provide constraint geometry (surface) or a constraint volume (3D texture) to keep instances from flying off into space. Supports two solver modes: Simple for immediate single-frame relaxation, and Advect for progressive time-dependent solving.

Supports two methods: Neighbor (searches for nearby instances within a radius) and Field (uses a voxel-based field approach). Considers the PointScale attribute of each instance as its radius for overlap detection. If there is no PointScale attribute, the radius defaults to half of the search radius. Optional falloff-based modulation enables spatially varying relaxation effects.

Parameters

Page: Relax

Group Group If there are input groups, specifying a group name in this field will cause this POPX to act only upon the group specified.
Solver Mode Solvermode Switches between Simple and Advect modes.
Simple simple
Advect advect
Relax Method Relaxmethod Determines the relaxation algorithm: Neighbor (proximity-based search) or Field (voxel-based volume approach).
Neighbor nebr
Field field
Target Points Update POP Pointsupdatepop Reference to a POP node downstream in the network when Solver Mode is set to Advect. This reference will cause a feedback loop and re-injects the points next frame.
Do Falloff Dofalloff Enables falloff-based modulation of the relaxation effect.
Falloff Attribute Falloffattr Specifies which attribute to use for falloff values that modulate the relaxation strength.
Relax Iterations Relaxiters Number of relaxation passes to perform per frame. Higher values produce more thorough relaxation but increase computation time.
Max Relax Radius Maxrelaxradius Maximum search distance for finding neighboring instances. Instances beyond this radius will not affect each other.
Max Neighbors Maxneighbors Maximum number of neighboring instances to consider when using Neighbor method.
Max Axis Resolution Maxaxisres Maximum voxel resolution along the longest axis when using Field method.
Lower Bounds Fieldlowerbounds Lower bounds of the field volume when using Field method.
Lower Bounds Fieldlowerboundsx
Lower Bounds Fieldlowerboundsy
Lower Bounds Fieldlowerboundsz
Upper Bounds Fieldupperbounds Upper bounds of the field volume when using Field method.
Upper Bounds Fieldupperboundsx
Upper Bounds Fieldupperboundsy
Upper Bounds Fieldupperboundsz
Kernel Size Kernelsize Size of the convolution kernel used for field-based relaxation.
Relax Strength Relaxstrength Overall intensity of the relaxation effect. Higher values push instances apart more aggressively.
Initialize Initializepulse Resets the Advect solver to initial state.
Start Startpulse Begins Advect solver simulation from the current state.
Play Play Toggles playback of the Advect solver simulation.
Step Steppulse Advances the Advect solver by one frame.

Page: Constraints

Constraint to Geometry Constrainttogeo Enables constraint to a surface geometry, keeping instances from flying off into space.
Constraint Geometry Constraintgeo Reference to a POP geometry to use as constraint surface when no second input is connected.
Display Geometry Displaygeo Shows the constraint geometry in the viewport for visualization.
Display Color Displaycolor Display color for the constraint geometry visualization.
Display Color Displaycolorr
Display Color Displaycolorg
Display Color Displaycolorb
Constraint to Volume Constrainttovolume Enables constraint to a 2D/3D texture volume, keeping instances confined within the volume.
Constraint Volume Constraintvolume Reference to a 2D/3D texture TOP to use as constraint volume when no third input is connected.
Lower Bounds Lowerbounds Lower bounds of the constraint volume in world space.
Lower Bounds Lowerboundsx
Lower Bounds Lowerboundsy
Lower Bounds Lowerboundsz
Upper Bounds Upperbounds Upper bounds of the constraint volume in world space.
Upper Bounds Upperboundsx
Upper Bounds Upperboundsy
Upper Bounds Upperboundsz
Force Strength Forcestrength Intensity of the constraining force applied to keep instances within the volume.
Pre-Shrink Preshrink Number of pre-shrink iterations applied to the volume before constraint calculation.
Filter Size Size Size of the filter kernel applied to the constraint volume.

Page: Common

Bypass Bypass Pass through the first input to the output unchanged.
Free Extra GPU Memory Freeextragpumem Free memory that has accumulated when output memory has grown and shrunk.
Render Primitives Renderprimitives Toggles rendering of POPX Geometry or shows it as point instances only.
SRT / RST Srtrst Sets the transform order when using POPX Geometry as built-in TouchDesigner instances.

Inputs

Input 0 POP POPX/POP Geometry
Input 1 POP Constraint Geometry
Input 2 TOP Constraint Volume

Outputs

Output 0 POP POPX_out1