I was doing some digging into Blender architecture for a exporter script and had a few questions.

What is the nature of data stored in the following matrices. In particular, is there any hierarchical relation between matrices :

1. Pose.PoseBone.localMatrix

2. Pose.PoseBone.poseMatrix

3. Armature.Bone.matrix

I am trying to export a mesh with armature and the problem I am facing is this . . .

The DirectX Mesh format (.X file) specifies a bone chain (i.e. a bone and it's linked children) with FrameTransformMatrices. The child bone matrix should be an offset from the parent matrix. So the final matrix for the child is obtained from multiplying the parent matrix with the child matrix. This is what I picked up from GameDev.net :

Code: Select all

```
1. Combined_MatrixBone = Local_MatrixBone * Combined_MatrixParent
2. Final_MatrixBone = Skin_OffsetBone * Combined_MatrixBone
```

Code: Select all

```
Frame ParentBone {
FrameTransformMatrix {
Local_MatrixBone
}
Frame ChildBone {
FrameTransformMatrix {
Local_MatrixBone
}
}
}
```

Code: Select all

```
1. Local_MatrixBone = Combined_MatrixBone * (1/Combined_MatrixParent)
2. Skin_OffsetBone = Final_MatrixBone * (1/Combined_MatrixBone)
```

I have gone through the API documentation available at the blender site that I downloaded but it was not clear enough for me.

Hoping desperately to get some help.