Imported animation has incorrect sample rate

I built Unreal from source and stepped through the GetMaxSampleRate function. It turns out that about five different sample rates are being detected on different bones in the animations I’m importing.

I’ve been able to fix this by baking the animation to the control rig in the asset file. Although I’m not sure why this fixes the issue as I have been baking to the skeleton as part of my export process.

Edit:
Turns out this was a fluke. Baking to the control rig just happened to change the number of key frames to a factor of 60.

The real issue appears to be that MotionBuilder has a global setting enabled by default called “Use Constant Key Reducer” which will remove most redundant keys on a bone when the animation is baked if there is no change in the curve. This global option overrides the options selected when baking.

Normally this is a OK, but in the case of Unreal it causes some bones in the hierarchy to be detected as having a random number of frames in them over the course of the animation (for some reason MotionBuilder most often left keys on the first, last and second last frames).
This meant that Unreal thinks it has to come up with a sample rate to accommodate bones with different frame rates (It tries to find the lowest common multiplier of those values). If those values don’t have a common multiplier Unreal maxes out the sample rate to 1920fps.

Why there isn’t the option to simply choose the sample rate of the animation I’m importing I don’t know…

1 Like