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.

decomposeMatrix Interface

decomposeMatrix Interface

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.

decomposeMatrix plugin loaded

To use it make sure that decomposeMatrix.mll plugin is loaded in Plug-in Manager:

decomposeMatrix network

decomposeMatrix network

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:

decomposeMatrix with choice plugged in

decomposeMatrix with choice plugged in

P.S. If you need just world space coordinates of the object – without rotate and scale – the most efficient node to use is pointMatrixMult:

pointMatrixMult generates locator's coordinates in world space

pointMatrixMult generates locator's coordinates in world space

Posted on May 23, 2009 at 3:33 by · Permalink
In: Rigging · Tagged with: , , , , , , ,

4 Responses

Subscribe to comments via RSS

  1. Written by matt
    on 4 September 2009 at 13:51
    Permalink

    once again great info! never knew about that and that’s very usefull

  2. Written by jayster
    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.

  3. Written by Sagroth
    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 🙂

  4. Written by SomeSanctus
    on 15 October 2009 at 1:46
    Permalink

    спасибо огромное, сегодня очень пригодилось!

Subscribe to comments via RSS

Leave a Reply