Forum > Modelling and Animation

[Research] .anim files : How do they work ?

<< < (3/4) > >>

schlumpf:
if 0x100 is right, I claim that you don't have to check for anything but that. 0x20 will never be set due to preconditions in m2 export, and 0x10 will never ever be set.

I don't know why, but it is that way. Just iterate aliasNext until !(flags & 0x40).

No, that is not exactly possible due to having different number of bones and such. Also, I have not seen any code for that logic. The M2 loader does not know about the HD variant.

I would love to be proven wrong.

spik96:
Thanks ! You cleaned up a lot of mess.

--- Quote from: "schlumpf" ---if 0x100 is right, I claim that you don't have to check for anything but that. 0x20 will never be set due to preconditions in m2 export, and 0x10 will never ever be set.

I don't know why, but it is that way. Just iterate aliasNext until !(flags & 0x40).

No, that is not exactly possible due to having different number of bones and such. Also, I have not seen any code for that logic. The M2 loader does not know about the HD variant.

I would love to be proven wrong.
--- End quote ---
Things are easier then, perfect ! I guess the files I have must be wrong.
You should update the line "The client loads .anim files if (flags & 0x130 ) == 0" in the wiki.

About 0x40, so it parses the data in the animation, but from n&ofs found by following the aliasNext ? What a waste of space, loading twice the same values...

EDIT : I have an error in GnomeFemale_HD.m2 when I check 0x100 and not 0x130.
Anim#0, Flags 160 = 1010 0000. Due to the change, it consider it as external and tries to open a .anim file which doesn't exist.
Same with Setesh.m2, Flags 32 = 10 0000.

schlumpf:
While I'm pretty sure, I have not looked at any models to confirm my theories, so I didn't want to change it at this point.

I can only say for those with .anim files, I think. There, when tasked to load a sequence, it will skip all aliases and load the first one without 0x40. It does make sense: Animations have multiple sequences. It might share only one sequence but do other sequences the aliased-to-sequence's animation does not do (e.g. standing might randomly snort, which would be the same as an emote, still standing and that emote are not equivalent).

Hm, so maybe 0x20 is a relevant part. ._.

spik96:

--- Quote from: "schlumpf" ---While I'm pretty sure, I have not looked at any models to confirm my theories, so I didn't want to change it at this point.

I can only say for those with .anim files, I think. There, when tasked to load a sequence, it will skip all aliases and load the first one without 0x40. It does make sense: Animations have multiple sequences. It might share only one sequence but do other sequences the aliased-to-sequence's animation does not do (e.g. standing might randomly snort, which would be the same as an emote, still standing and that emote are not equivalent).

Why is 160 (0xA0) considered as external? why is 32 (0x20)?
--- End quote ---

Thanks, I couldn't understand what was the point of all this overhead.
160:
External if (flags & 0x100) == 0
(0 1010 0000 & 1 0000 0000) == 0
0 0000 0000 == 0

Same for 0x20.

schlumpf:
Just as you did, I edited that away. ;) See that new line. ;D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version