No keyframes on unmoving things in FBX causing problems

Here’s the situation.

In Blender I create something physics simulation on three different objects. However, one or two of the objects may not move at all during the simulation (because they didn’t get hit by another object).

I export the animation to an FBX with keyframe baking enabled. In Unity, it appears to animate just fine in both the inspector preview and the animation window when played as the only animation in the animation controller.

However, upon further inspection, the objects that didn’t move during the simulation don’t actually have any keyframes in the animation window. Those objects are in the correct position & rotation, so it still seems ok, right?

I have several variations of the animation that I want to use, and they’re all based on the same Blender physics simulation, but with some of the objects slightly offset to create slightly different animations. In Unity, I add each one of these animations to the animation controller.

Now guess what? The animations that worked properly before no longer work properly, because those unmoving objects have no keyframes, so they’re stuck using the starting position of the animation of the prefab that the controller was added to.

A seemingly obvious solution would be for Unity to create a single keyframe at the start of every timeline, for every object, so it will assume it’s correct position and rotation when animated from a shared controller like this.

1 Like

Oh, by the way, I tried manually creating a single keyframe in Blender for the unmoving objects, and despite turning keyframe reduction OFF in Unity, those objects still have no keyframes. A workaround is to create two keyframes that are so close in value that you can’t visually see the difference, then Unity won’t remove them.

1 Like

This is still a problem in Unity 6 preview, with a different scenario.

The bottom line is that keyframe reduction is happening when it shouldn’t.

I want to create an animation layer of only hands in a gripped position. The fingers themselves don’t need to animate - they only need to be in the gripped position. I created a base keyframe at 0, then the gripped position keyframe at 1 and 10. In the Unity animation importer, I can create a clip for frames 1-10, and it appears correct in the preview. However, if I look at the animation timeline for that clip, there are no keyframes. Anim. Compression is set to “Off”.

If I insert another keyframe in the middle (say frame 5) with just SLIGHT changes, then Unity doesn’t strip it out.

Unity, it’s only been over 2 years since this was reported, with no response whatsoever. I’m pretty sure I also filed a bug report back then. Please respond to let us know you’re listening.

1 Like

I got the same problem and i do not want to double my FBX file size by keying each and every channel. I hope for an answer to pop up on this

We can’t rely on Unity to fix this (any anything related to animation). In the last 6 months or so, whenever I report a bug related to the animation system, they say they’re not going to fix bugs on the “old” animation system because they’re working on a “new” animation system. They been working on it for something like 4 years now. That’s a long time to have to deal with real-world bugs. I’m convinced that Unity doesn’t actually use Unity for real-world projects to experience the same frustration real users do.

Yeah, this bug is infuriating. and there is no ui or other info telling you in the inspector that it is throwing out data so you just have to hunt and check and hunt and check.