Luminance to Scalar
Jump to navigation
Jump to search

Overview
The Luminance to scalar node calculates the luminance of the color values from the shader or function nodes assigned to the Main Input, then outputs the luminance as a scalar value.
The math for this is:
-
luminance = 0.2125 * r + 0.7152 * g + 0.0724 * b
In the image below, an image map's colour values are converted to scalar based on each colour's luminance value.

In following example, a Painted shader supplies three colour values, which are then used to displace the terrain surface according to the conversion formula, illustrating how much each colour contributes to the luminous value.
Settings:
- Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Luminance 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.