Unclamped smoothstep with…. not sure if this is the right term, but “dynamic steepness”

functionsinterpolation

So, I need a smoothstep function for my game, and this seems to be the standard function that most people use:

$y = (x^2) *(3-2*x)$

This is computationally friendly, which is important, but it doesn't provide a lot of control over the curve as far as I can tell. The advice I've received is to use the function again on it's own output to get a steeper curve, but that doesn't really allow for very fine control, nor does it allow for a more shallow curve. Also, going beyond 1 actually inverts the direction with this function.

Is there some way to control the steepness of this curve through a "strength", and continue past 0 & 1 at least a little bit. Ideally I think I want a function that can produce graphs with a shape like these:
Example graphs

This shows the kind of function I am trying to get with three different "strength" values resulting in different steepness of the drop-off. Unfortunately I can't figure out how to get a function like that(I actually had to draw the graph in an image editor…).

I tried fiddling with tangents because I thought a sigmoid might at least give me easy control over the strength, but it needs to pass through the points {(0,0),(0.5,0.5),(1,1)} to be useful for interpolation and sigmoids never seem to actually reach the edge clamp values {(0,0),(1,1)} which isn't really usefull for interpolation from 0…1, or at least I haven't figured out how to do it…

Also, full disclaimer, I'm a computer scientist, not a mathematician, so please explain it to me like I'm an idiot.

Hopefully I've explained my problem adequately… If you have questions I can try to answer them…

Best Answer

Choose $1<h\leq3$ and $0<j\leq4$, and say your independent variable is $0\leq x\leq 1$.

Let $t(x)=\text{abs}(2x-1)^{\,\large j}$.

Then the function
$f(x)=0.5(1+\text{sgn}(2 x-1) \sqrt[\huge j]{\dfrac{(h-2) t(x)^3+h\ t(x)}{(2 h-3)\ t(x)^2\,+\,1}})$
does what you need with much flexibility.

Geogebra applet: https://ggbm.at/wxahvwky