Beer glass scene creation
This course contains a little bit of everything with modeling, UVing, texturing and dynamics in Maya, as well as compositing multilayered EXR's in Photoshop.
# 1 01-03-2012 , 03:58 PM
Registered User
Join Date: Mar 2012
Posts: 1

Rotation Matrix from transform, rotation, and pivot

Hi all,

I have a problem where i trying to develope a rotation matrix knowing a objects transform (x,y,z), rotation (x,y,z) world pivot (x,y,z). i think key is to figure out theta from rotation (x,y,z), but don't know. This might be a basic algebra question, but i'm trying to do it in maya. Thanks for any help.

Do i do it like theta = tan-1 (-z/sqrt(x^2+y^2)) from xyz of rotation and go from there?

thanks

# 2 01-03-2012 , 04:07 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Hi devthep, you mean like an OpenGL rotation matrix?

You can get the transformation matrix of an object by running the following:

Code:
xform -q -m `ls -sl`;
This will give you a standard 4x4 matrix. If the object is at the origin, and has not been modified, it returns the 0-1 identity matrix. You can then decompose it to find the rotation matrix.

You can also do the following in python: www.akeric.com/blog/?p=1067


Imagination is more important than knowledge.

Last edited by NextDesign; 01-03-2012 at 04:17 PM.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads