Incorrect baking animation. #71068

Closed
opened 2019-10-24 11:34:03 +02:00 by Yuriy · 15 comments

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

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

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) example02.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.
https://forums.unrealengine.com/development-discussion/animation/93483-solved-blender-to-ue4-squash-and-stretch-bone-heirarchy-scaling
bake_animation.blend

Exact steps for others to reproduce the error
example03.gif simple_rig.blend

  • 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.
**Blender Version** Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: `f6cb5f5449` **Short description of error** Incorrect baking animation. Please see the gif animation.![example01.gif](https://archive.blender.org/developer/F7853500/example01.gif) 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) ![example02.gif](https://archive.blender.org/developer/F7853526/example02.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. https://forums.unrealengine.com/development-discussion/animation/93483-solved-blender-to-ue4-squash-and-stretch-bone-heirarchy-scaling [bake_animation.blend](https://archive.blender.org/developer/F7853578/bake_animation.blend) **Exact steps for others to reproduce the error** ![example03.gif](https://archive.blender.org/developer/F7865029/example03.gif) [simple_rig.blend](https://archive.blender.org/developer/F7865031/simple_rig.blend) - 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.
Author

Added subscriber: @YuraKharitonow

Added subscriber: @YuraKharitonow
Author

And a simple rig. Pay attention to the foot. example03.gif simple_rig.blend

And a simple rig. Pay attention to the foot. ![example03.gif](https://archive.blender.org/developer/F7865029/example03.gif) [simple_rig.blend](https://archive.blender.org/developer/F7865031/simple_rig.blend)
Author

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

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

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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.

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.
Author

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:
screen.PNG
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.

**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:** ![screen.PNG](https://archive.blender.org/developer/F8003191/screen.PNG) 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.
Author

If I want to make a flexible back and limbs, then after baking visual keys, the animation does not look right.
spine.gif
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.

If I want to make a flexible back and limbs, then after baking visual keys, the animation does not look right. ![spine.gif](https://archive.blender.org/developer/F8003294/spine.gif) 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.
Author

Here is an example with a repeating transformation rig. Animation is baked incorrectly.
example04.gif
simple_rig_repeating.blend

Here is an example with a repeating transformation rig. Animation is baked incorrectly. ![example04.gif](https://archive.blender.org/developer/F8046915/example04.gif) [simple_rig_repeating.blend](https://archive.blender.org/developer/F8046928/simple_rig_repeating.blend)

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

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

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?
fortnite.gif
Maybe here Scale inheritance from parents in UE4 is simply disabled.
source https://youtu.be/tWVZ6KO4lRs?t=645

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? ![fortnite.gif](https://archive.blender.org/developer/F8048444/fortnite.gif) Maybe here Scale inheritance from parents in UE4 is simply disabled. source https://youtu.be/tWVZ6KO4lRs?t=645
Author

I tried to make animation without constraints. Just manually change the scale and rotation. It is not possible to achieve the desired result. Probably you can’t do without disabling scale inheritance.
manual.gif

I tried to make animation without constraints. Just manually change the scale and rotation. It is not possible to achieve the desired result. Probably you can’t do without disabling scale inheritance. ![manual.gif](https://archive.blender.org/developer/F8058060/manual.gif)

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Sybren A. Stüvel self-assigned this 2020-01-20 11:24:12 +01:00

I'm closing this issue as it's about the result of a cyclic dependency, which is not supported. If the problem also occurs in a supported situation, please file a new bug report.

I'm closing this issue as it's about the result of a cyclic dependency, which is not supported. If the problem also occurs in a supported situation, please file a new bug report.

Added subscriber: @Xury46

Added subscriber: @Xury46
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#71068
No description provided.