0

Goals

Looking into parametrize with one function many positions transitions of some IRL hardware in motion. Smoothstep() is a staple easein-easeout, but there are some items I'm aiming for:

  • Control the amount of smoothness while keeping the continuity of the curve at lower values, to avoid abrupt accelerations (something that gain() fails at)
  • Bias control, in order to have the mid-point happen sooner or later in the transition, while keeping incoming and outgoing smoothness.
  • Have smooth velocity and acceleration derivatives so the hardware can always easein or easeout into the transition.

What I tried so far

Desmos examples

In this topic:SmoothStep: Looking for a continuous family of interpolation functions

There are a few desmos examples of piecewise implementations that seem to do all I want on the surface. But when I check the derivatives, there's an obvious break in the middle, which is a shame because the extremes are always smooth even on low smoothness values, but the animation is affected by this break.

variable smoothness

Below there are my versions of those, showing the derivatives:

https://www.desmos.com/calculator/x4vyqwkmzo

https://www.desmos.com/calculator/darvudgvni

Inigo examples

https://iquilezles.org/articles/smoothsteps/

This article has all sorts of implementations, Rational one looks promissing with the variable smoothness but derivatives are again "bad".

The only one that seems to have really nice derivatives (image below) is the one known as smootherstep() function or Quintic Polynomial in the article. But there is no parameter for the amount of smoothness (For bias I guess I could do a pre-process)

smootherstep

Other

mollifier

  • Also tried Fabius function but is too stepped.

  • Also tried Circle-circle but while interesting parametrization, the derivatives are oddly straight.

circle

Conclusion

Maybe I'm "asking too much", but the idea is to have a go-to function when setting up many transitions and just have some tweaking parameters that don't break the easing or speed/acceleration much.

Appreciate any hints to solve this. Thanks.

probiner
  • 305

0 Answers0