Clamp 0 1 Colour: Difference between revisions
No edit summary |
m Added Clamp 01 family of nodes chart. |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<div style="float:right; border-style:solid; padding:20px"><categorytree mode=pages hideroot=off>Clamp</categorytree></div> | |||
[[File:Clamp01Colour_00_GUI.png|none|470px|Clamp 0 1 Colour]] | |||
== Overview == | |||
The Clamp 0 1 family of nodes allow you to clamp, or restrict, the values of the colour or scalar coming into the Input between 0 and 1. If the value is less than 0 it will become 0. If the value is greater than 1 it will become 1. The clamping is done component-wise for colours. Here is an example using a colour with the following values: | |||
<ul> | |||
Input.red is -1 <br /n> | |||
Input.green is 0.5 <br /n> | |||
Input.blue is 2 <br /n> | |||
</ul> | |||
After clamping the colour will have these values: | After clamping the colour will have these values: | ||
<ul> | |||
Input.red becomes 0 (-1 was less than 0, so it becomes 0) <br /n> | |||
Input.green remains 0.5 (0.5 is between 0 and 1, so it's unchanged) <br /n> | |||
Input.blue becomes 1 (2 was greater than 1, so it becomes 1) <br /n> | |||
</ul> | |||
[[File:Clamp01familyOfNodes.png|none|800px|The Clamp 0 1 family of nodes outputs a value of 0 for any input value below 0, and a value of 1 for any input value above 1. All other input values are left unchanged.]] | |||
In the example below, an EXR image containing vector data is assigned to the Main Input of the Clamp 0 1 Colour node. Visually, the green pixels represent data above a value of 0 in the Y axis, whereas the magenta pixels indicate a blend of positive and negative values lying on the X and Z axis. When enabled, the Clamp 0 1 Colour node outputs all negative values as 0, and any positive values above 1, as 1. | |||
<ul> | |||
[[File:Clamp01Colour.jpg|none|800px|Clamp 0 1 Colour off and on. ]] | |||
</ul> | |||
'''Settings:''' | |||
* '''Name:''' This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Clamp 0 1 Colour nodes in a project. | |||
*'''Enable:''' When checked, the node is active and the Main Input values below 0 become 0, while values above 1 become 1. When unchecked, the Main Input value is passed through the node. | |||
<br /n> | |||
[[Category: Clamp]] | [[Category: Clamp]] | ||
Latest revision as of 20:48, 21 February 2022

Overview
The Clamp 0 1 family of nodes allow you to clamp, or restrict, the values of the colour or scalar coming into the Input between 0 and 1. If the value is less than 0 it will become 0. If the value is greater than 1 it will become 1. The clamping is done component-wise for colours. Here is an example using a colour with the following values:
-
Input.red is -1
Input.green is 0.5
Input.blue is 2
After clamping the colour will have these values:
-
Input.red becomes 0 (-1 was less than 0, so it becomes 0)
Input.green remains 0.5 (0.5 is between 0 and 1, so it's unchanged)
Input.blue becomes 1 (2 was greater than 1, so it becomes 1)

In the example below, an EXR image containing vector data is assigned to the Main Input of the Clamp 0 1 Colour node. Visually, the green pixels represent data above a value of 0 in the Y axis, whereas the magenta pixels indicate a blend of positive and negative values lying on the X and Z axis. When enabled, the Clamp 0 1 Colour node outputs all negative values as 0, and any positive values above 1, as 1.
Settings:
- Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Clamp 0 1 Colour nodes in a project.
- Enable: When checked, the node is active and the Main Input values below 0 become 0, while values above 1 become 1. When unchecked, the Main Input value is passed through the node.
