Relax v1.2.1

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.
Affect Position Affectposition Enables relaxation forces to affect instance positions.
Relax Iterations Relaxiters Number of relaxation passes to perform per frame. Higher values produce more thorough relaxation but increase computation time.
Override Point Radius Overrideradius Overrides the point radius used for overlap detection with a uniform value.
Point Radius Axis Radiusaxis Selects which axis of the PointScale attribute to use as the point radius.
X x
Y y
Z z
Point Radius Scale Radiusscale Scale factor applied to the point radius for overlap detection.
Display Point Radius Displayradius Displays the point radius as circles in the viewport.
Max Relax Radius Maxrelaxradius Maximum search distance for finding neighboring instances. Instances beyond this radius will not affect each other.
Distribution Distribution Determines the distribution method for neighbor point selection.
Num Hash Buckets Numhashbuckets Number of hash buckets used for spatial hashing in neighbor search.
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.
Kernel Size Kernelsize Size of the convolution kernel used for field-based relaxation.
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
Relax Strength Relaxstrength Overall intensity of the relaxation effect. Higher values push instances apart more aggressively.
Attract Position Attractposition Position in 3D space that instances are attracted toward.
Attract Position Attractpositionx
Attract Position Attractpositiony
Attract Position Attractpositionz
Attract Strength Attractstrength Strength of the attraction force toward the Attract Position.
Output Force Attribute Outputforceattribute Outputs the relaxation force vector as a point attribute.
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: Collisions

Collision Type Collisiontype Selects the collision geometry type for constraining instance movement.
None none
POP (Windows Only) pop
Box box
Plane plane
Sphere sphere
Torus torus
3D SDF 3dsdf
T3D t3d
2D SDF 2dsdf
T2D t2d
Collision Damping Collisiondamping Amount of velocity dampening applied when instances collide with the collision geometry.
Solid Solid Treats the collision geometry as a solid volume, preventing instances from passing through.
Project Project Projects instances onto the surface of the collision geometry.
Collision POP Collisionpop Reference to a POP containing the collision geometry when using POP collision type.
Collision Offset Collisionoffset Offset distance from the collision surface to prevent z-fighting artifacts.
Size Size Size of the box collision geometry.
Size Sizex
Size Sizey
Size Sizez
Radius Radius Radius of the collision geometry per axis.
Radius Radiusx
Radius Radiusy
Radius Radiusz
Corner Radius Cornerradius Radius of rounded corners on the box collision geometry.
Collison TOP Collisontop Reference to a TOP texture used as the collision field for SDF and texture collision types.
Use Custom Bounds Usecustombounds Enables custom bounding box for the collision texture instead of using the texture's native bounds.
Lower Bounds Lowerbounds Lower bounds of the collision volume in world space.
Lower Bounds Lowerboundsx
Lower Bounds Lowerboundsy
Lower Bounds Lowerboundsz
Upper Bounds Upperbounds Upper bounds of the collision volume in world space.
Upper Bounds Upperboundsx
Upper Bounds Upperboundsy
Upper Bounds Upperboundsz
Transform Order Xord Sets the order of scale, rotate, and translate operations for the collision geometry transform.
Scale Rotate Translate srt
Scale Translate Rotate str
Rotate Scale Translate rst
Rotate Translate Scale rts
Translate Scale Rotate tsr
Translate Rotate Scale trs
Rotate Order Rord Sets the order of rotation operations for the collision geometry transform.
Rx Ry Rz xyz
Rx Rz Ry xzy
Ry Rx Rz yxz
Ry Rz Rx yzx
Rz Rx Ry zxy
Rz Ry Rx zyx
Translate T Translation of the collision geometry in world space.
Translate Tx
Translate Ty
Translate Tz
Rotate R Rotation of the collision geometry in degrees.
Rotate Rx
Rotate Ry
Rotate Rz
Scale S Scale of the collision geometry per axis.
Scale Sx
Scale Sy
Scale Sz
Pivot P Pivot point for the collision geometry transform.
Pivot Px
Pivot Py
Pivot Pz
Uniform Scale Scale Uniform scale factor applied to the collision geometry.
Display Geometry Displaygeo Shows the collision geometry in the viewport for visualization.
Display Color Displaycolor Display color for the collision geometry visualization.
Display Color Displaycolorr
Display Color Displaycolorg
Display Color Displaycolorb

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.
Convert to Point Primitives Converttoptprim Converts points to primitive points when Render Primitives is toggled off.
SRT / RST Srtrst Sets the transform order when using POPX Geometry as built-in TouchDesigner instances.

Inputs

Input 0 POP POPX/POP Geometry

Outputs

Output 0 POP POPX_out1