Download

Importing Animations Causes Key Times to Shift?

I noticed when I was importing some hair animation from Maya that Unreal was messing with the timing on my keys on import. The import process seemed to shift the keys by about 0.004 ms. Although it sounds small, not having it be perfectly the way I had it in Maya causes some issues when trying to use it with other models.

After spending some time diving into the source code, I found out that by changing one line in SkeletalMeshEdit.cpp, I got the keys to line up perfectly with how they were in Maya. However, the change I made also created a dead frame appended to the end of the animation sequence, and trying to get rid of it only caused more issues.

For anyone interested, the line is 1148: const FbxTime TimeIncrement = (NumSamplingKeys > 1)? AnimTimeSpan.GetDuration() / (NumSamplingKeys - 1) : AnimTimeSpan.GetDuration();
I changed NumSamplingKeys - 1 to NumSamplingKeys.

I’m currently in the process of making this change into a plugin, but I came to the forums to ask: Has anyone else come across this issue? And to Epic Games: Is this a bug that you’re looking into fixing in future builds, or was this intentional?