Jump to content
  • Advertisement

Motion builder global rotations

Recommended Posts

I am a beginner in computer graphics but i have solid understanding of linear algebra. I am trying to implement my own forward kinematics for a skeleton. I defined global and local translation vector in child-parent relationships but i am struggling with propagation of rotations from the node n to n+1, n+2 ...

I figured that motion builder uses XYZ rotation order. I created a matrix to transform child vector and "rotate it". 

But if i have 3 joints where 1st is parent to 2nd and 2nd is parent to 3rd, if i rotate 1st joint say (10,20,0) locally, i get accurate global position for 2nd and 3rd joint but if i have a local rotation of 2nd joint say (20,0, 0) on top of (10, 20, 0) for the 1st, my 3rd joint's position is wrong. I notice there should be some stacking so that i should probably do (10+20, 20+0, 0+0) for the second rotation but i am not sure why is that the case. 

If i could get some links or a book that will address this topic, i would appreciate it. Thanks!

Share this post

Link to post
Share on other sites
Posted (edited)

To calculate global transformation of child you have to multiply a global transformation of parent by transformation of child that is  respective to parent. So 1st prent is always in global basis. production of its tranformation to 2ndgive  a global transformation of 2nd. now multiply it to 3rd and you have a global transformation of 3rd. It really works like a stack - for each child you multiply parent global position by its child local transformation then use it to process a childs of it child and so on for whole tree of basises. When some object change a local transformation, its global transformation and global transformations of each  subtree of its childs have to be recalculated.


Edited by Fulcrum.013

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!