Jump to content
Georgie

Difference between Fit Range / Unclamped

Recommended Posts

I'm sure it's been brought up before but for whatever reason I can't find a single answer to this on Google. Searching for "fit range unclamped" returns only 2 results o_O

There's no documentation on this VOP either. 

 

Correct me if I'm wrong but Fit Range works as a fit expression. You feed it the source and the destination and it basically stretches or squeezes the values. So if I have a Sparse Convolution noise pattern and I feed it into a Fit Range VOP and set the Source Min / Max to -1.7 and 1.7 respectively, I'll get that remapped in the 0 to 1 range, correct ? 

If I set the Source Min / Max to -1 and 1 , that'll simply 'cut out' the values under -1 and above 1, correct ?

 

So what does the Fit Range Unclamped do exactly ? I suspect the whole 'source' thing confuses me and I think of it the same way I think about the regular Fit Range >.> 

How does it do the remapping ? 

 

Thanks :}

Share this post


Link to post
Share on other sites

It does the same thing as regular fit() without clamping the result if the input is outside the input range.

  • Like 2

Share this post


Link to post
Share on other sites

I am also confused by this. So can anyone explain in what cases the unclamped behavior can be useful? 

Share this post


Link to post
Share on other sites

Clamped is useful to fit and make sure no values exceed your new limits. Unclamped fits and extrapolates.

Here you have a small clip showing a basic visual explanation. You can see that both clamped and unclamped have the same slope but clamped gets blocked between newMin and newMax.

The uses for this are many, I hope it's a bit clearer now.

Cheers!

JT_clampedUnclamped.mp4

  • Like 1

Share this post


Link to post
Share on other sites

if you have a value of 2 and you want to fit it from 0,1 -> 0,10

clamped will return 10, unclamped should return 20.

Its useful to to know a relative ratio of a value to another value in 2 different scales :P

  • Thanks 1

Share this post


Link to post
Share on other sites

Does anyone know an alternative to efit in hscript ? I want the same behaviour to scale down the sensitivity of an asset parameter, with unclamped range.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×