POPX

Magnetize

v1.3.0
Modifiers

Summary

The Magnetize applies magnetic forces to each instance based on magnet positions. Each magnet can repulse, attract, or spin instances around them within a specified search radius, creating dynamic force-based effects.

Magnet positions can be specified either through a second input connection or via the Magnets POP parameter. Supports three force modes: Repulse (push away), Attract (pull toward), and Spin (rotate around magnets).

Effect intensity is controlled by the Search Radius, Effect Radius, and Force Strength parameters. Optional falloff-based modulation enables spatially varying magnetic effects.

Multiple Magnet Fields: Magnets can be specified via the Magnets POP parameter or Input 1, where each point defines a separate magnet field - one point per magnet. The attributes of the magnet POP are named the same as parameter tokens in the Magnetize operator, and override the parameters for each magnet. Menus and toggles are represented as integers, starting at 0 for the first menu entry. You need only to create a Point POP with attributes named as the Magnetize parameters, and then add a point per magnet, and set their values. (An attribute radius will override the Effect Radius (Radius) parameter.) Alternately you can generate points procedurally with attributes that match the Magnetize parameter names. The workflow is the same as multiple strings defined in a specification DAT of the Geo Text COMP and the Text COMP.

Parameters

GroupGroup
If there are input groups, specifying a group name in this field will cause this POPX to act only upon the group specified.
Solver ModeSolvermode
Determines the computation mode for magnetic forces.
SimplesimpleAdvectadvect
Magnets POPMagnetspop
Reference to a POP containing points that define magnet positions and attributes when no second input is connected.
Display MagentsDisplaymagents
Enables visual display of magnet positions in the viewport.
Do FalloffDofalloff
Enables falloff-based magnetic force intensity control.
Falloff AttributeFalloffattr
Specifies which attribute to use for falloff values that modulate magnetic force strength.
Initial POPInitialpop
Reference to a POP containing initial positions for Simple solver mode.
Search RadiusSearchradius
Maximum distance from magnets within which instances are affected by magnetic forces.
Relaxation FactorRelaxfactor
Controls the smoothness and damping of magnetic force application over time.
Force ModeMode
Determines the type of magnetic force: Repulse, Attract, or Spin. Can be overridden per-magnet using a mode point attribute.
RepulserepulseAttractattractSpinspin
PositionPosition
Position of the magnet in 3D space. Can be overridden per-magnet using a P point attribute.
PositionPositionxPositionPositionyPositionPositionz
Effect RadiusRadius
Radius of influence for each magnet. Can be overridden per-magnet using a radius point attribute.
Force StrengthStrength
Intensity of magnetic forces applied to instances. Can be overridden per-magnet using a strength point attribute.
ExponentExponent
Controls the falloff curve of magnetic force with distance. Can be overridden per-magnet using an exponent point attribute.
Spin DirectionSpindir
Spin rotation direction vector. Can be controlled per-magnet using a spindir point attribute.
Spin DirectionSpindirxSpin DirectionSpindirySpin DirectionSpindirz
ContainmentContain
Controls how strongly instances are kept within the magnetic field bounds. Can be overridden per-magnet using a contain point attribute.
Affect PositionAffectpos
Enables position changes based on magnetic forces.
Move WeightMoveweight
Controls the intensity of position movement when Affect Position is enabled.
Affect RotationAffectrot
Enables rotation changes based on magnetic force direction.
Aim WeightAimweight
Controls how quickly instances rotate toward their direction of motion when Affect Rotation is enabled.
Output Force AttributeOutputforceattr
Outputs a force attribute showing the magnetic force vector applied to each instance.
Output Weight AttributeOutputweightattr
Outputs a weight attribute showing the strength of magnetic influence on each instance.
InitializeInitializepulse
Resets the simulation state to initial conditions.
StartStartpulse
Begins the simulation from the current state.
PlayPlay
Toggles simulation playback on or off.
BypassBypass
Pass through the first input to the output unchanged.
Free Extra GPU MemoryFreeextragpumem
Free memory that has accumulated when output memory has grown and shrunk.
Render PrimitivesRenderprimitives
Toggles rendering of POPX Geometry or shows it as point instances only.
Convert to Point PrimitivesConverttoptprim
Converts points to primitive points when Render Primitives is toggled off.
SRT / RSTSrtrst
Sets the transform order when using POPX Geometry as built-in TouchDesigner instances.

Inputs

Input 0POP
POPX/POP Geometry
Input 1POP
Magnets

Outputs

Output 0POP
POPX_out1