Bake actions operator converting F-curves to linear #109528

Open
opened 2023-06-29 20:07:26 +02:00 by Hassan-Charafeddine · 7 comments

System Information
Operating system: windows 10
Graphics card: Nvidia RTX 3080

Blender Version
Broken: ( 3.5.1 , e1ccd9d4a1 , master, 2023-04-24

Worked: (3.3.8, 6a4c537c21, master, 2023-06-19 )

Short description of error
baking actions (object or pose mode) converts F-curves to linear interpolation in blender 3.5 and 3.6 but the accuracy of keyframe placement is higher opposed to 3.4 and 3.3 where the interpolation of the curves remains unchanged but for complex custom interpolation the keyframe placement after bake is unaccurate

Exact steps for others to reproduce the error
use the default cube to key a 30 frame loopable action (increasing the Z transform on frame 15 will do),
go to the graph editor,
turn the handle type to free and make custom interpolations like the attached files
bake action
image2: orginal unbaked
image1: baked in 3.6/3.5
image3: baked in 3.3/3.4

**System Information** Operating system: windows 10 Graphics card: Nvidia RTX 3080 **Blender Version** Broken: ( 3.5.1 , e1ccd9d4a1d3 , master, 2023-04-24 Worked: (3.3.8, 6a4c537c211e, master, 2023-06-19 ) **Short description of error** baking actions (object or pose mode) converts F-curves to linear interpolation in blender 3.5 and 3.6 but the accuracy of keyframe placement is higher opposed to 3.4 and 3.3 where the interpolation of the curves remains unchanged but for complex custom interpolation the keyframe placement after bake is unaccurate **Exact steps for others to reproduce the error** use the default cube to key a 30 frame loopable action (increasing the Z transform on frame 15 will do), go to the graph editor, turn the handle type to free and make custom interpolations like the attached files bake action image2: orginal unbaked image1: baked in 3.6/3.5 image3: baked in 3.3/3.4
Hassan-Charafeddine added the
Status
Needs Triage
Type
Report
Priority
Normal
labels 2023-06-29 20:07:27 +02:00
Nate Rupsis added the
Module
Animation & Rigging
label 2023-06-29 20:51:22 +02:00
Nate Rupsis added this to the Animation & Rigging project 2023-06-29 20:51:27 +02:00
Member

I'm not sure if it really affects anything, since after baking, you will have one key for one frame and blender won't render a in-between frame anyway.

Not sure if this is gonna have a significant effect on motion blur, if so I'd suggest adding an option for keeping the curve.

I'm not sure if it really affects anything, since after baking, you will have one key for one frame and blender won't render a in-between frame anyway. Not sure if this is gonna have a significant effect on motion blur, if so I'd suggest adding an option for keeping the curve.
YimingWu added
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-06-30 07:13:34 +02:00
Member

This isn't a bug, it's an intentionally changed behavior. But it looks like it was never documented, which we should definitely fix.

@Hassan-Charafeddine is there a reason that you want non-linear interpolation after a bake? The bezier screenshot you've shared shows that it ends up wobbly and weird, which at least doesn't seem any better to me than linear.

This isn't a bug, it's an intentionally changed behavior. But it looks like it was never documented, which we should definitely fix. @Hassan-Charafeddine is there a reason that you want non-linear interpolation after a bake? The bezier screenshot you've shared shows that it ends up wobbly and weird, which at least doesn't seem any better to me than linear.

yes I understand that the The bezier screenshot breaks but that's the point in the older version 3.3 it is bezier but isn't accurate as 3.6 but in current versions of blender it is linear and is accurate on bake, however keep in mind this is a simple F curve, not a rig with multiple controllers as I need to reconvert my f curves to bezier again to get my motion be the exact same again, it might seem the same but it's not not, point is on bake my fcurves should not change my motion even 1%, honestly I don't know if that's unreasonable or not but if that is a default going forward then a lot of clean up for animators is going to be happening in the graph editor after baking

yes I understand that the The bezier screenshot breaks but that's the point in the older version 3.3 it is bezier but isn't accurate as 3.6 but in current versions of blender it is linear and is accurate on bake, however keep in mind this is a simple F curve, not a rig with multiple controllers as I need to reconvert my f curves to bezier again to get my motion be the exact same again, it might seem the same but it's not not, point is on bake my fcurves should not change my motion even 1%, honestly I don't know if that's unreasonable or not but if that is a default going forward then a lot of clean up for animators is going to be happening in the graph editor after baking

Oh maybe I understand the issue, maybe this change was made in regards to animating in blender for movies, sorry I was thinking in regards to animating for games and exporting for unreal and unity without change to my data, sorry I should've been more clear on that matter, even after I finish editing after I bake I still need to export, so If my fcurve aren't the same that's the issue

Oh maybe I understand the issue, maybe this change was made in regards to animating in blender for movies, sorry I was thinking in regards to animating for games and exporting for unreal and unity without change to my data, sorry I should've been more clear on that matter, even after I finish editing after I bake I still need to export, so If my fcurve aren't the same that's the issue

@nathanvegdahl what was the reason this was changed to linear and not to auto clamped?

@nathanvegdahl what was the reason this was changed to linear and not to auto clamped?
Member

Gah, I should have linked to what I found when I responded before. The change was made before I was part of the animation module. But I can at least give my own rationale of why I think it makes sense:

Baking, as Blender does it right now, is just taking point samples. There's no logic to try to accurately preserve curvature by e.g. placing bezier handles appropriately. So the interpolation mode chosen is literally just about interpolating point samples with zero additional information. Linear is a good default for this because it's at least always well behaved. Bezier is smoother, of course, but you have to choose between either auto (which produces over-shoot in sub-frames) or auto-clamped (which introduces weird unpredictable wiggles in sub-frames), neither of which are consistently well behaved.

In the future it would be great to introduce some kind of smart bake that tries to position bezier handles appropriately. Additionally, we may want to preserve constant-interpolation keys (but notably, the previous versions of Blender didn't do that either).

But short of those, linear is a good, predictable default. If desired, the user can easily change the interpolation mode of the keys after the bake, to exactly the same results as if it were default.

Gah, I should have linked to what I found when I responded before. The change was made before I was part of the animation module. But I can at least give my own rationale of why I think it makes sense: Baking, as Blender does it right now, is just taking point samples. There's no logic to try to accurately preserve curvature by e.g. placing bezier handles appropriately. So the interpolation mode chosen is literally just about interpolating point samples with zero additional information. Linear is a good default for this because it's at least always well behaved. Bezier is smoother, of course, but you have to choose between either auto (which produces over-shoot in sub-frames) or auto-clamped (which introduces weird unpredictable wiggles in sub-frames), neither of which are consistently well behaved. In the future it would be great to introduce some kind of smart bake that tries to position bezier handles appropriately. Additionally, we may want to preserve constant-interpolation keys (but notably, the previous versions of Blender didn't do that either). But short of those, linear is a good, predictable default. If desired, the user can easily change the interpolation mode of the keys after the bake, to exactly the same results as if it were default.
Christoph Lendenfeld added
Type
Known Issue
and removed
Type
Report
labels 2023-11-07 15:35:41 +01:00

@nathanvegdahl In that case I put it down as known issue, since there is no good way to fix this right now

@nathanvegdahl In that case I put it down as known issue, since there is no good way to fix this right now
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 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#109528
No description provided.