dtzxporter / cast

An open-source container for models, animations, and more.
MIT License
74 stars 6 forks source link

Wrong frame range when importing animation into Blender #42

Closed PavielKraskouski closed 10 months ago

PavielKraskouski commented 10 months ago

Vega shows that each animation has six frames:

image

I tried applying all of these animations, except those with the _3p suffix, to the Doom Slayer model in Blender. After importing all these animations, only two of them had six frames: pose_slayer_air_strike and pose_slayer_midair_poster. All other animations only had two frames. It's worth noting that animations with two frames look correct. Here is a screenshot of the pose_slayer_standing_blade_extending animation.

Blender

P.S. There is a bug in Vega when you set focus on the search bar before opening the resource file. When the open file dialog appears, Vega crashes.

dtzxporter commented 10 months ago

This is not an issue with cast. There is only one real keyframe in the other non-6 frame ranges and in the air ones there are actually 6. What's displayed in vega is just the potential frames not the calculated frames. It likely happened when baking the animation for the game the first/last frame has slightly different values so the game added keyframes, it also includes the 'duration'.

for the air ones, it looks like hips_part01_md is the culprit, it rotates EVER so slightly between 0-5.

Import is correct in this case for all of the animations.

dtzxporter commented 10 months ago

P.S. There is a bug in Vega when you set focus on the search bar before opening the resource file. When the open file dialog appears, Vega crashes.

This will be fixed once it's fixed upstream in a 3rd party dependency. I have to wait for them to do it and eventually I'll rebuild and update it. Small issue to work around.