0
$\begingroup$

I was trying to animate something that was scaling exponentially, so I created an fcurve with two keyframes and configured it for exponential easing. It did not behave as I expected.

Consider two keyframes (frame,value): (1,1) and (11,32).

I would expect that to be interpolated as (3,2) (5,4) (7,8) (9,16) , doubling every two frames.

Instead I see (3,1.121) (5,1.484) (7,2.938) (9,8.75) .

What are the equations governing blender's exponential interpolation mode?

$\endgroup$
1
  • $\begingroup$ I expect the math you are looking for can be found here $\endgroup$
    – sambler
    Sep 22, 2016 at 5:07

1 Answer 1

0
$\begingroup$

The math used can be found here, the calculations for the parameters used can be found here.

The calculation used for exponential ease in is -

change * powf(2, 10 * (time / duration - 1)) + begin

The curve is calculated between a start keyframe (begin) and an end keyframe, time is the time elapsed since the start key and duration is the total time between start and end, change is the amount the keyed value changes between keyframes.

The commit that adds this and the other nine interpolation types to blender contains links to easings.net and robertpenner.com/easing/ as the source of the calculations.

$\endgroup$
4
  • $\begingroup$ When I reproduce that formula in a spreadsheet it matches the values I'm seeing. It is somewhat disappointing that the span of the exponent is hardcoded to 1:1024 . $\endgroup$
    – Mutant Bob
    Sep 24, 2016 at 19:58
  • $\begingroup$ Feel free to submit a bug report that it should be improved or have alternate interpolation options added. $\endgroup$
    – sambler
    Sep 25, 2016 at 3:29
  • $\begingroup$ When I get some time I think I'll write a math paper about exploiting the fcurve handles to implement an exp(ax+b)+c+dx interpolation, or come up with another formula. $\endgroup$
    – Mutant Bob
    Sep 27, 2016 at 18:39
  • $\begingroup$ My incomplete research is documented at web.purplefrog.com/~thoth/math-papers/exponential-easing/… . There is considerable work to be done before it can be used as a form of easing in fcurves. $\endgroup$
    – Mutant Bob
    Oct 13, 2016 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .