Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation on imported .blend file plays incorrectly at different playback_speed rates. #64594

Closed
jitspoe opened this issue Aug 19, 2022 · 7 comments

Comments

@jitspoe
Copy link
Contributor

jitspoe commented Aug 19, 2022

Godot version

v4.0.alpha.custom_build [2475393]

System information

Windows 10, GLES3, NVidia RTX 3080

Issue description

I noticed the animations were playing faster in-game than the animation I had in blender. I thought perhaps the animation was playing at the fps of my monitor instead of the animation framerate, since I had a 144hz monitor, so as an experiment, I tried setting the playback_speed to 60/144, and that's when I noticed the animation played differently. Like the bones don't rotate as much or it's skipping frames or something.

I have a kick animation that brings the foot all the way up to the crosshair:
image

But if I set the playback_speed to a smaller value, the kick doesn't go as high. Here at 0.3, the foot only shows up on the bottom of the screen and makes it nowhere near the center where the crosshair is:

image

Steps to reproduce

Import a .blend file with an armature and animations at 60fps (not sure if 60fps matters. That's just what I'm using both in blender and the import settings).
Play the animation using the AnimationPlayer3D .play() function.
Set the playback_speed to 0.3
Play the animation again and note differences.

Minimal reproduction project

Here's the .blend file I had the problem with. Animation is "kick_left_1".

main_character.zip

@jitspoe
Copy link
Contributor Author

jitspoe commented Aug 19, 2022

Note: It seems like the in-game animation player is ignoring the time between keyframes, maybe, and just playing them all with the same time? I extended the keyframes with the foot out for like several seconds, and the foot still returns immediately, even though the editor animation player keeps the leg extended for a while.

@fire
Copy link
Member

fire commented Aug 19, 2022

Will need to check #64132

@jitspoe
Copy link
Contributor Author

jitspoe commented Aug 19, 2022

Will need to check #64132

I tried completely disabling the optimizer when importing, and that didn't seem to have any impact on it.
image

Also, that throws out my hypothesis about the blank frames getting ignored and it just playing the anim as if all the key frames have the same time between them. There's now a key frame for every frame of animation.

image

Really unsure as to what's going on here.

@fire
Copy link
Member

fire commented Aug 19, 2022

Some notes:

  1. you have some error on rigging. Might need to use delta mush via svd optimization. https://blendermarket.com/products/corrective-smooth-baker "Bulging."
  2. Scaling the keyframes by 4 seems to find your desired keyframe. [edited] try 60 * 4 fps [edited] try 120 fps

Screenshot 2022-08-19 053515

  1. I tried bake animation with no effect
  2. I pushed animations down https://github.com/tinmanjuggernaut/blender-pushdownall with no effect

main_character.zip

@fire
Copy link
Member

fire commented Aug 19, 2022

@Calinou is there a reason why we have limited fps to 120? Trying to use 240 fps

@jitspoe Try 120 fps.

@Calinou
Copy link
Member

Calinou commented Aug 19, 2022

@Calinou is there a reason why we have limited fps to 120? Trying to use 240 fps

Not that I know of, but I see very few practical reasons to use animations authored at a framerate higher than 120 FPS.

@jitspoe
Copy link
Contributor Author

jitspoe commented Aug 19, 2022

Closing this -- I think it was just a script error on my part (playing an animation that canceled out the animation before it had a chance to fully play). My bad!

@Calinou Calinou added archived and removed bug labels Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants