I've mentioned everything about the bones in my .gr2 specification; if you know a little bit about programming, you should be able to get the bones.vertalius wrote:I would like to know about bones export too...How did you do that? All the bones are weigted? Mesh is skinned?
http://wiki.xentax.com/index.php?title= ... model_file
Each NPC and each placeable with movable parts belongs to a certain body type. If you know which body type it is, you can look up the skeleton file.
is the skeleton file for female NPCs with body type 2 (in the files, this body type is called "bfn", which probably stands for "body female normal").
Skeleton files have the same structure as other .gr2 files, but the field I call "type of .gr2 file" is set to 0x02, and you can find a list of the bone joints at offsetBoneStructure = 0x70.
Each joint is defined with:
- uint32: offsetBoneName
- int32: parentBoneIndex
- 16 floats: 4x4 joint-to-parent rotation matrix
- 16 floats: 4x4 joint-to-root rotation matrix
With this information, you will be able to draw a skeleton yourself.
The regular .gr2 files then contain a list of joints that are used by the current model. Also, each dynamic model has a vertexSize of 32, so each vertex will contain information on up to four bones that influence it's position, as well as the weights for each bone. See the "Vertices" section of my specification for more information.
So with the information from the specification, you should be able to get a model with a skeleton structure. However, I have not yet figured out the format of the .jba, .mph and .amx files which contain the animations. If anyone has made any progress with those, please do share! Unfortunately, I lack the knowledge to parse the animations myself since that matrix Math is way above my head...