Archived

This topic is now archived and is closed to further replies.

SGreth

Quarternion/3DSMax/.X files =)

Recommended Posts

Scenario: In 3DSMax I have a cube that spins 360 on it''s Y axis. I export it in the .3DS file and change it over to the .X file format. What I have: The last keyframe for this animation has a quarternion for -1,0,0,0 glRotate(something, 0, 0, 0) doesn''t seem to work too well, and I believe that if in 3DS max I''m spinning on the Y it should be glRotate(something, 0, 1, 0). Does anybody know where along the line things could be going wrong (3DS Max, .X file converter...) NOTE: If I rotate less than or greater than 360 I get an exported value for the Y axis on the quarternion...can you not rotate something exactly 360 and export it? Thanks, ~S''Greth

Share this post


Link to post
Share on other sites
If your cube spins 360 degrees, then the last keyframe would be (-1,0,0,0) because that would place it right back where it started ,assuming your cube''s transform started off as that quaternion (which evaluates to the Identity matrix). Quaternions only represent an orientation, not the complete transform it took to get there.

Also, I don''t know about OGL, but when I worked with this, I wrote a MaxScript to export what I needed, and found that the Y and Z axes were reversed in MAX (Y was going into the screen and Z was going up), I''m not sure how the X file represents it, but it''s something to keep in mind.


Zeus Interactive

Share this post


Link to post
Share on other sites