Okay, after implementing Bayonetta 2 motions in the plugin I though I would make a recapitulation of the findings contained in the previous posts. I will be using Binary Templates from https://www.sweetscape.com/010editor/templates.html to describe the file structure. Thanks again Alquazar for the help.

the value is an union and can be either a float or an offset in the file. This is decided based on the value of the flag. if the flag is 0x00 then value is a float (and elem_number seems to be ignored). Here is an example (generated with this version of the plugin https://github.com/Kerilk/noesis_bayone ... d66e8efe7a):

this model has 4 bonessee: em020b_002.mot.log

value of index 0,1,2 could be position offset and value 3,4,5 could be Euler angles. Or something else I don't really know.Sometimes you can find index 7, 8 and 9. (coud be scaling values ?)The last record is always (as far as I can tell): 32767 -1 0xff 0 0 +0.000000

If the flag is 6 then the union is an offset into the file where you will find a 12 byte header (6 half float?) and numEntrie records. those records contain 4 bytes: one index and 3 coefficients. The index is a duration between key frames for this value (I think), thus their sum is usually frameCount - 1. I have no idea what kind of interpolation method is used here that would require 6 fixed values and 3 variable coefficient per frame.

Here is an example from the same model (as I am not entirely sure about the half floats I put the corresponding hex string below):see: em020b_000.mot.log

If the flag is 4 then the union is an offset into the file where you will find a 24 byte header (6 float?) and numEntrie records. those records contain 8 bytes: one index and 3 coefficients. The index is the key frame index for this value. Seems like a more precise version of the method above with twice as much data.

Here is an example from another model with 38 bones:see: em020a_045.mot.log

Flag 7 can also be found, in that case the header is 12 bytes (6 half floats) and 6 bytes per record. 2 bytes are a short int for frame index (as in flag 4) and it leaves 4 bytes for coefficient. As it is seldom found and in huge models I will not put an example here, the post is already very long.

Any Idea what those coefficients can be?

After doing some reading on motion compression techniques for skeletal animation I think the floats and integral parameters are used for quantization.

what leads me to believe that is: - odd floats are always positive, while even floats can be any sign => odd floats are ranges, even floats a reference values - integer parameters always explore the complete range between 0xff and 0x00 or 0xffff and 0x0000 => normalized values

Summing the obtained values doesn't really make sense as the cost for storing the 3 integers is 0.75 of 1.5times the cost of a float. At this rate storing a float would have been easier for similar storage cost and good enough accuracy.So the question that remains is why is there 3 values per key-frame. For interpolation purposes?

If anyone has an idea, I'd gladly hear it.

PS: I added the resulting log (see: bayo.log) when applying the first formula for the example with flag 6, if it can help someone make sense of the obtained values.

Animations start to display correctly.Many animations are not stored in the model file so I will need a way to search for them.You can look at em0600.dat for instance (Jubileus) which contains a lot of animations. Each is stored in a different model for now, click on the skeleton at the bottom of the preview screen to switch between animations.

Then in the best of worlds, the index in the motion can be translated to the bone index by using:

Code:

int boneIndex = translationData[motionBoneIndex];

But there is a trick here. Some input index ranges are skipped and further input indexes need to be reduced accordingly:The skipped ranges are specified in the mask data. if the mask data at index i is -1 it means the ith sixteen is to be skipped:

This allows them to remove bones between the source model and the ingame model, but it seems overly complicated. Anyway it works.

I still have some problems on some shoulder rotation around the vertical axis but I don't think they come from the way I read the data.There is also the bone transformation values at index 7,8,9 which are almost always around 1 so maybe scaling data.

Animations in the plugin are functional. They are not always located inside the file so I provide a mechanism to load other files that would contains animations for the loaded model. Scaling transformations are not yet supported as I don't know how to put them into Noesis when not using NoeKeyframedAnims.

Okay, after implementing Bayonetta 2 motions in the plugin I though I would make a recapitulation of the findings contained in the previous posts. I will be using Binary Templates from https://www.sweetscape.com/010editor/templates.html to describe the file structure. Thanks again Alquazar for the help.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum