Reproducing skeletal animation

hi

I’ve got a Maya skeleton in bind position and some animations applied to its joints which i would like to replay outside of Maya. The Maya joint documentation at Maya API: MFnIkJoint Class Reference says that the joint transform consists of:

transformation matrix = [S] * [RO] * [R] * [JO] * [IS] * [T]
[S] : scale
[RO] : rotateOrient (attribute name is rotateAxis)
[R] : rotate
[JO] : jointOrient
[IS] : parentScaleInverse
[T] : translate
There isn’t any scaling in this case so it boils down to:
transformation matrix = [RO] * [R] * [JO] * [T]

I think this will reproduce the animation if i multiply this matrix with [M]: the joint’s ‘matrix’ attribute saved while the skeleton is in the bind position.

I believe these correspond to the following joint attributes:
[RO] : rotateAxis - a vector of 3 floats, always 0 in this case. Seems to correspond to rotation angles, in degrees, about the world x,y,z respectively. The multiplication order seems to be [ROx] * [ROy] * [ROz]
[R] : rotate - a vector of 3 floats changing over time. If the joint ‘rotateOrder’ attribute corresponds to ‘xzy’, then the order of multiplication is [Rx] * [Rz] * [Ry]
[JO] : jointOrient - seems to behave the same as rotateAxis. From other posts i understand this is to allow artists to freeze the rotateAxis settings to 0 for the bind position.
[T] : translate - a vector of 3 floats changing over time

So the overall equation for each joint looks like:
global transformation = [M] * [ROx] * [ROy] * [ROz] * [Rx] * [Rz] * [Ry] * [JOx] * [JOy] * [JOz] * [T]

Does this look reasonable?

thanks!

Actually just did an experiment… the joint transform using the values for the bind position IS the equivalent of the ‘matrix’ attribute :cool: !