For a learning purpose, I'm writing a small reader for mhx2 files in c++ and OpenGL (project available here: https://github.com/Jeanmilost/MakeHuman/)
My final purpose is to animate the model by rigging the skeleton with an animation read from a Filmbox (.fbx) file. Currently I may draw the model successfully, I'm able to build the skeleton (I can also draw it, e.g by pressing the [1] key in my above project), and I already extracted the weights data, which are ready to be used.
However I noticed that a data is missing in order to successfully achieve my project. Indeed, I cannot find any weight matrix in the whole .mhx2 file.
For example, any Filmbox (.fbx) file contains a such matrix in its deformers (see the TransformLink matrix) ...:
- Code: Select all
Deformer: 74303680, "SubDeformer::calf_l_laure_source_mh", "Cluster" {
Version: 100
UserData: "", ""
Indexes: *360 {
a: 4146,9055,9057,9058,[...]
}
Weights: *360 {
a: 0.00510000018402934,0.0082999998703599,0.0135000003501773,0.010499999858439,[...]
}
Transform: *16 {
a: 0.999574184385344,-0.000827508388654136,-0.0291679352521862,0,0.000720479628384557,-0.998593092084758,0.0530211329493891,0,-0.0291707750657101,-0.0530195703534821,-0.998167276351283,0,-10.9260759398066,46.6885032726829,-3.22593307514371,1
}
TransformLink: *16 {
a: 0.999574184417725,0.000720479583833367,-0.0291707757860422,0,-0.000827508436385407,-0.998593151569135,-0.0530195720540331,0,-0.0291679363642472,0.053021134410156,-0.998167336074704,0,10.8659648895264,46.8017349243164,-1.06333863735199,1
}
}
...as well as any DirectX (.x) file (see the last line, which is a 4x4 matrix):
- Code: Select all
SkinWeights {
"Bip01_Spine3";
360;
1050,
1051,
1052,
1054,
1057,
[...]
1.000000,
1.000000,
1.000000,
0.394761,
0.394761,
[...]
0.000000,-0.000002,1.278853,0.000000,1.100796,0.223046,0.000001,0.000000,-0.291970,1.440953,0.000002,0.000000,28.876726,-65.051079,-0.142296,1.000000;;
}
So where may be read a such matrix from a MakeHuman (.mhx2) file? Where it is hidden?
Regards