Smoothstep and Smootherstep

While studying Maude's method, see the previous post, I became aware of 'Smoothstep' a technique widely used in the computer graphics community. It occurs in animation when seeking a smooth transition between key frames, and in shading when smoothing transitions across polygons.  See:

https://en.wikipedia.org/wiki/Smoothstep

The idea first appeared (it seems) in Pixar's work, in the mid-1980s.  It seems very likely it was used long before that as Pixar emanated from the New York Institute of Technology Computer Graphics Lab.  See:

https://en.wikipedia.org/wiki/New_York_Institute_of_Technology_Computer_Graphics_Lab

The blending is exactly the same as Maude, an S-shape curve is used:

   W(t) = 1 - 3*t² + 2t³, where t = (X - X1) / (X2 - X1) 

Indeed there seems a strong motivation for this type of blending in animation and shading.  For animation, there is a need for 'slow-in, slow-out' to avoid jerks at key frames.  For shading, there is a similar need for smoothness at polygon edges so that the eye does not detect the change and the edges do not stand out.  The use of 'slow-in, slow-out' was used by animators in pre-computer days, for example, Walt Disney in the 1930s.

There seems to me less motivation in the case of curve drawing. Because Maude includes no references, it is unclear whether he was influenced by animators, or whether he came up with the idea independently.

Here is an image of Smoothstep (or its equivalent 1-W(t)):


The Smoothstep weighting function is the cubic Hermite interpolant satisfying:

    W(0) = 1, W(1) = 0, W'(0) = W'(0) = 0.

Ken Perlin, in a 2002 SIGGRAPH paper, suggested 'Smootherstep', where the weighting function is an interpolant satisfying not only the conditions for Smoothstep, but also satisfies:

    W''(0) = W''(1) = 0

This requires a quintic polynomial:

    W(t) = 1 - 6t⁵+ 15t⁴ - 10t³

Here is a comparison, again drawing the equivalent 1-W(t):


The Smootherstep function is flatter at the end points and steeper at the midpoint.  Perlin notes that this reduces visual artifacts in noise generation. See also:

https://developer.nvidia.com/gpugems/gpugems/part-i-natural-effects/chapter-5-implementing-improved-perlin-noise

It is possible to adapt Maude's curve drawing method to use the Smootherstep approach.

Here is the result of the quintic weighting function on the Peak dataset:



Again there is very little difference between this method and the osculatory method.  The extra cost of Smoothstep/Maude and Smootherstep over the osculatory method is the requirement to evaluate a fifth degree, or seventh degree, polynomial rather than cubic.

I discuss blending of quadratics in my 1980 IMA paper.  I fear I had not understood Maude's paper properly.  I wrote:

"It is possible to blend the quadratics so that the interpolating function has second derivative continuity, but the interpolant is then a piecewise quintic which is less convenient computationally."

I think now that to get second derivative continuity we need a quintic blending function, as above, which makes the interpolant degree 7.


Comments

Popular posts from this blog

Piecewise Linear Interpolation of Cubic Polynomial

Wiggins Methods

Curve Drawing Over the Years