Matrix Utility Nodes

Maya uses Matrix utility nodes to add extra effects to your scene using Matrix math. See also Edit Transform Offset Parent Matrix attributes.

The following utility matrices are available in Maya:

addMatrix
This addMatrix node accepts a list of matrices as inputs and adds them together to generate an output which is the sum of all input matrices (m1 + m2 + m3 + m4 = matrixSumOutput).

See also addMatrix in the Maya Technical Documentation.

aimMatrix
Transforms an Input matrix so that the specified Primary Axis points to the specified primaryTarget. The secondary Target is used optionally to aim the secondary Axis in that general direction (up vector).
The aimMatrix node has a Space Matrix section that lets you alter the space of the inputs and outputs with Pre Space Matrix and Post Space Matrix floats, with a Composition and Matrix tabs. See Edit Transform Offset Parent Matrix attributes for information on what the different states represent.
aimMatrix is a hybrid aim/align operation. This node lets you set a primary axis through either an alignment or an aim operation that is independent of the secondary axis's aim or alignment operation.

The aimMatrix node has the following options

  • Input axis: the axis to be aimed/aligned
  • Mode: the aimMatrix node has 5 modes:
    Mode Function
    Lock Axis Keeps the input axis from being changed.
    Aim Aims the input axis at the point defined by the Target vector in the Target matrix.
    Align Aligns the input axis with the vector defined by the target vector in the Target matrix.
    None Does not include the secondary axis in the solve. The primary axis takes the shortest quaternion slerp to its solution.
    Target Vector
    • Aim mode: the Target vector is treated like a 3D point in the Target matrix.
    • Align mode: the Target vector is treated like a vector in the Target matrix. In this mode, you must specify a valid (0,0,0 is not valid).
axisFromMatrix
Retrieves the desired axis (X, Y or Z) 3-dimensional vector from the specified transformation matrix.
blendMatrix
BlendNode blends a base matrix (InputMatrix) successively with each target. The blend occurs as a stack. The previous blend results are blended with the next target and so on.
Chain deformations together with the blendMatrix node, where the weight value lets you extrapolate and interpolate.
blendMatrix is not a weighted average, but an ordered blend, where each successive matrix overrides the preceding matrices. For example, where a weighted blend for three matrices might use a value of 1, 1, and 1 for a 50% blend, you will need a weight of 1, .5, and .3333 (or more clearly 1/1, 1/2, 1/3) to achieve the same result with an ordered blend.
blendMatrix has Space Matrix section where that lets you alter the space of the inputs and outputs .
The blendMatrix node has a Space Matrix section that lets you alter the space of the inputs and outputs without the need for extra multiMatrix nodes. See Edit Transform Offset Parent Matrix attributes for information on what the different states represent.

The blendMatrix node has the following options

  • Use Matrix: Activates the blendMatrix node
  • Use Scale/Translate/Rotate/Shear: lets you choose which component (Scale/Translate/Rotate/Shear) will use in the blend calculation.
columnFromMatrix
The columnFromMatrix node returns the specified column from a 4x4 matrix.
composeMatrix
The composeMatrix node consumes a Translate, (Quat or Rot), Scale, and Shear value to produce a 4 x 4 matrix.
decomposeMatrix
The decomposeMatrix node consumes a 4 x 4 transform matrix as an input and returns the transform matrix decomposition. See Transform Offset Parent Matrix, rotationFromMatrix, scaleFromMatrix, and translationFromMatrix.
determinant
The determinant node computes the given matrix's determinant. The determinant of a matrix is a scalar value that is the function of its entries.
fourByFourMatrix
This node outputs a 4 x 4 matrix based on 16 input values. You can connect this output matrix attribute to any attribute that are a "matrix" type.

The first row of the matrix is defined by in00, in01, in02, in03.

The second row of the matrix is defined by in10, in11, in12, in13.

The third row of the matrix is defined by in20, in21, in22, in23.

The fourth row of the matrix is defined by in30, in31, in32, in33.

