Page MenuHome

Make easing equations to follow the curve start point normal
Open, NormalPublic


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:

For Bounce In:

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:

For Bounce:

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.

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.


To Do

Event Timeline

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 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)

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.

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 @Fazekas Laszlo (totoro), please help me to understand the result of what you're proposing. Is this supposed result curve correct for your approach?

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:

Would it be possible using your approach? Thanks in advance.

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.

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:

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.

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.