![](https://uploads.gamedev.net/forums/monthly_2020_06/b8f6a0233ed94062b1ed309f6539e885.Unlink-joint.png)
I try to draw a bind pose but unsure which one is ROOT JOINT, Armature or Torso based on .DAE below ?
<library_visual_scenes>
<visual_scene id="Scene" name="Scene">
<node id="Armature" name="Armature" type="NODE">
<matrix sid="transform">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
<node id="Armature_Torso" name="Torso" sid="Torso" type="JOINT">
<matrix sid="transform">1 0 0 0 0 0 -1 0 0 1 0 1.839252 0 0 0 1</matrix>
<node id="Armature_Chest" name="Chest" sid="Chest" type="JOINT">
<matrix sid="transform">1 0 0 0 0 0.9907115 0.13598 0.4981391 0 -0.13598 0.9907116 0 0 0 0 1</matrix>
<node id="Armature_Neck" name="Neck" sid="Neck" type="JOINT">
<matrix sid="transform">1 0 2.38418e-7 0 4.80604e-8 0.979472 -0.20158 0.593905 -2.33524e-7 0.20158 0.9794721 2.23517e-8 0 0 0 1</matrix>
<node id="Armature_Head" name="Head" sid="Head" type="JOINT">
<matrix sid="transform">1 1.58594e-8 5.28104e-10 -3.55271e-15 -1.58594e-8 0.9977852 0.06651904 0.1734397 5.2799e-10 -0.06651904 0.9977853 7.45058e-9 0 0 0 1</matrix>
1. How to put the equation based on information above to draw the bind pose from Torso to Head ?
2. Which one is Root joint matrix ? the Armature or Torso ?
3. In Collada the <matrix sid="transform">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix> and <param name="TRANSFORM" type="float4x4"/>, any different ? Because under <matrix...>, I have to do the transpose so I can work with row-major matrix multiplication as shown below:
For other joints below, I have transposed all matrices to ( col-major so x, y, z are served as transform ) such as:
Torso:
1 0 0 0
0 0 -1 0
0 1 0 1.839252
0 0 0 1
Transposed became row-major transform below:
1 0 0 0
0 0 1 0
0 -1 0 0
0 0 1.839252 1
4. I wrote a pseudo code just to iterate up to Torso:
bsm...bind_shape_matrix
b0....Armature
b1....Torso
b2....Chest
b3....Neck
b4....Head
w.....matrix at coordinate (0,0,0) row-major matrix:
0 0 0 1
0 0 0 0
0 0 0 0
0 0 0 0
t, B1, B2.....temporary matrix buffer.
// joint_world_matrix = bind_shape_matrix * ( parent_matrix_joint_0 * joint_matrix_joint_0 )
t = w * b0 // Armature
w = bsm * t;
B1 = w; // save to B1 matrix.
t = w * b1 // Torso
B2 = bsm * t;
.
.
.repeat until b4.
Draw the bind pose (line) from B1 to B2.
Please help to correct me if above above calculation is correct or not ?
4. Based on the female skeleton, how to start the UpperArmRight joint matrix ( red circled ) calculation as shown below, since it is another root ?
Please advise.