Jump to content
  • Advertisement


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


Mapping orientations question?

This topic is 5575 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

I am attempting to write an exporter from Hash Animation Master (really good, and in-expensive 3d modeling and animation program) to an 3D engine skeleton format (Ogre graphics engine - ogre.sourceforge.net). Anyways, In the Hash SDK I have access to the bones of the model, and their orientation in 2 ways. 1. Global, the bone''s orientation relative to the global x,y,z axis. and 2. Local, where the Z-axis runs the length of the bone, Y-axis is the dir of the roll bar, etc. The graphics engine I''m using requires bones to be relative to their parents. i.e. The finger bone''s orientation is relative hand bone''s, and so on. Can anyone tell me how I can convert what I have (global, and local orientations of the bones) to what I need (orientation based on the parent''s orientation)? The SDK gives me access to the bone''s orientation (global or local) in terms of quaternions and 34Matrices, and ultimately I need a quaternion to represent the "relative" orientation. Hope this question is fairly clear, I have very little knowledge of 3D math and am begging for any help. The HBone orientation functions I have access to are as follows:
Matrix34  GetLocalMatrix () 
Matrix34  GetGlobalMatrix () 
void  GetLocalTSQ (Vector &translate, Vector &scale, Quaternion &quat) 
void  GetLocalTSE (Vector &translate, Vector &scale, RotateEuler &re) 
void  ComputeBoneDirections (Vector &bonedir, Vector &rolldir, Vector &parentbonedir, Vector &parentrolldir) 
const Matrix34 &  GetStandardToAction () 
Thanks, Jeff Plummer

Share this post

Link to post
Share on other sites
Aren''t the functions returning the "local" orientation what you need? I don''t know the SDK, but that''s what it looks like to me (unless "local" means "model space" and "global" means "world space").

If not, you can get the "local" orientation by taking the "global" orientation and multiplying it by the conjugate of the "global" orientation of its parent.

Share this post

Link to post
Share on other sites

  • 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!