Hi
Just wondered in what instances do I clamp the Mapping Node and what does it do?
Could someone give an example?
Thanks
Alex
Hello Neishy. Do you mean the Map Range Node? I'm assuming is the Map Range, not the Mapping.
Adrian is the master of the Map Range, he'll answer sooner or later. But as far as I know, clamp is for returning your values from 0 to 1. For example, lets say you have your black and white values on a plane using the noise texture and you've been performing add or multiply operations with the nodes. Things is, probably without you realizing it, your white is not 1 anymore. If you used the eye dropper and took a sample of the white pixel, you'd probably see the value up to 30 for example. So when you use clamp, your crazy higher than 1 values will get clamped back to 1 again. The value in the colors wont get pass 1 after that, things will remain in the 0 to 1 values for the blacks and whites. Spikey or Adrian will probably explain it better in a while. How in the mean time this helps.
Spikey's explanation is spot on!
Here I have created a visual example.
A plane with a simple Displacement, the scale of the displacement is controlled by the map range node with the input value from the value node with a driver giving the frame number as the value.
The From Min and Max are the frames 1 to 50, and the To Min and Max are the displacement scale from 0 to 1.
As you see with the map range clamped, at frame 50 the scale is clamped to the To Max value of 1.
When unclamped the displacement scale continues, in this case with 100 frames, in linear value to 2.
I think the naming on the map range node is a little confusing! 😕
It would be better if the From Min and Max was named Input (or in) Min and Max
and the To Min and Max was named Output (or Out) Min and Max
Oh yes, that is also possible.
I have two issues with that:
1. you still have the Min and Max, which can be confusing for people, because the Min can be larger than the Max
2. the term Input Range, might enforce the notion to some people, that they cannot input Values outside of that Range
But it depends on who is looking at the Node; for some people one version is easier to understand, while others might prefer another version...and once you understand how it works, it doesn't matter anymore.