Difference between revisions of "Clamp Colour"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:IMPORT]]
 
='''Clamp Colour'''=
 
 
 
[[Image:drex_module_68_image_0.png|485pxpx|Clamp Colour]]
 
[[Image:drex_module_68_image_0.png|485pxpx|Clamp Colour]]
__NOTOC__
 
  
 
'''Node Description & Purpose: '''<br /> The Clamp family of nodes allow you to clamp, or restrict, the values of the colour or scalar coming into the Input between the values specified by the '''Min''' input and the '''Max''' input. If the value is less than the '''Min''' value it's set to the '''Min''' value. If the value is greater than the '''Max''' value it's set to the '''Max''' value. The clamping is done component-wise for colours. Here is an example using a colour, with the following values:
 
'''Node Description & Purpose: '''<br /> The Clamp family of nodes allow you to clamp, or restrict, the values of the colour or scalar coming into the Input between the values specified by the '''Min''' input and the '''Max''' input. If the value is less than the '''Min''' value it's set to the '''Min''' value. If the value is greater than the '''Max''' value it's set to the '''Max''' value. The clamping is done component-wise for colours. Here is an example using a colour, with the following values:
Line 11: Line 7:
 
After clamping the colour will have these values:
 
After clamping the colour will have these values:
  
Input.red becomes -0.5 (-1 was less than the '''Min''' value, so it becomes -0.5)<br /> Input.green remains 0.5 (0.5 is between the '''Min''' and '''Max''' values, so it's unchanged)<br /> Input.blue becomes 1.5 (2 was greater than the '''Max''' value, so it becomes 1.5)
+
Input.red becomes -0.5 (-1 was less than the '''Min''' value, so it becomes -0.5)<br /> Input.green remains 0.5 (0.5 is between the '''Min''' and '''Max''' values, so it's unchanged)<br /> Input.blue becomes 1.5 (2 was greater than the '''Max''' value, so it becomes 1.5)
  
 
'''Node Type: ''' Function
 
'''Node Type: ''' Function
Line 17: Line 13:
 
'''Settings: '''<br />
 
'''Settings: '''<br />
  
<br />'''Min: '''This is the value used for the minimum clamp value. If the input value is less than this value then the output is set to this value. If there is no node attached to this input then no minimum value clamping is done.<br />'''Max: ''' This is the value used for the maximum clamp value. If the input value is greater than this value then the output is set to this value. If there is no node attached to this input then no maximum value clamping is done.<br />
+
'''Min: '''This is the value used for the minimum clamp value. If the input value is less than this value then the output is set to this value. If there is no node attached to this input then no minimum value clamping is done.<br />'''Max: ''' This is the value used for the maximum clamp value. If the input value is greater than this value then the output is set to this value. If there is no node attached to this input then no maximum value clamping is done.<br />
 +
 
 +
[[Category: Clamp]]

Revision as of 18:14, 1 June 2011

Clamp Colour

Node Description & Purpose:
The Clamp family of nodes allow you to clamp, or restrict, the values of the colour or scalar coming into the Input between the values specified by the Min input and the Max input. If the value is less than the Min value it's set to the Min value. If the value is greater than the Max value it's set to the Max value. 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
Min value is -0.5
Max value is 1.5

After clamping the colour will have these values:

Input.red becomes -0.5 (-1 was less than the Min value, so it becomes -0.5)
Input.green remains 0.5 (0.5 is between the Min and Max values, so it's unchanged)
Input.blue becomes 1.5 (2 was greater than the Max value, so it becomes 1.5)

Node Type: Function

Settings:

Min: This is the value used for the minimum clamp value. If the input value is less than this value then the output is set to this value. If there is no node attached to this input then no minimum value clamping is done.
Max: This is the value used for the maximum clamp value. If the input value is greater than this value then the output is set to this value. If there is no node attached to this input then no maximum value clamping is done.

A scalar is a single number. 1, 200.45, -45, -0.2 are all examples of scalar values.