# Transform node matrix attributes

#1

Hi,

What is the exact difference between worldMatrix and Matrix attributes? What about xformMatrix?

If the final matrix is the matrix attribute then what does the worldMatrix do?

#2

I think you have that backwards: matrix is the local transformation and worldmatrix is the concatenated one.

#3

local? does is mean parentMatrix? then what about parentMatrix?

#4

local means relative to its direct parent.
world means relative to world (aka relative to the sum of every parents).

#5

well, there’s no matrix named “local” in the list of attrs. if by local we mean parentMatrix, then what would be the difference between matrix and parentMatrix attrs?

#6

The matrix “Matrix” is the local one

#7

what is “parentMatrix”?

#8

I guess all you need is in the node documentation:

• `matrix`: Local transformation matrix for the dagNode.
• `worldMatrix`: The worldMatrix instanced attribute is the 4x4 transformation matrix that transforms the object to world-space. There is a world-space matrix for each unique path to the object. Eg. ‘ball.worldMatrix[0]’ identifies the world-space transformation matrix for the first instance of the object ‘ball’. Each world-space transformation matrix is the result of post multiplying the ‘matrix’ attribute by corresponding ‘parentMatrix’ instanced attribute (i.e. worldMatrix[i] == matrix x parentMatrix[i]). Thus, the worldMatrix is the concatenation of the ‘matrix’ attribute of all the dagNodes along the path from the node up to the root of the dag hierarchy.
• `parentMatrix`: The parentMatrix instanced attribute represents the world-space transformation matrix for the parents of this dagNode. If the dagNode is a transform node and its inheritTransform attribute is false, then the parentMatrix is identity.

#9

I went over it before creating the topic but somehow i get it better now. thanks