Multiply Scalar: Difference between revisions

From Terragen Documentation from Planetside Software
Jump to navigation Jump to search
No edit summary
Updated to be correct for scalars, not using the colour example.
Line 1: Line 1:
[[Image:drex_module_75_image_0.png|485pxpx|Multiply Scalar]]
[[Image:drex_module_75_image_0.png|485pxpx|Multiply Scalar]]


'''Node Description & Purpose: '''<br /> The Multiply family of nodes allow you to multiply the colour/scalar/vector coming into the Input by the color/scalar/vector coming into Input 2. The multiplication is component-wise, for example with a colour :<br /><br /> Input.red '''multiplied by''' Input 2.red<br /> Input.green '''multiplied by''' Input 2.green<br /> Input.blue '''multiplied by''' Input 2.blue<br /><br />'''Node Type: ''' Function<br /><br />'''Settings: '''<br /> All nodes in this family have just the one setting, which lets you choose a node for Input 2.
__TOC__
 
== Overview ==
The Multiply family of nodes allow you to multiply the colour/scalar/vector coming into the Main Input by the color/scalar/vector coming into Input 2.
 
The Multiply Scalar node wants the incoming data to be scalars, but it will convert colours and vectors to scalars if necessary.
 
* When the source of the incoming data is colour data, the Multiply Scalar node converts the data to scalar based on the component's luminance values.  The math for this is: 0.2125 * r + 0.7152 *g + 0.0724 * b.
 
* When the source of the incoming data is vector data, the Multiply Scalar node converts the data to scalar based on the length of the vector from the zero origin. The math for this is: square_root(x*x + y*y + z*z).
All nodes in this family have just one setting, which lets you assign a shader or function nodes to Input 2.


<!-- imported from file: module_75.html-->


[[Category:Multiply]]
[[Category:Multiply]]

Revision as of 01:42, 21 January 2022

Multiply Scalar

Overview

The Multiply family of nodes allow you to multiply the colour/scalar/vector coming into the Main Input by the color/scalar/vector coming into Input 2.

The Multiply Scalar node wants the incoming data to be scalars, but it will convert colours and vectors to scalars if necessary.

  • When the source of the incoming data is colour data, the Multiply Scalar node converts the data to scalar based on the component's luminance values. The math for this is: 0.2125 * r + 0.7152 *g + 0.0724 * b.
  • When the source of the incoming data is vector data, the Multiply Scalar node converts the data to scalar based on the length of the vector from the zero origin. The math for this is: square_root(x*x + y*y + z*z).

All nodes in this family have just one setting, which lets you assign a shader or function nodes to Input 2.