I'm overdue for a progress report, but unfortunately there's not much progress to report.
My current procedure for placing bones and adjusting vertex locations is probably best illustrated with an example. Firstoff, Serge's joint data:
Joint Parent Rotation (deg) Displacement Last
0 -1 0.0, -89.9, 0.0 0, -528, 6 -1
1 0 0.0, 0.0, -90.4 0, 0, 0 0
2 1 0.0, 0.0, 6.2 112, 0, 0 1
3 2 0.0, 0.0, 0.0 231, 0, 0 2
4 3 -82.5, 89.9, 0 66, 53, 0 3
5 3 -82.5, 89.9, 0 66, 53, 0 4
6 2 0.0, 0.0, 90.0 180, 2, -115 -1
7 6 0.0, 22.5, 84.3 0, 0, 0 5
8 7 0.0, 0.0, 0.0 118, 0, 0 6
9 8 0.0, 0.0, 0.0 135, 0, 0 7
10 2 0.0, 0.0, 90.0 180, 2, 115 -1
11 10 0.0, -22.5, 84.3 0, 0, 0 8
12 11 0.0, 0.0, 0.0 117, 0, 0 9
13 12 0.0, 0.0, 0.0 136, 0, 0 10
14 13 90.0, 112.5, -0.8 459, 16, -420 -1
15 1 0.0, 0.0, 90.0 0, 0, -56 -1
16 15 0.0, 1.1, 90.0 0, 0, 0 11
17 16 0.0, 0.0, -4.0 167, 0, 0 12
18 17 0.0, 0.0, 0.0 291, 0, 0 13
19 1 0.0, 0.0, 90.0 0, 0, 56 -1
20 19 0.0, -1.1, 89.9 0, 0, 0 14
21 20 0.0, 0.0, -4.0 167, 0, 0 15
22 21 0.0, 0.0, 0.0 291, 0, 0 16
To my understanding the joints with a -1 in the last 2 bytes (corresponding to the last column of the table above) are "origin joints" (my terminology) in the sense that all bones that are children of that joint are translated and rotated using that point as the origin. This column probably represents bone number, with -1 entries meaning that no bone exists between that joint and its parent.
For each joint, a position vector is formed by summing the displacements of all joints between the origin joint and the current joint, inclusive. This vector is then rotated around its origin joint by the sum of the rotations of all joints between the origin joint and the current joint, inclusive. The rotated vector denotes the actual position of that joint.
As an example, take joint 8. Its parent joint is joint 7, whose parent joint is joint 6, which is an origin joint. The unrotated position vector would be (180, 2, -115) + (0, 0, 0) + (118, 0, 0) = (298, 2, -115), and the rotation would be around the origin joint of (180, 2, -115) by the angles (0.0°, 0.0°, 90.0°) + (0.0°, 22.5°, 84.3°) + (0°, 0°, 0°) = (0.0°, 22.5°, 174.3°).
This interpretation seems to work great for all of Serge's joints/bones except joints 4 and 5, corresponding to the tips of his bandana. In the attached image you can see neither the vertices nor the bones are anywhere close to their proper locations. (They are, however, close to one another, which is good considering I apply the transformation described above to both joints and vertices.) I haven't had much luck figuring out what the problem is.
I hope at least some of that makes sense, and I hope someone has advice.
[attachment deleted by admin]