Page MenuHome

Incorrect baking animation.
Open, Confirmed, LowPublic


Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e

Short description of error
Incorrect baking animation. Please see the gif animation.

Made rigify skeleton animation. If you bake the animation, then it does not work correctly. Bake settings: Only Selected Bones, Visual Keying, Clear Constraints, Bake Data - Pose.
In the second example, a skeleton is made that repeats the transformations of the deforming bones rigify. Baking animations for a repeating skeleton also does not work correctly. (gif)

I think the problem is in the wrong Scale. If bones of a skeleton with baked animation disable Inherit Scale, then the animation looks better, but still not true.
If you export the skeleton to fbx format, the animation will be incorrect and will not work correctly in game engines.
Met similar problem on Unrial Engine forums.

Exact steps for others to reproduce the error

  • open attached file (simple_rig.blend);
  • select the original object and go to pose mode;
  • run the animation to see the desired result;
  • select all bones or just the foot bone;
  • in the view3d header, go to Pose -> Animation -> Bake Action;
  • in the menu select the options: Only Selected Bones, Visual Keying, Clear Constraints, Bake Data - Pose.
  • confirm and observe the resulting animation.



Event Timeline

And a simple rig. Pay attention to the foot.

This is very important for animators working in gamedev. With improper baking animations, you can not do good squashing and stretching.

Germano Cavalcante (mano-wii) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Fri, Nov 8, 4:17 PM
Germano Cavalcante (mano-wii) updated the task description. (Show Details)
Germano Cavalcante (mano-wii) lowered the priority of this task from Confirmed, Medium to Confirmed, Low.Fri, Nov 8, 4:38 PM

Opening your file and seeing the console, I realized that armature has cyclic dependencies:

Read blend: C:\Users\GERMANO\Downloads\simple_rig.blend
Dependency cycle detected:
  OBArmature/Bone.001/BONE_CONSTRAINTS() depends on
  OBArmature/Bone.002/BONE_DONE() via 'Stretch To'
  OBArmature/Bone.002/BONE_READY() via 'Ready -> Done'
  OBArmature/Bone.002/BONE_CONSTRAINTS() via 'Constraints -> Ready'
  OBArmature/Bone.002/BONE_POSE_PARENT() via 'Pose -> Constraints Stack'
  OBArmature/Bone.001/BONE_DONE() via 'Parent Bone -> Child Bone'
  OBArmature/Bone.001/BONE_READY() via 'Ready -> Done'
  OBArmature/Bone.001/BONE_CONSTRAINTS() via 'Constraints -> Ready'
Detected 1 dependency cycles

This happens when the transformation of bone1 depends on the transformation of bone2 and the transformation of bone 2 depends on the transformation of bone1 or something related.

Cyclic dependencies sometimes bring unpredictable results.

I think this report could be closed, but I'll wait a second opnion.

Yuriy (Faraday) added a comment.EditedSat, Nov 9, 2:36 PM

Short description:
If I see that the bone stands in place at coordinates 0.0.0, then after baking the visual keys, I should see that the bone stands in place at coordinates 0.0.0
more details:

Bone is the parent for Bone.001. And bone Bone.001 is the parent for Bone.002. If a coordinate transformation occurs at Bone.001, then Bone.002 inherits these transformations.
Bone.002 has constraint Copy Transforms. Bone.002 copies the bone transformation of Bone.003. Bone.003 is at rest, and the bone of Bone.002 is also at rest, no matter how the transformation of its bone of the parent Bone.001 changes.
Expectation: after baking visual keys, the animation will be the same as with rig.
In fact: after baking visual keys, the Bone.002 bone has its own transformation keys, and also inherits the transformation from the parent’s bone. Animation does not look the same as with rig.
Perhaps you need to change the algorithm for baking visual keys so that the bones take into account the transformation of the parents.

If I want to make a flexible back and limbs, then after baking visual keys, the animation does not look right.

This is UE4Skeleton. It repeats the transformation of the deforming bone rigify.
Expectation: visually the back is bent, everything works correctly. After baking visual keys, the animation looks exactly the same.
In fact: After baking visual keys, the animation does not look right.

Here is an example with a repeating transformation rig. Animation is baked incorrectly.

This example also has a cyclic dependency.
And this is something the user has to avoid.

Can't bake an animation based on cyclic dependencies? Perhaps using a new algorithm?
I understand that the animation is well baked if the bones do not have a parent with each other. But in the skeleton of a game, the spine, arms and legs must be connected.
For example, in a gif animation, a character is shown in UE4, in which the spine is squashed and stretched. How to bake a similar animation in Blender?

Maybe here Scale inheritance from parents in UE4 is simply disabled.