Make easing equations to follow the curve start point normal #39916

Open
opened 2014-04-27 11:29:54 +02:00 by Paulo José Oliveira Amaro · 17 comments

The easing equations are great, but they can't be editable. What is the best thing about them: the user doesn't need to worry about the animation if some point change its location.

But there is an aspect of easing equations that still can be improved. They don't follow the normal of the curve. In an animation, this mean that they can break any previous movement of a object, instead of starting from it.

Currently, this is what happen if we change the bezier control point of the start point of an easing equation Cubic In:
{F86114 size=full}

For Bounce In:
{F86115 size=full}

You can see how the animation break when the easing start, because the first internal point of the easing curve doesn't follow the previous curve normal.

The proposed solution
To solve it, the first internal control point of an easing equation should be placed above the curve normal. This is what would be expected for Cubic:
{F86120 size=full}

For Bounce:
{F86118 size=full}

An example of how this issue can break an animation is if we nest 2 easing equations, for instance a Back In followed by a Bounce Out. easing-back-in-bounce-out.blend

I'm not sure it's applicable to all easing modes. But it should be the default behaviour for those that it's applicable. I believe an option to disable it would be useless, since its easy to control the control point handler to get the the horizontal normal. And these options are actually new, so I would not be worried about breaking backward compatibility for the previous easing curves that will change now with follow normal by default.

The most important thing about the easing equation is that they allow easy, smooth and automatic animations. So I think the change proposed here is looking to allow it in a more complete way.

