I created a simple chain of bones, and then export them to the .dae format. However, I don’t understand the transformation matrices used for each bone. For my test case, I defined 5 bones, all in a straight line along the z axis, each bone 2 units high, and the grand parent at the bottom.
The transformation matrices from the node tree is as seen below. Notice how bone2 is different from the others, it has a reflection in x and z. Why is that? Or am I missing something?
I used Assimp to import the data, but I checked with the .dae file that I did not do anything wrong.
Node 'Scene' relative (This will give a rotation)
1.00 0.00 0.00 0.00
0.00 0.00 1.00 0.00
0.00 -1.00 0.00 0.00
0.00 0.00 0.00 1.00
Node 'Armature' relative (identity matrix)
1.00 0.00 0.00 0.00
0.00 1.00 0.00 0.00
0.00 0.00 1.00 0.00
0.00 0.00 0.00 1.00
Node 'Bone1' relative (counter rotation, back again)
1.00 0.00 0.00 0.00
0.00 0.00 -1.00 0.00
0.00 1.00 0.00 0.00
0.00 0.00 0.00 1.00
Node 'Bone2' relative (m11 and m33 is -1, giving reflection in x and z)
-1.00 0.00 -0.00 0.00
-0.00 1.00 0.00 2.00 // This 2 will translate 2 steps, as expected
0.00 0.00 -1.00 0.00
0.00 0.00 0.00 1.00
Node 'Bone3' relative
1.00 0.00 -0.00 0.00
-0.00 1.00 0.00 2.00 // Another 2 steps translation, as expected
0.00 0.00 1.00 0.00
0.00 0.00 0.00 1.00
...