Clamp 0 Scalar: Difference between revisions

From Terragen Documentation from Planetside Software
Jump to navigation Jump to search
No edit summary
Redmaw (talk | contribs)
Updated descriptions and added example images.
Line 1: Line 1:
[[Image:drex_module_70_image_0.png|485pxpx|Clamp 0 Scalar]]
<div style="float:right; border-style:solid; padding:20px"><categorytree mode=pages hideroot=off>Clamp</categorytree></div>


'''Node Description & Purpose: '''<br /> The Clamp 0 family of nodes allow you to clamp, or restrict, the values of the colour or scalar coming into the Input so they are always at least 0. If the value is less than 0 it will become 0. All other values remain unchanged. This is useful for ensuring there are no negative numbers passing through a node network.
[[File:Clamp0Scalar_00_GUI.png|none|470px|Clamp 0 Scalar]]


== Overview ==
The Clamp 0 family of nodes allow you to clamp, or restrict, the values of the colour or scalar coming into the Input so they are always at least 0. If the value is less than 0 it will become 0. All other values remain unchanged. This is useful for ensuring there are no negative numbers passing through a node network.
The clamping is done component-wise for colours. Here is an example using a colour with the following values:
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:
<ul>
Input.red becomes 0 (-1 was less than 0, so it becomes 0) <br /n>
Input.green remains 0.5 (0.5 is greater than 0, so it's unchanged) <br /n>
Input.blue remains 2 (2 is greater than 0, so it's unchanged) <br /n>
</ul>
In the example below, an EXR image containing vector data is assigned to the Main Input of the Clamp 0 Scalar 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 Scalar node outputs all negative values as 0.
<ul>
[[File:Clamp0Scalar.jpg|none|800px|Clamp 0 Scalar 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 Scalar nodes in a project.
*'''Enable:''' When checked, the node is active and the negative Main Input values below 0 become 0. When unchecked, the Main Input value is passed through the node.


Input.red is -1<br /> Input.green is 0.5<br /> 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)<br /> Input.green remains 0.5 (0.5 is greater than 0, so it's unchanged)<br /> Input.blue remains 2 (2 is greater than 0, so it's unchanged)
<br /n>


'''Node Type: ''' Function


'''Settings: '''<br /> This node has no other settings apart from the Input node.


[[Category: Clamp]]
[[Category: Clamp]]

Revision as of 00:43, 4 February 2022

Clamp 0 Scalar
Clamp 0 Scalar


Overview

The Clamp 0 family of nodes allow you to clamp, or restrict, the values of the colour or scalar coming into the Input so they are always at least 0. If the value is less than 0 it will become 0. All other values remain unchanged. This is useful for ensuring there are no negative numbers passing through a node network.


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 greater than 0, so it's unchanged)
    Input.blue remains 2 (2 is greater than 0, so it's unchanged)


In the example below, an EXR image containing vector data is assigned to the Main Input of the Clamp 0 Scalar 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 Scalar node outputs all negative values as 0.

    Clamp 0 Scalar off and on.
    Clamp 0 Scalar off and on.


Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Clamp 0 Scalar nodes in a project.
  • Enable: When checked, the node is active and the negative Main Input values below 0 become 0. When unchecked, the Main Input value is passed through the node.