Magnet SOP

From TouchDesigner 088 Wiki

Summary

The Magnet SOP allows you to affect deformations of the input geometry with another object using a "magnetic field" of influence, defined by a metaball field. It allows the creation of animated bumps and dents within objects, and other special effects.

It is important to note that the actual deformation comes from the Translate parameters of the Magnet SOP, and not from the metaball. The metaball defines the area of effect for the Translate parameters of the Magnet SOP. The weight of the metaball determines the effectiveness of the Translate within the Magnet SOP.

The power of the magnet is greatest at the centre of a metaball field and diminishes to nothing at the edge of the field.

PythonIcon.png magnetSOP_Class

Parameters

Deform Group / Magnet Group /deformGrp /magnetGrp - Allows you to specify a group of geometry to be deformed, and a group that will act as the magnet respectively. Accepts patterns, as described in Pattern Matching.

Parameters - Deform Page

Transform Order /xOrd - Sets the overall transform order for the transformations. The transform order determines the order in which transformations take place. Depending on the order, you can achieve different results using the exact same values. Choose the appropriate order from the menu.

Rotate Order /rOrd - Sets the order of the rotations within the overall transform order.

Translate /tx /ty /tz - These three fields move the Source geometry in the three axes. The Translates of the metaball only affect the position of the area of influence. The influence itself is provided by an imaginary magnet within the Magnet SOP itself, and the attitude of this influence is determined by the Translates of the Magnet SOP.

Note: If the Translate values of the Magnet SOP are all zero, the magnet will have no deforming influence. The weight of the Metaball SOP scales the influence of the Magnet SOP's Translates.

Rotate /rx /ry /rz - These three fields rotate the Source geometry in the three axes.

Scale /sx /sy /sz - These three fields scale the input geometry in the three axes.

Pivot /px /py /pz - The pivot point for the transformations. Not the same as the pivot point in the pivot channels.

Parameters - Atributes Page

Affect Position /position - Allow the magnet to affect the position of the input geometry. This is enabled by default.

Affect Point Color /color - Allow the magnet to affect the point color of the input geometry.

Tip: To control the contribution of each magnet on the surface's Point Color when the Affect Point Color option is enabled, set your point colors to black (0,0,0) before the Magnet SOP by using a Point SOP. The Translate fields in the Magnet SOP will then add per-point rgb color with values of 2,2,2 approaching white.

The scale and rotate channels of the magnet move you about in 3D color space. This is not recommended.

Affect Point Normal /nml - Allow the magnet to affect the point normals of the input geometry.

Affect Point Velocity /velocity - Allow the magnet to affect the velocity of the input geometry.

See Also