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?
Thanks for your patience
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?
Thanks for your patience
I think you have that backwards: matrix is the local transformation and worldmatrix is the concatenated one.
local means relative to its direct parent.
world means relative to world (aka relative to the sum of every parents).
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?
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.