After Effects

Published September 30, 2005
Advertisement
Today I spent some time trying to convert some 3D animation information I had laying around into a form that Adobe After Effects would take. Adobe After Effects stores two sets of rotation information for 3D layers: one called Orientation, and then X Rotation, Y Rotation and Z Rotation. Orientation is actually represented internally as a quaternion; however, it's expressed to the end user as a series of rotations, X, Y and Z. This is annoying, but something that you can live with. Or at least, since I'm a programmer I can live with it since I can automate the task of converting quaternions to the Euler angles.

The part that boggles my mind is that the rotations are X degrees counter clockwise around the X-axis, then Y degress clockwise about the Y-axis, and then Z degrees clockwise about the Z-axis. When I first saw that I said, huh, must be a left handed system, not a right handed system. Then I looked at the layer information, and there in the comp window are the three axes of rotation, and yup, it's CCW about the X, CW about the Y and CW about Z.

So after spending about an hour screwing up the derivation of the quaternion conversion to the After Effects Orientation format on paper, I finally sat down with IDLE and brute forced a derivation. That is taking each component of the rotation matrix that represents a given quaternion and applying arc sines, arc cosines and arc tangents to various combinations of the matrix elements until I got the orientation back that I used to generate the quaternion.

It's a hack, but it works. At least out to the square root of epsilon of a double for all the inputs I've tried so far, which is good enough for me.
Previous Entry Not much
Next Entry Well crap
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

New bug to me

1910 views

Week/Class 9

1740 views

Week/Class 8

1788 views

Week/Class 7

1835 views

The promised files

2115 views

Week/Class 6

1518 views

Week/Session 5

1578 views

Week/Session 4

1519 views

On the soapbox

1636 views

Week/Session 3

1493 views
Advertisement