Planetside Software Forums

Function Nodes In Practice => Function Nodes by Category - UNDER CONSTRUCTION => Clamp Functions => Topic started by: Hetzen on September 30, 2019, 08:54:42 AM

Title: Clamp 0 1 Scalar explained
Post by: Hetzen on September 30, 2019, 08:54:42 AM
Clamp 0 1 Scalar will turn any value above 1 to 1 and any value below 0 to 0, leaving everything in between as is.

Using a cosine signal with a range of +2 to -2 as the heights of the curves peaks...

Clamp_0_1_Scalar_01.jpg

...we can demonstrate that there is a sharp stop to any values above 1 and below 0.

Clamp_0_1_Scalar_02.jpg

Clamp 0 1 Scalar is useful when combining multiple scalar sources together, for say a mask, and will prohibit negative or above 1 values interfering with a desired 0 to 1 range.

If there's any errors, omissions or questions about the above, please leave a comment and we will add further details in this post when relevant.

https://planetside.co.uk/wiki/index.php?title=Clamp_0_1_Scalar