Gen – Smoothstep function

Feb 12, 2012 at 3:36pm

Gen – Smoothstep function

I was trying to observe the difference between “mix” and “smoothstep” types of interpolation. And somehow I can’t understand what “smoothstep” is doing.

Use the toggle to switch between “mix” and “smoothstep”…

– Pasted Max Patch, click to expand. –
#61678
Feb 12, 2012 at 3:53pm

[mix] is default linear interpolation, [smoothstep] is default no interpolation. i see the results fine with your patch. what do you see?

#222673
Feb 12, 2012 at 5:02pm

this is what I see at xfade 0 and 1 for [smoothstep]. I was expecting some kind of crossfade…?

[attachment=185057,3339] [attachment=185057,3340]

Attachments:
  1. Screenshot20120212at5.59.53PM.png
#222674
Feb 12, 2012 at 6:08pm

smoothstep is a different beast compared to mix. mix mixes between two values where the mix value is between [0, 1]. smoothstep gives you a ramp in the range [0, 1] that is calculated from two values and an interpolation value that is between those two inputs. For example:

smoothstep(0, 2, 0.5) –> 0.16
smoothstep(0, 2, 1.5) –> 0.84
smoothstep(0, 2, 1.75) –> 0.96

smoothstep(1, 2, 0.5) –> 0
smoothstep(1, 2, 1.5) –> 0.5
smoothstep(1, 2, 1.75) –> 0.84

If you’re trying to create a hermite interpolated crossfade, you’ll need to something like this:

– Pasted Max Patch, click to expand. –
#222675
Feb 12, 2012 at 8:53pm

thanks wesley! now i know too…

#222676

You must be logged in to reply to this topic.