Jump to content
  • Advertisement

Archived

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

cseger

OpenGL Rotation conversion (3DS MAX to OpenGL)

This topic is 5559 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 trying to write a 3DS MAX exporter plugin, I''m using Valve''s SMD exporter for helping me understand the MAX SDK. Now I want to convert MAX''s coordinate system (X=right, Z=up, Y=Away from camera) to OpenGL''s (X=right, Y=up, Z=Towards camera). This is easy with coordinates (switch Y and Z then negate Z) but with rotations, it''s a different matter. Valve''s SMD exporter does this: (when extracting skeleton) { CurrNodeTM = CurrNodeTM * Inverse(ParentTM); AffineParts affparts; float rgflXYZRotations[3]; decomp_affine(CurrNodeTM, &affparts); QuatToEuler(affparts.q, rgflXYZRotations); float xRot = rgflXYZRotations[0]; // in radians float yRot = rgflXYZRotations[1]; // in radians float zRot = rgflXYZRotations[2]; // in radians } How do I convert xRot, yRot, zRot to OpenGL''s system? I''m sort of stuck and I need pointers on what to read up on, links, anything? I should add that I''m new to Quaternions... Christian

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!