I’m aware that yall recently exposed how much an animation would be sampled when imported into the engine. It currently has a drop down that specifies animation speeds in intervals of ten. Are yall able to expose it to have an integer input? I’ve done quite a bit of animation at 24 fps that has been baked that I am hoping to apply to a skeleton. Sampling at 24 would be nice.
Let me know if there is anything that can be done in this regard. I feel like 24 fps is rather common (It is maya’s default frame rate)
I’m not entirely sure about the implementation, but in general you should oversample, so instead of 24 use 60 or 100 if you can, and then optimize animation by removing unneeded keyframes. This makes sure you don’t miss any keyframes, but also makes the animation file as small as possible with the error you selected.
@mvaligursky I’m not sure that works because the animation is baked which means the skeleton has keyframes 24 times per second. The problem with the multiple of 10 approach is that the sampling is falling between different keys so its making the animations jitter like crazy. I’m pretty sure 48 would work because it would sample in between 24 without missing a keyframe. even 100 gets out of sync by the end of the animation and starts jittering.
@slimbuck would it be possible to sample at 24?
Have you tried what I suggested?
It’s possible to sample at 24 or any other frequency, and we can for sure expose it, but it won’t necessarily give you better result than oversampling.
Yes I did try it @mvaligursky. It gave me the same jitter.
Are you able to create a small repro for us to look at? Perhaps create a ticket at ithub.com/playcanvas/engine/issues along with a repro or fbx file you use to import. Curious if there’s something else at play here, as oversampling should fix this. I assume you tried to change optimization limits as well?
TBH I was a little surprised reading your post that we didn’t already expose a 24fps option!
Short term, we can definitely add option of 24fps to the dropdown and then ultimately expose an int input.
As @mvaligursky says, there is also the option of oversampling and then optimising with curve tolerance. This in theory could result in accurate animations, but with even smaller files. If you’ve tried this option and it isn’t working for you, then we’d really appreciate a repro so we can look into it.
The last option available to you right now is to disable sampling entirely (specify fps 0) with or without tolerance. This will take keys from the FBX file.
We’ve updated the editor to include a few more FPS options in the dropdown (24, 48, 120fps) so please give that a try.
@slimbuck @mvaligursky thank yall so much. The exposed 24 fps fixed it. Interestingly enough I can replicate the exact same jitter by increasing the frame rate on a fbx with baked animation within Maya as well. I never was able to make the over sampling work before the 24 fps option was exposed though. Despite it being fixed for me, would yall still like me to create something that shows the oversampling jitter issue?
Thanks again. Yall’s support has been amazing as always
If it’s not too time consuming, we’d like a repro to see why oversampling does not work for this. Thanks!
@mvaligursky I’ll get this to you by the end of the day