• Advertisement
Sign in to follow this  

X files AnimationKey object question

This topic is 4362 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm using maya to export x files and have already made a parser that parses frame data and animation data. My problem is when I'm going to read the keyframes in an AnimationKey object. Basically an Animation object has n number of AnimationKey objects. The x files maya exports always has three AnimationKey objects per Animation object. These three (represented by a key type) are for rotation, scaling, and translation. So that's ok. I have a running animation where the arms just sway forwards and backwards alternately. No other bones are manipulated. So when I look up in the x file's AnimationKey object every joints other than the two arms have constant values througout their KeyFrames since they aren't altered in the animation. That much I understood. When I look up the scale AnimationKey object of the left and right arms (represented by Type 1). The values are three float numbers with 1; 1; 1; which means that there is no scaling happening in any of the three axis. When I also looked up their translation AnimationKey object, the values throughout the keyframes are constant meaning there is no translation happening in the animation. But the my problem lies in the rotation AnimationKey object. It is represented by four float numbers. I'm very new to this format. What kind of format can represent a rotation by using four float numbers? I truly apologize if the post is very long. I hope you guys can help me. Thank You.

Share this post


Link to post
Share on other sites
Advertisement
I think rotations are represented by quaternions in that format. Sorry I can't be more helpful, I always just let D3DX take care of it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes they are quaternions. The components are stored in the file in this order -> w x y z. I have to negate the w component when reading in the keys in my code for them to work right.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement