Improvements to "Bake Action..." Operator #82168

Open
opened 2020-10-27 22:41:13 +01:00 by Luciano Muñoz Sessarego · 15 comments

With the developments happening in the blender animation module more robust tools and feature are being needed.

The "Bake Action..." operator is a rather useful tool that feels incomplete:

Here are some options that would take it to the next level.

  • Options to set between Current frame range, preview range and custom range.
  • Frame step should only output the desired frame step, currently it merges the current keys with the frame step so in example: if I have keys on ones and I bake on 2's the current result is ones as there are already keys there. It should remove the keys (in the baked range) and replace them with the new keys on 2's.
  • When baking, the resulting keys should obey the default keyframe interpolation type set in the animation preferences. (if its set to constant, all the resulting keys should be constant, if its linear the resulting keys should be linear)
  • A "smart bake" which should only perform the baking action where key frames already exist in the selected objects/bones (up for discussion but maybe going up one level up in the chain and transfer those keys to the object would be good too.
  • Include "custom properties" in the result of the bake, currently custom properties lose their keys. (and anything that can be stored stored in the action)
  • option to "merge actions" that will bake the animation data from all the available actions and put it in the main "non pushed" action and delete the other actions (without needing to go into the nla and get rid of them manually)

These seem from my ignorance very minor features that would make the operator much more useful in production.

With the developments happening in the blender animation module more robust tools and feature are being needed. The "Bake Action..." operator is a rather useful tool that feels incomplete: Here are some options that would take it to the next level. - Options to set between Current frame range, preview range and custom range. - Frame step should only output the desired frame step, currently it merges the current keys with the frame step so in example: if I have keys on ones and I bake on 2's the current result is ones as there are already keys there. It should remove the keys (in the baked range) and replace them with the new keys on 2's. - When baking, the resulting keys should obey the default keyframe interpolation type set in the animation preferences. (if its set to constant, all the resulting keys should be constant, if its linear the resulting keys should be linear) - A "smart bake" which should only perform the baking action where key frames already exist in the selected objects/bones (up for discussion but maybe going up one level up in the chain and transfer those keys to the object would be good too. - Include "custom properties" in the result of the bake, currently custom properties lose their keys. (and anything that can be stored stored in the action) - option to "merge actions" that will bake the animation data from all the available actions and put it in the main "non pushed" action and delete the other actions (without needing to go into the nla and get rid of them manually) These seem from my ignorance very minor features that would make the operator much more useful in production.
Author
Member

Added subscriber: @LucianoMunoz

Added subscriber: @LucianoMunoz
Member

Added subscriber: @wbmoss_dev

Added subscriber: @wbmoss_dev
Member

For (1), would it be sufficient to use the active frame range? If the preview range is ON, then that's the default for the bake range. If OFF, then it would use the non-preview range?

For (1), would it be sufficient to use the active frame range? If the preview range is ON, then that's the default for the bake range. If OFF, then it would use the non-preview range?
Author
Member

The only problem that i see here is that would be implicit rather than explicit and that is the problem in a lot of areas in blender even if the zen of python says otherwise.
In any case I'd place a little clock watch icon in the panel too that would be turned on if the one in the timeline is on and so on just so its clear to the user what is being done on what range and WHY.

But you're on the right track nevertheless.

The only problem that i see here is that would be implicit rather than explicit and that is the problem in a lot of areas in blender even if the zen of python says otherwise. In any case I'd place a little clock watch icon in the panel too that would be turned on if the one in the timeline is on and so on just so its clear to the user what is being done on what range and WHY. But you're on the right track nevertheless.
Wayde Moss self-assigned this 2021-02-11 01:39:00 +01:00
Member

For the smart baking levels idea:

Maybe we could support "Baking Sets" where bones grouped together in the same set are keyed together. Then that leaves the proper definition of them to the rigger who knows the rig inside out. The animator can expand upon it if needed for specific uses. To make it more automated, we can provide operators to create the baking sets (based on constraints and drivers on the added bone). These sets can then be cleaned up and fixed by the rigger or animator.

I suppose the more general implementation of "Baking Sets" are normal bone collections which should replace Armature Layers anyways.

For the smart baking levels idea: Maybe we could support "Baking Sets" where bones grouped together in the same set are keyed together. Then that leaves the proper definition of them to the rigger who knows the rig inside out. The animator can expand upon it if needed for specific uses. To make it more automated, we can provide operators to create the baking sets (based on constraints and drivers on the added bone). These sets can then be cleaned up and fixed by the rigger or animator. I suppose the more general implementation of "Baking Sets" are normal bone collections which should replace Armature Layers anyways.
Author
Member

Im not against the idea I'm not sure I understand it though.
I was thinking more a levels where you'd have a little number slider that could go "0" only keep the keys from the current selected baked controls, "1" this and whatever bones have direct influence over this will transfer its keys, you get the idea.
Maybe -1 to get keyframes from every thing in the armature ? (i don't know how useful would that be)

What do you think, i feel this way is simple and requires 0 set up for the user just chose what they need on a case by case basis.

Im not against the idea I'm not sure I understand it though. I was thinking more a levels where you'd have a little number slider that could go "0" only keep the keys from the current selected baked controls, "1" this and whatever bones have direct influence over this will transfer its keys, you get the idea. Maybe -1 to get keyframes from every thing in the armature ? (i don't know how useful would that be) What do you think, i feel this way is simple and requires 0 set up for the user just chose what they need on a case by case basis.
Member

The problem with levels is that the rig can have many levels of indirection. For Pierrick Picaut's rigs, he creates intermediate bones all the time. For a Head bone that optionally follows the neck, there are intermediate bones which may never be seen or keyed by an animator. I imagine Rigify rigs are similar (I'm not familiar with Rigify).

What if we used level 2? But that's the same problem. If you are given a rig, then you don't know the proper amount of indirection (levels) to bake. And the number of levels changes on a per-bone basis too.

What if we used a really big number? That effectively creates a key where any keyframe exists on the rig.

The problem with levels is that the rig can have many levels of indirection. For Pierrick Picaut's rigs, he creates intermediate bones all the time. For a Head bone that optionally follows the neck, there are intermediate bones which may never be seen or keyed by an animator. I imagine Rigify rigs are similar (I'm not familiar with Rigify). What if we used level 2? But that's the same problem. If you are given a rig, then you don't know the proper amount of indirection (levels) to bake. And the number of levels changes on a per-bone basis too. What if we used a really big number? That effectively creates a key where any keyframe exists on the rig.
Author
Member

That's why I think I'd work if there is an intermediate bone that doesn't have a key good then its not considered and only consider the ones that do.

The levels will give you an explicit way of troubleshooting when you don't get the exact result you expect and be able to control it.

And yes a really big number will effectively give you a key wherever it exist in the rig, expected.

To add to this the default should be 1. Normally its the control / object and whatever directly connects to it that we'll pick up keys from (whether direct parent or constrain)

That's why I think I'd work if there is an intermediate bone that doesn't have a key good then its not considered and only consider the ones that do. The levels will give you an explicit way of troubleshooting when you don't get the exact result you expect and be able to control it. And yes a really big number will effectively give you a key wherever it exist in the rig, expected. To add to this the default should be 1. Normally its the control / object and whatever directly connects to it that we'll pick up keys from (whether direct parent or constrain)
Member

I'll make test patch for the levels idea.


  1. Include "custom properties" in the result of the bake, currently custom properties lose their keys. (and anything that can be stored stored in the action)
  2. option to "merge actions" that will bake the animation data from all the available actions and put it in the main "non pushed" action and delete the other actions (without needing to go into the nla and get rid of them manually)

Can you give use cases for these two? I'm only aware of one example: using an NLA layer to switch to IK arms and completely replace a segment of FK animation. Then bake with the expectation that the IK switch is transferred too. In this case, 5 and 6 are the same thing and can probably be better named: Merge all NLA. What are the cases for (5) that is independent of (6) and vice versa?

I'll make test patch for the levels idea. ___ >5. Include "custom properties" in the result of the bake, currently custom properties lose their keys. (and anything that can be stored stored in the action) >6. option to "merge actions" that will bake the animation data from all the available actions and put it in the main "non pushed" action and delete the other actions (without needing to go into the nla and get rid of them manually) Can you give use cases for these two? I'm only aware of one example: using an NLA layer to switch to IK arms and completely replace a segment of FK animation. Then bake with the expectation that the IK switch is transferred too. In this case, 5 and 6 are the same thing and can probably be better named: `Merge all NLA`. What are the cases for (5) that is independent of (6) and vice versa?
Author
Member

I'm not sure how they are the same?, 6 does involve the improvement from 5 though.

  1. As it is now, if you use the bake action tool even in just one action (not pushed) custom properties data gets lost. It needs to be considered as well.

  2. is being able to merge several nla pushed actions to one:
    Example I created an action for walking and one for running y put them both in the nla mix them etc, now I just want all the data merged to the original animation so I can easily modify it.

I'm not sure how they are the same?, 6 does involve the improvement from 5 though. 5. As it is now, if you use the bake action tool even in just one action (not pushed) custom properties data gets lost. It needs to be considered as well. 6. is being able to merge several nla pushed actions to one: Example I created an action for walking and one for running y put them both in the nla mix them etc, now I just want all the data merged to the original animation so I can easily modify it.
Member
  1. Oh so baking to a new action should keep the nontransform animated channels? Can do.
5) Oh so baking to a new action should keep the nontransform animated channels? Can do.
Author
Member

yes!

yes!

Added subscriber: @feldlaufer-4

Added subscriber: @feldlaufer-4

being able to bake custom properties is urgeeeeent !!! cause atm there is simply no way to do it? why would we animate properties and not want them baked after? do we know when the new features could be available?

being able to bake custom properties is urgeeeeent !!! cause atm there is simply no way to do it? why would we animate properties and not want them baked after? do we know when the new features could be available?
Wayde Moss was unassigned by Sybren A. Stüvel 2022-01-03 12:09:33 +01:00
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:36:08 +01:00
Member

I am removing the Needs Triage label. This is under the general rule that Design and TODO tasks should not have a status.

If you believe this task is no longer relevant, feel free to close it.

I am removing the `Needs Triage` label. This is under the general rule that Design and TODO tasks should not have a status. If you believe this task is no longer relevant, feel free to close it.
Alaska removed the
Status
Needs Triage
label 2024-04-07 05:57:10 +02:00
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#82168
No description provided.