Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / How to convert global translation to local translation ?
  RSS 2.0 ATOM  

How to convert global translation to local translation ?
Rate this thread
 
49259
 
Permlink of this thread  
avatar
  • qiaochu
  • Posted: 09 November 2010 09:40 AM
  • Total Posts: 15
  • Joined: 25 October 2010 04:23 PM

I have a human skeleton, I got the global position for each bone, take headNode for example, between two keyframes I got the global translation, how to get the local translation for headNode?

Thank you very much !

Have a nice day!



Replies: 1
/userdata/avatar/vx3501hqr_small.jpg

It follows a very simple and basic rule:
ChildGlobal = ParentGlobal * ChildLocal
So ChildLocal = ParentGlobal.Inverse() * ChildGlobal.
If the node do not have a parent, which means it is already the top one in the hierarchy,
then its Global == Local.

For Translation specifically:
ChildLocalTranslation = ParentGlobal.Inverse() * ChildGlobalTranslation
Notice: ParentGlobal is the whole transform matrix, not just the translation.

Take a look at the following post should also be helpful:
http://hilscreate.blogspot.com/2009/03/space-global-object-local.html

Author: Jiayang Xu

Replied: 09 November 2010 01:16 PM  
avatar

Or you can use quaternions.  If your not careful you can loose a axis with matrices.



Replies: 0
avatar
  • qiaochu
  • Posted: 11 November 2010 07:10 AM

Thank you very much !



Replies: 0
avatar
  • qiaochu
  • Posted: 15 November 2010 09:22 AM

Hi, thank you for your reply.
You said:
“It follows a very simple and basic rule:
ChildGlobal = ParentGlobal * ChildLocal
So ChildLocal = ParentGlobal.Inverse() * ChildGlobal.
If the node do not have a parent, which means it is already the top one in the hierarchy,
then its Global == Local.
For Translation specifically:
ChildLocalTranslation = ParentGlobal.Inverse() * ChildGlobalTranslation
Notice: ParentGlobal is the whole transform matrix, not just the translation. “

Could you tell me how to get ParentGlobal.Inverse() for position and translation ?
And how to get the local coordinate system ?



Replies: 1
/userdata/avatar/vx3501hqr_small.jpg

Please refer to the FBX SDK FAQ:area.autodesk.com/forum/autodesk-fbx/fbx-sdk/fbx-sdk-faq/
Entry 2.11 and 2.12

To get inverse, you simply call KFbxXMatrix::Inverse().

Author: Jiayang Xu

Replied: 15 November 2010 01:02 PM