holdMatrix
Use this utility to cache a matrix.
inverseMatrix
The inverseMatrix node computes the given invertible matrix's inverse. The inverse of a matrix is the matrix for which its multiplication produces the identity matrix.
multiplyPointByMatrix
The multiplyPointByMatrix node returns the product of the multiplication of a point by a matrix.
multiplyVectorByMatrix
The multiplyVectorByMatrix node returns the product of the multiplication of a vector by a matrix. This is the equivalent of computing the matrix multiplication of the end point of the vector minus the multiplication of the start point of the vector.
multMatrix
Multiplies a list of matrices together.
parentMatrix
The parentMatrix node takes an input matrix and blends in the effect of other parent targets. It normalizes the effect of all the targets.

It can be used to animate the parent of a transform by mixing the weighted contributions of a number of target inputs.

It lets you alter the space of the inputs and outputs with Pre Space Matrix and Post Space Matrix attributes.

The parentMatrix node has a Space Matrix section that lets you alter the space of the inputs and outputs without the need for extra multMatrix nodes, using Pre Space Matrix and Post Space Matrix attributes, with Composition and Matrix tabs. See Change an object to its parent using the parentmatrix node for an example of how to use the parentMatrix.

The parentMatrix node has the following options per target:
  • Enable Target: activates the target
  • Weight: the weight to be used for the target (it will be normalized with the other target weights)
  • Target Matrix: the target matrix to be blended in
  • Offset Matrix: the offset from the target matrix. It can be used to capture the offset of an object from the target at a hand-off point when animating from one target to another.
Manage Targets

ParentMatrix Manage Targets menu

The parentMatrix node also has a Manage Targets menu. Select from the options:
Add/Remove Selected as Target Incorporates or removes the selected object from the matrix.
Initalize Target Offset Calculates the offsetMatrix so that the object remains in the same place as the inputMatrix when the target becomes the single contributing influence (weight of the target is 1.0 and all others are 0.0).
Snap Target Offset Calculates the offsetMatrix so that the object does not move from its current location when the target becomes the single contributing influence (weight of the target is 1.0 and all others are 0.0). .
Enable
Activates the Envelope slider, to let you specify the offset strength of the target objects in the matrix.
Envelope
Specifies the scale factor of the offset strength of the target objects in the matrix.
passMatrix
Multiplies a matrix by a constant without caching anything.
pickMatrix
Lets you choose which components from the output matrix to use in the input matrix, for example, you can choose only translation and rotation. Unused components are set to identity.
proximityPin
Note: proximityPin is technically a matrix node.
The proximityPin node returns a matrix for each point (given by attributes "coordinateU" and "coordinateV") on a geometry (given by the attribute "deformedGeometry").
It is used to track positions on a deforming surface. It derives positions from the closest points on a surface from the input transforms. By contrast, the uvPin node derives positions from specified UV coordinates.
Use the proximityPin node to attach objects to your geometry when you want to controls for repositioning inputs, or when clean UVs are not available.
See Proximity Pin, Create a Proximity Pin and Proximity Pin options for more.
rotationFromMatrix
The rotationFromMatrix node extracts the Euler rotation from a 4x4 transformation matrix. The nodes expect the given matrix to be a well formed transformation (rotation, scaling, translation) matrix. The expected rotation order is XYZ.
rowFromMatrix
The rowFromMatrix node returns the specified row from a 4x4 matrix. This node can be used to extract the translation from a 4x4 transformation matrix by selecting the 4th row.
scaleFromMatrix
The scaleFromMatrix node extracts the X, Y, Z scale from a 4x4 transformation matrix. The nodes expect the given matrix to be a well formed transformation (rotation, scaling, translation) matrix.
translationFromMatrix
The translationFromMatrix node extracts the X, Y, Z translation from a 4x4 transformation matrix. The nodes expect the given matrix to be a well formed transformation (rotation, scaling, translation) matrix.
transposeMatrix
The transposeMatrix node transpose the given matrix. A matrix's transpose is the matrix for which the matrix components are flipped over the diagonal. The value located at (row i, column j) will now be located at position (row j, column i).
uvPin
Note: uvPin is technically a matrix node.
Use this node to drive transforms directly by their matrix output.
Returns a matrix for each point (given by attributes "coordinateU" and "coordinateV") on a geometry (given by the attribute "deformedGeometry").
See UV Pin and Create a uvPin.
wtAddMatrix
Add a weighted list of matrices together.