←ALL OPERATORS
> modifiers

Magnetize

modifiers/magnetize·v1.5.1
IN:2  OUT:1

The Magnetize pushes, pulls or spins instances around magnets: the points of the POP on the second input or the Magnets POP, or a single magnet at the Position parameter. Each magnet acts within its Effect Radius with a Force Strength and Exponent, and point attributes on the magnets named like the parameters (radius, mode, strength, spindir, exponent, contain) let every magnet differ.

Solver Mode Simple offsets each instance from its input every frame, while Advect runs a feedback loop (Initialize, then Start) where instances keep moving, Containment eases them back inside a magnet's radius, and they relax back to their input when no magnet acts. Affect Rotation turns instances along their motion by Aim Weight, Do Falloff scales the force per instance, and the force and weight can be output as attributes.

PAGEMagnetize
GroupGroupIf there are input groups, specifying a group name in this field will cause this POP to act only upon the group specified.
Target Feedback Loop POPTargetpopA reference to a POP node downstream in the network whose data is retrieved one frame later. Only P is read back.
Magnets POPMagnetspopReference to a POP whose points are the magnets when the second input is empty. Per-magnet attributes: radius, mode, strength, spindir, exponent, contain.
Display MagnetsDisplaymagnetsDisplay the magnets as wire spheres of their radius.
Do FalloffDofalloffWeight the effect on each point by the Falloff Attribute.
Falloff AttributeFalloffattrThe point attribute, 0 to 1, that weights the effect.
Search RadiusSearchradiusSets the search radius for magnets.
Max Magnets per PointMaxmagnetsMaximum number of magnets, the closest within Search Radius, whose forces each point sums. 0 uses all magnets.
Relaxation FactorRelaxfactorIn Advect mode, how fast a point returns to the input, and its aim fades, once no magnet acts on it.
Effect RadiusRadiusReach of a magnet, where the force fades to 0. Can be set per magnet with a radius point attribute.
Force StrengthStrengthForce of the magnets. Per-magnet attribute: strength.
ExponentExponentSets the exponent of the force falloff over the radius. Each magnet can set its own exponent.
ContainmentContainIn Advect mode, how strongly points outside the magnet radius are eased back in. 0 leaves them free. Per-magnet attribute: contain.
Affect PositionAffectposWhether the magnet forces move the points.
Move WeightMoveweightScales the movement caused by the forces.
Affect RotationAffectrotWhether to turn each point so its +Z axis follows its motion.
Aim WeightAimweightSets the fraction of the turn that is applied, from 0 to 1.
Output Force AttributeOutputforceattrEnable keeping the summed Force attribute on the output.
Output Weight AttributeOutputweightattrEnable keeping the Weight attribute, the summed magnet influence, on the output. 0 means no influence.
InitializeInitializepulseInitializes the POP from its input and parameters.
StartStartpulseStart the simulation from the initialized state.
PlayPlayPause or play the feedback loop.
PAGECommon
BypassBypassPass through the first input to the output unchanged.
Free Extra GPU MemoryFreeextragpumemFree memory that has accumulated when output memory has grown and shrunk.
Render PrimitivesRenderprimitivesWhether to render the full POPX geometry. When off, only point instances are drawn.
Convert to Point PrimitivesConverttoptprimEnable converting points to point primitives when Render Primitives is off.
SRT / RSTSrtrstSets the transform order, SRT or RST, used when the points are rendered as TouchDesigner instances.
Input 0 POP - POPX/POP Geometry
Input 1 POP - Magnets
Output 0 POP - POPX/POP Geometry