Red to Scalar

From Terragen Documentation from Planetside Software
Jump to navigation Jump to search
Red to Scalar
Red to Scalar



Overview

The Red/Green/Blue to scalar nodes all take a colour as input and output the respective colour component as a scalar. For example, the Red to scalar node will output the red value of the input colour.


In this example, the Red/Green/Blue to scalar nodes are used to create masks based on a painted shader. The mask created by the Red to scalar node is then used to control the density of a population.
In this example, the Red/Green/Blue to scalar nodes are used to create masks based on a painted shader. The mask created by the Red to scalar node is then used to control the density of a population.
The Node network view showing how each of the red, green, and blue channels can be isolated from the Painted shader, and then used as masks.
The Node network view showing how each of the red, green, and blue channels can be isolated from the Painted shader, and then used as masks.


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

Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Red to scalar nodes in a project.
  • Enable: When checked, the node is active and the conversion operation will take place. When unchecked the values assigned to its Main Input, if any, are passed through, otherwise a value of 0 is passed through.


Fun with Red to Scalar

In the example below, a simple image is used to define areas for population of crops and irrigation canals. By extracting the colour channels via the Red/Green/Blue to scalar nodes, and then combining them with other function nodes, like Add scalar and Subtract scalar, mattes can be derived to help control population density or shader influence.

The source image and red, green, and blue channels used to extract mattes for the agricultural and irrigation areas in the render below.
The source image and red, green, and blue channels used to extract mattes for the agricultural and irrigation areas in the render below.
Render using Red/Green/Blue to scalar nodes to extract mattes from an image to be used for populations of agriculture plants and surface shader for irrigation water.
Render using Red/Green/Blue to scalar nodes to extract mattes from an image to be used for populations of agriculture plants and surface shader for irrigation water.
Node network view showing use of Red/Green/Blue to scalar nodes to extract mattes from an image to be used for populations of agriculture plants and surface shader for irrigation water.
Node network view showing use of Red/Green/Blue to scalar nodes to extract mattes from an image to be used for populations of agriculture plants and surface shader for irrigation water.