F-Curve imprecisions for exponential interpolation #62958
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#62958
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Win10
Graphics card: GTX 1070
Blender Version
07f6be87a9
Worked: (optional)
Short description of error
Exponential interpolation introduces a "jump" for the y-value. Whilst the error is small for lower dimensions, its a problem if fcurve values span a wide range of values.
Exact steps for others to reproduce the error
key_interpol.blend
system-info.txt
Added subscriber: @spiegelball
Added subscriber: @JacquesLucke
I see the issue.
Can you describe more precisely when this is an issue in practice?
Added subscriber: @brecht
@brecht, this could be fixed with this simple hack.
It's obviously not a pretty solution, but it solves the issue in this file.
I computation time is probably dominated by the
powf
function call.Not sure if there is a better way to get the required accuracy.
For time 0 this formula gives
2^(-10) = 0.0009765625
. So the function is just not defined to start from 0, it's not even numerical inaccuracy.Using linear at the start seems good to me. There's more cases in this file with the issue though. Maybe you can define a replacement for
powf(2, 10 * x)
that is 0 atx == -1
?Yes, will check that. Will see if there is a better function that has almost the same curve...
Just for reference, here are all the easing functions I implemented for AN:
https://github.com/JacquesLucke/animation_nodes/blob/master/animation_nodes/algorithms/interpolations/implementations.pyx
I used a different abstraction. Instead of having
(time, begin, change, duration) -> R
functions, I used[0, 1] -> R
functions.Not sure if Blender makes use of this extra flexibility in the easing functions somewhere.
How about this function:
Comparison old vs new:
The constant
6.2
was choosen to minimize the quadratic error compared to the old function.Partial output:
Oh oops, just noticed that this function is not even exponential ^^
Next try.
This works:
Turns out, this is actually the exact same thing I did in AN (link )...
In my scene there is a dolly shot from earths ground level into space, so the keyframes go from ~1m to ~10000km. Therefore any imprecisions (even if its just 0.1% of maximum value) lead to huge jump on the first frames of animation. I discovered something similar with bezier interpolation, made a new report for that: https://developer.blender.org/T62968.
@JacquesLucke, makes sense, can we do this for all the places that use
powf(2, 10 * x)
?Yep, wait.
I see, makes sense.
This issue was referenced by
9b39a71793
Changed status from 'Open' to: 'Resolved'