#### Archived

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.

## 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 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.

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
13

• 14
• 10
• 23
• 9
• 57
• ### Forum Statistics

• Total Topics
632639
• Total Posts
3007604
• ### Who's Online (See full list)

There are no registered users currently online

×