About them ANIMATIONs in KMF's. My animation models look like car wrecks, not in anyway recognizable. I think it is due to the vertice coordinates. I understood that if I read a data from a certain frame, it should be a complete model pose. In your document you, @werkt described that the coordinates are 10bit fixed point numbers :
The anim vector structure encodes a fixed-point
3 dimensional coordinate in 10 bits per dimension. This coordinate vector is
then scaled via ../../HEAD/scale and added to the ../../HEAD/pos basis to
transform into world space.
Bits Meaning
0:9 Z
10:19 Y
20:29 X
It seems I'm unable to read these correctly. I've tried countless of ways, like reading it as number (0-1023) / 1000 * scale, putting the binary point between the first and second bit etc. Nope. How can I read these, what is the magic? I'm pretty sure it is the coordinates. I attached some data of me trying to parse the imp's pickaxe blade from anim.
Code:
3rd geomery (pick axe blade), indices
ANIM Imp_Claim(land)start.kmf MESH: Imp.kmf
GEOM index: 255 GEOM index: 93
(0.22934061, 0.309546, -0.083577394) (-0.22019999, -0.0014, -0.3139)
GEOM index: 250 GEOM index: 92
(0.2296967, 0.23725769, -0.0800164) (-0.21329999, -0.0016, -0.2902)
GEOM index: 245 GEOM index: 91
(0.20655021, 0.1653255, 0.08735061) (-0.113, -0.0013, -0.30539998)
GEOM index: 260 GEOM index: 94
(0.2296967, 0.241887, 0.11939961) (-0.3053, -0.0022, -0.2527)
GEOM index: 245 GEOM index: 91
(0.20655021, 0.1653255, 0.08735061) (-0.113, -0.0013, -0.30539998)
GEOM index: 250 GEOM index: 92
(0.2296967, 0.23725769, -0.0800164) (-0.21329999, -0.0016, -0.2902)
GEOM index: 255 GEOM index: 93
(0.22934061, 0.309546, -0.083577394) (-0.22019999, -0.0014, -0.3139)
GEOM index: 260 GEOM index: 94
(0.2296967, 0.241887, 0.11939961) (-0.3053, -0.0022, -0.2527)