Answered how does the sdk caculate joint local rotation?

  • Monday, July 02, 2012 4:52 AM
     
     

       i am now trying to use the joint orientation to animate a custom avatar, i have done many search works and found some informations :

       <1>the msdn about the joint orientation of this sdk[here] demostrate that joints in sdk use different local axes

             these images shows the joint axes:

               

      <2> the avateering-xna sample tells the local axes of each joint       

              these below are main of them:

              spine,head : x left in body,y up, z forward

              leftshouder,elbow:y along arm( left in body?) x down, z forward

              right shoulder,elbow:y along arm(right in body?) x up, z forward

              lefthip,righthip:y along leg(down) x right ,z forward

             in here ,we see joints of shoulder and elbow have same local axes, but in <1> they are different, this is why ? or i misunderstand about this ?

       <3> Mauro Giusti [msft] says in a thread that all joints lie on the y-axis

             but this is also contradict to <1><2> ,because left shoulder and left elbow ,their y axes don't lie on y-axis

        

         what exactly the local axes sdk use?

     


    • Edited by Justin.Ko Monday, July 02, 2012 5:13 AM
    •  

All Replies

  • Monday, July 02, 2012 5:06 AM
     
     

        also, i do some experience with the avateering-xna sample, do some usual poses and trace out their HierarchicalRotation quaternions

       quaternion's vector is normalized for better understanding.

      <1> pose 1 ,two hands lay down

       http://social.msdn.microsoft.com/Forums/getfile/130637    

    (i just can use two images per message , so ...i quit this image)

       chest quaternion  (w,x,y,z) 0.993 -0.997 -0.033 -0.064        neck quaternion (w,x,y,z) 0.982 0.951 -0.055 0.303
    left shoulder quaternion (w,x,y,z) 0.914 0.029 0.039 -0.999    left elbow quaternion  (w,x,y,z) 0.987 0.961 0.043 -0.272
    right shoulder quaternion (w,x,y,z) 0.920 0.102 0.009 0.995   right elbow quaternion (w,x,y,z) 0.993 0.944 -0.038 0.329
    left hip quaternion (w,x,y,z) -0.046 -0.002 -0.110 0.994         right hip quaternion (w,x,y,z) 0.036 -0.002 -0.083 0.997

    <2> pose2

    chest quaternion  (w,x,y,z) 0.960 -0.994 0.110 0.014              neck quaternion (w,x,y,z) 0.993 0.945 -0.036 0.324
    left shoulder quaternion (w,x,y,z) 0.651 0.892 -0.369 0.261     left elbow quaternion  (w,x,y,z) 0.976 1.000 0.000 0.000
    right shoulder quaternion (w,x,y,z) 0.751 0.752 0.081 -0.655   right elbow quaternion (w,x,y,z) 0.991 0.613 0.065 -0.788
    left hip quaternion (w,x,y,z) -0.032 -0.005 -0.151 0.988          right hip quaternion (w,x,y,z) 0.038 0.000 -0.119 0.993

    <3> pose3 two hands raise up

    chest quaternion  (w,x,y,z) 0.959 -0.996 -0.015 -0.089           neck quaternion (w,x,y,z) 0.995 0.714 -0.049 0.698
    left shoulder quaternion (w,x,y,z) 0.826 0.288 -0.935 0.207    left elbow quaternion  (w,x,y,z) 0.694 1.000 0.000 0.000
    right shoulder quaternion (w,x,y,z) 0.824 0.178 0.976 -0.125  right elbow quaternion (w,x,y,z) 0.694 1.000 0.000 0.000
    left hip quaternion (w,x,y,z) -0.045 -0.001 -0.068 0.998         right hip quaternion (w,x,y,z) 0.042 0.005 -0.042 0.999

    from these results , i got some confusing questions:

    <1>chest and neck ,their quaternion's vectors are in opposite direction?

    <2> in pose 1 ,left shoulder quaternion (w,x,y,z) 0.914 0.029 0.039 -0.999 ,its main axis is z(-0.999 )

    in pose2 ,left shoulder quaternion (w,x,y,z) 0.651 0.892 -0.369 0.261 ,its main axis is x(0.892)

    in pose3 ,right shoulder quaternion (w,x,y,z) 0.824 0.178 0.976 -0.125,its main axis is y(0.976)

    the three poses are rotate around z axis in real world , they should have the same main axis , but why in here there are changed , why?

    now i am asking how does sdk calculate the rotations ,or hoping you can give me an answer to may quesiton.



    • Edited by Justin.Ko Monday, July 02, 2012 5:08 AM
    • Edited by Justin.Ko Monday, July 02, 2012 5:11 AM
    •  
  • Tuesday, July 03, 2012 7:36 AM
     
     Answered

      finally i find that it is the problem of the local axes

      


    • Marked As Answer by Justin.Ko Tuesday, July 03, 2012 7:36 AM
    • Edited by Justin.Ko Tuesday, July 03, 2012 8:33 AM
    •