decomposeMatrix plugin
In a standard maya package (at least since 8.5) there’s plugin with a rather foggy for a lot of people name decomposeMatrix. This plugin adds a pretty useful node with the same title that could be used to convert standard 4×4 transform matrix to translation, rotation, scale and shear.
Practical usage – to have a node in a setup of some kind that returns world space values of object’s transformations via plugging it’s worldMatrix into this node. Generally, the result is identical to using parentConstraint + scaleConstraint, but calculations speed doesn’t drop with depth of hierarchy above this object (as it does with constraints), setup is a bit simpler and everything is done via single node.
To use it make sure that decomposeMatrix.mll plugin is loaded in Plug-in Manager:
and create this node with a command:
createNode decomposeMatrix;
Additional trick – you can plug matrices of different objects through choice node into decomposeMatrix to switch between them:
P.S. If you need just world space coordinates of the object – without rotate and scale – the most efficient node to use is pointMatrixMult:
In: Rigging · Tagged with: choice, constraint, decomposeMatrix, matrix, maya, plugin, pointMatrixMult, worldPosition
on 4 September 2009 at 13:51
Permalink
once again great info! never knew about that and that’s very usefull
on 7 September 2009 at 22:10
Permalink
Hello,
Do you know if ‘decomposeMatrix’ can be used to extract a non-flipping ‘Y’ rotation from a path animated object?
Cheers,
j.
on 8 September 2009 at 4:35
Permalink
I’m not sure about that. It just translates matrix into TRS values, the same thing that maya does. If there’s a flip it should flip after decomposeMatrix also. But it won’t hurt to try anyway 🙂
on 15 October 2009 at 1:46
Permalink
спасибо огромное, сегодня очень пригодилось!