Clamp 0 Scalar

From Planetside Software Wiki
Jump to: navigation, search

Clamp 0 Scalar

Node Description & Purpose:
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: is -1 is 0.5 is 2

After clamping the colour will have these values: becomes 0 (-1 was less than 0, so it becomes 0) remains 0.5 (0.5 is greater than 0, so it's unchanged) remains 2 (2 is greater than 0, so it's unchanged)

Node Type: Function

This node has no other settings apart from the Input node.

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

A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.