The easing equations are great, but they can't be editable. What is the best thing about them: the user doesn't need to worry about the animation if some point change its location. But there is an aspect of easing equations that still can be improved. They don't follow the normal of the curve. In an animation, this mean that they can break any previous movement of a object, instead of starting from it. Currently, this is what happen if we change the bezier control point of the start point of an easing equation Cubic In: {[F86114](https://archive.blender.org/developer/F86114/blender-cubic.gif) size=full} For Bounce In: {[F86115](https://archive.blender.org/developer/F86115/blender-bounce.gif) size=full} You can see how the animation break when the easing start, because the first internal point of the easing curve doesn't follow the previous curve normal. **The proposed solution** To solve it, the first internal control point of an easing equation should be placed above the curve normal. This is what would be expected for Cubic: {[F86120](https://archive.blender.org/developer/F86120/proposed-cubic.gif) size=full} For Bounce: {[F86118](https://archive.blender.org/developer/F86118/proposed-bounce.gif) size=full} An example of how this issue can break an animation is if we nest 2 easing equations, for instance a Back In followed by a Bounce Out. [easing-back-in-bounce-out.blend](https://archive.blender.org/developer/F86128/easing-back-in-bounce-out.blend) I'm not sure it's applicable to all easing modes. But it should be the default behaviour for those that it's applicable. I believe an option to disable it would be useless, since its easy to control the control point handler to get the the horizontal normal. And these options are actually new, so I would not be worried about breaking backward compatibility for the previous easing curves that will change now with follow normal by default. The most important thing about the easing equation is that they allow easy, smooth and automatic animations. So I think the change proposed here is looking to allow it in a more complete way.

Changed status to: 'Open'

Changed status to: 'Open'
Joshua Leung was assigned by Paulo José Oliveira Amaro 2014-04-27 11:29:54 +02:00
Added subscribers: @JoshuaLeung, @dna-7, @plasmasolutions, @mark.b.tomlinson, @xrg, @LeoMoon, @Januz, @davidmcsween, @SMB1243, @PauloJoseOliveiraAmaro, @FilipMond, @tanel58
Member

I'm with you here but I would add even one point more: We should be able to set the height and number of bounces and have an automatically created (but user definable) handle on every max or min point in the generated curve.

Atm though I am unable to help here cause my #b3d book is at the finishing phase - all my efforts are now going into finishing it asap..

I'm with you here but I would add even one point more: We should be able to set the height and number of bounces and have an automatically created (but user definable) handle on every max or min point in the generated curve. Atm though I am unable to help here cause my #b3d book is at the finishing phase - all my efforts are now going into finishing it asap..
Member

I can see where you're coming from. However, slightly complicating this is that the way these equations work is that they currently work as hardcoded blackboxes, using parametric curves optimised for the specific shapes you see now.

Another complication is determining the tangent around the keyframe, given that they don't actually make use of handles in the same way that Bezier curves do. At best we could approximate it by taking a sample of the curve somewhere before the first keyframe and use the vector between those as our tangent, though doing that comes with its own set of problems!

So, I agree with you in principle on this, but in practice, this will likely require quite a lot of finicky tinkering to get it right (i.e. it's not exactly a trivial fix)

I can see where you're coming from. However, slightly complicating this is that the way these equations work is that they currently work as hardcoded blackboxes, using parametric curves optimised for the specific shapes you see now. Another complication is determining the tangent around the keyframe, given that they don't actually make use of handles in the same way that Bezier curves do. At best we could approximate it by taking a sample of the curve somewhere before the first keyframe and use the vector between those as our tangent, though doing that comes with its own set of problems! So, I agree with you in principle on this, but in practice, this will likely require quite a lot of finicky tinkering to get it right (i.e. it's not exactly a trivial fix)
Member

Added subscriber: @totoro-4

Added subscriber: @totoro-4
Member

maybe it should be a superposition over a Bezier curve (with 0 derivatives at the smooth ends), then you can distort this with the Bezier curve only as usual.

maybe it should be a superposition over a Bezier curve (with 0 derivatives at the smooth ends), then you can distort this with the Bezier curve only as usual.

I see this is not as ease as I was thinking. If there's anything I could do to help, please let me know.

I see this is not as ease as I was thinking. If there's anything I could do to help, please let me know.
Member

For example, let's calculate the bounce between 0 and 1, as a sequence of n parabolic curves. Then calculate the end_value + ((bezier_value - end_value) * bounce) for the curve. With the Bezier curve you can smoothly modify the heights of the bounces.

For example, let's calculate the bounce between 0 and 1, as a sequence of n parabolic curves. Then calculate the end_value + ((bezier_value - end_value) * bounce) for the curve. With the Bezier curve you can smoothly modify the heights of the bounces.

Hi @totoro-4, please help me to understand the result of what you're proposing. Is this supposed result curve correct for your approach?
mix-bezier-bounce.png
I believe this would not be the desired result, at least for Bounce. In this case the mix with bezier should effect just the first bounce, this way:
mix-bezier-bounce-correct.png
Would it be possible using your approach? Thanks in advance.

Hi @totoro-4, please help me to understand the result of what you're proposing. Is this supposed result curve correct for your approach? ![mix-bezier-bounce.png](https://archive.blender.org/developer/F86580/mix-bezier-bounce.png) I believe this would not be the desired result, at least for Bounce. In this case the mix with bezier should effect just the first bounce, this way: ![mix-bezier-bounce-correct.png](https://archive.blender.org/developer/F86582/mix-bezier-bounce-correct.png) Would it be possible using your approach? Thanks in advance.
Member

It's closer to the second one. The low points are remaining down (the difference multiplied by 0) and the high points are touching the Bezier curve (the difference multiplied by 1). The Bezier curve works like the envelope in music synthesizers here.

It's closer to the second one. The low points are remaining down (the difference multiplied by 0) and the high points are touching the Bezier curve (the difference multiplied by 1). The Bezier curve works like the envelope in music synthesizers here.
Member

Képernyőkép_–_2014-05-01_22:28:28.png

![Képernyőkép_–_2014-05-01_22:28:28.png](https://archive.blender.org/developer/F86590/Képernyőkép___2014-05-01_22_28_28.png)

Removed subscriber: @LeoMoon

Removed subscriber: @LeoMoon

I see what you're saying and the envelope comparison is very meaningful. My concern is that the Bezier envelope would over increase the start of the Bounce curve. So the result start could be greater than the desired and maybe it doesn't follow the normal:
mix-bezier-bounce-2.png
I'm not sure about it, It just seems the case because my understanding about the envelope is that it's just a multiplier vector, not a limiter. I'm just supposing, the actual result can be different.

I see what you're saying and the envelope comparison is very meaningful. My concern is that the Bezier envelope would over increase the start of the Bounce curve. So the result start could be greater than the desired and maybe it doesn't follow the normal: ![mix-bezier-bounce-2.png](https://archive.blender.org/developer/F86613/mix-bezier-bounce-2.png) I'm not sure about it, It just seems the case because my understanding about the envelope is that it's just a multiplier vector, not a limiter. I'm just supposing, the actual result can be different.
Member

To connect perfectly to the starting point and direction, the first parabola must start at the top point where its multiplier is 1 and its derivative is 0. It won't go over the Bezier curve. The enveloped parabolas are not symmetrical, resulting an unnatural motion.

It is possible to try all this with a python driver. If I have a little free time I will make you an example .blend.

Another version when only the top points are defined by the Bezier curve and the bounces are perfect parabolas. This requires a lot more calculations, not reusable with other curve types. In this case the starting point is not at the top of the parabola and perhaps must be calculated from a differential equation. I'm not a mathematician so I cannot help with this.

To connect perfectly to the starting point and direction, the first parabola must start at the top point where its multiplier is 1 and its derivative is 0. It won't go over the Bezier curve. The enveloped parabolas are not symmetrical, resulting an unnatural motion. It is possible to try all this with a python driver. If I have a little free time I will make you an example .blend. Another version when only the top points are defined by the Bezier curve and the bounces are perfect parabolas. This requires a lot more calculations, not reusable with other curve types. In this case the starting point is not at the top of the parabola and perhaps must be calculated from a differential equation. I'm not a mathematician so I cannot help with this.
Member

Removed subscriber: @dna-7

Removed subscriber: @dna-7

Added subscriber: @ideasman42

Added subscriber: @ideasman42
While useful, this isnt a bug Moving to TODO http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Animation#Animation_System
Joshua Leung was unassigned by Sybren A. Stüvel 2020-11-09 18:34:05 +01:00
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:36:52 +01:00
Sybren A. Stüvel added this to the Animation & Rigging project 2023-02-14 15:32:45 +01: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 Assignees
7 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#39916
No description provided.