Skip to main content
GameDev.net gamedev.net
🔒 Locked

X File Format Question

Started by SGreth Oct 10, 2000 at 9:57 AM 4 replies 350+ views
Original Post
SGreth
SGreth
I''m using the X file format right now to read in some converted .3ds models into my OGL encapsulation. Currently I''m working on reading in the animation templates and I''ve succesfully got the scale key''s to work...now I''m onto rotation and having some problems understaing how it works. In 3DSMAX I have a cube which rotates 360 degrees which resulted in two keyframes. 1.0000, 0.0000, 0.0000, 0.0000 -1.0000, 0.0000, 0.0000, 0.0000 How on earth do these numbers translate into rotation? I tried some more complex situations and noticed that no number is ever over 1 or under -1 which leads me to beleve that somehow 1 = 360 and -1 = -360 (or something of the like). If anybody has any good sites or docs I would be very apreciatve! Thanks a ton, ~S''Greth "Live not, code not."
"The difference between insanity and genius is measured only by success."~Bruce Feirstein
3dModelMan
3dModelMan
Without knowing anything about 3ds or much of the file formats mentioned, I''d guess you''re looking at an angle in Radians.

Where 1 = 180 degrees, -1 = -180 degrees.

Cheers

Matt



Check out my project at:www.btinternet.com/~Matthew.Bennett
SGreth
SGreth
quote:
Original post by 3dModelMan

Without knowing anything about 3ds or much of the file formats mentioned, I''d guess you''re looking at an angle in Radians.

Where 1 = 180 degrees, -1 = -180 degrees.



That sure would make a lot of sense
Thanks for that one, I let that thought slip by me!

~S''Greth
"The difference between insanity and genius is measured only by success."~Bruce Feirstein
Photon
Photon
The 4 number series there is a quaternion representation
of the rotation.
There are articles (on gdnet) that show how to convert
from/to quaternions/matrices.
fifty1
fifty1
For the record, 1 radian is NOT 180 degrees. PI radians is 180 degrees.

But anyways, Photon is probably right -- it looks like a quaternion. The 1 and -1 are the cosines of the angles, in this case 0 degrees and 180 degrees.
SGreth
SGreth
quote:
Original post by fifty1

For the record, 1 radian is NOT 180 degrees. PI radians is 180 degrees.

But anyways, Photon is probably right -- it looks like a quaternion. The 1 and -1 are the cosines of the angles, in this case 0 degrees and 180 degrees.


Cool beans, [pulling out pen and paper] now I''m off to hunt down the conversion of quarternions to matricies

Thanks,
~S''Greth

"The difference between insanity and genius is measured only by success."~Bruce Feirstein

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.