you need to think through the whole system, and not just focus on each piece independently.
  If all you want is to take an animated hierarchy that's vertical in MAX but is now lying face-down in your system, just add a node at the root and apply 90' rotation on X. All the rest of the data (assuming the handedness is the same!) will work just fine, since it's all relative to the root.  However, if you want or need to modify the local coordinate system of each object in the hierarchy, you need to account for that in the transforms between each node by applying the inverse of your mesh transforms.
  Writing it out algebraically can help a lot - it forces you to see where you're applying transforms and helps identify where any inconsistencies in your approach might be.
 
Peter
-----Original Message-----
From: gdalgorithms-list-admin@lists.sourceforge.net [mailto:gdalgorithms-list-admin@lists.sourceforge.net]On Behalf Of Ryan Greene
Sent: Wednesday, March 31, 2004 11:47 AM
To: gdalgorithms-list@lists.sourceforge.net
Subject: [Algorithms] RE: Using animation keys from 3DSMax

Okay, so my swap is incorrect... but that isn't the problem I'm dealing with. I can properly transform the mesh and skeleton, however since the rotation keys I'm getting are in Max's space I can't apply the rotations to the skeleton properly. It would seem that I would need to convert the quat from max's z-up space to my y-up space... however I am having difficulty doing that conversion. This is why I wanted to keep the mesh in max's z-up space, and then do the conversion when I build each bone's matrix (it's free).
 
 
 
Swapping your Y and Z is not sufficient to change your coordinate system. And if you need to change handedness you have to do other things. Assuming your handedness is the same, you need to perform a clockwise 90 degree rotation about x.  (or swap y and z and negate one of them.)
For example, if your engine is the same handedness as MAX swap the y and the z and negate the Y.  This works for me as the engine that I'm working on right now has the same handedness as MAX.
swap =3D -y;
y =3D z;
z =3D swap;

As a side note, are you doing the swizzle at run-time?  If so why?  Why not take care of this at export time, then you never have to worry about using MAX's coordinate system to calculate the parent matrices using your coordinate system.
--Pete