Colour to Greyscale Colour

From Terragen Documentation from Planetside Software
Revision as of 23:33, 21 March 2022 by Redmaw (talk | contribs) (Updated description of math involved.)
Jump to: navigation, search
Colour to Greyscale Colour


Overview[edit]

The Colour to greyscale colour node converts the Input colour into greyscale colour. The math is the same for converting colour data to scalar data according to the node input type conversion rules which are described in the Node Input Type Conversion documentation.


When converting a colour to a scalar, the scalar is set to the luminance value of the colour:

    luminance = 0.2125 * r + 0.7152 * g + 0.0724 * b


Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Colour to greyscale colour 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.



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

This is essentially the brightness of the colour. Terragen converts RGB colours to greyscale by taking the luminance of the colour.

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.