Close

POP Rotations

A rotation attribute is any attribute used to define the orientation of geometry in 3D space. Rotation data is typically stored per point, allowing nodes such as Copy POP and Transform POP to determine exactly how an element should be rotated.

Attributes representing Rotations can be represented in several formats:edit

  • Quaternion (often named Quat) which is a float4
  • 3×3 rotation matrix (often named RotMat)
  • 4×4 transform matrix (often named Transform)
  • A set of three float3 vector attributes defining the tangent, normal, and binormal vectors (representing the local X, Y, and Z axes along line strips)

Generating Rotation Attributesedit

Rotation attributes can be created or manipulated using various POPs:

  • Math Mix POP and Math Combine POP - Can generate quaternion attributes using the axisanglequat(A, B) combine operation.
  • Line Metrics POP and Trail POP - Can generate the three vectors (tangent (Tan), normal (N), and binormal(Binormal)) along line strips. These vectors can also be used internally to produce quaternions, rotation matrices, or full transform matrices.
  • Attribute POP - Can create quaternions and transform matrix attributes
  • GLSL POP and GLSL Advanced POP - Can compute quaternion rotations and quaternion operations (see GLSL Reference)

Using Rotation Attributesedit

Rotation attributes are commonly used for transforms:

  • Copy POP - Uses quaternion, rotation matrix, or transform matrix attributes to orient copied geometry.
  • Math Mix POP and Math Combine POP - The A * B combine operation can rotate points or vectors using quaternion or matrix multiplication.
  • Lookup Attribute POP - Can interpolate rotation attributes—useful when moving objects along a path or blending between orientations.
  • Transform POP - A transform matrix attribute can be Mapped to the XForm Matrix parameter. This will apply an additional transform to each point. The transform can be on the P Position attribute, but because the Transform POP can transform any float3 attribute, the transform matrix attribute can transform any float3 attribute entering the Transform POP.
  • Particle POP - The Particle POP does not yet have reserved attributes for rotation, but an input quaternion attribute can be used. Logic in the feedback loop can be applied to update the orientation over time. For example, the Math Mix POP can create and multiply quaternions. The Copy POP can then be used to copy meshes using the particles’ orientation data.

Qualifiers on Rotation Attributesedit

You wiil see in the popup info of alongside the names of some attributes what is called a "Qualifier", which is extra metadata of the attribute - Aside from the common "Color" qualifier, you will see "Quaternion" as a qualifier for float4 quaternion attributes, "Rotation Matrix" with some 3x3 and 4x4 matrices, and "Dir" for direction attributes like Normals, Tangents, and BiNormals. The qualifiers are used to specially treat and recognize attributes used for certain purposes.

See also: OP Snippets - POPs - POPs CONCEPTS / rotation attributes.