Add Scalar: Difference between revisions
No edit summary |
Updated description and added example images. |
||
| Line 1: | Line 1: | ||
[[ | [[File:AddScalar_00_GUI.png|none|470px|Add Scalar]] | ||
__TOC__ | |||
Input. | == Overview == | ||
The Add family of nodes allow you to add the colour/scalar/vector coming into the Main Input by the color/scalar/vector coming into Input 2. The addition is component-wise, for example with scalar: | |||
Main Input.X + Input 2.X | |||
Input. | Main Input.Y + Input 2.Y | ||
''' | Main Input.Z + Input 2.Z | ||
When the source of the incoming data is colour data, the Add 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 Add 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. | |||
'''Settings:''' | |||
*'''Name:''' This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Add Scalar nodes in a project. | |||
*'''Enable:''' When checked, the node is active and the Main Input value is added with the Input 2 value. When unchecked, only the Main Input value is passed through the node. | |||
*'''Input 2:''' The values from the shader or function nodes assigned to this setting are added to the values of the Main Input. | |||
== Fun with Add Scalar == | |||
[[File:AddScalar_01_MainInputAndInput2.JPG|none|800px| Add scalar combines the Main Input and Input 2 component values, discarding displacement data, and outputting scalar data.]] | |||
[[File:AddScalar_02_MainInputOnly.JPG|none|800px|When Input 2 is unassigned, data from the Main Input is passed through as scalar data.]] | |||
[[File:AddScalar_03_Input2Only.JPG|none|800px|When the Main Input is unassigned, nothing is passed through.]] | |||
[[File:AddScalar_04_ColourInputs.JPG|none|800px|When colour values are used as the source for the Main Input and Input 2, their component’s luminance values are used.]] | |||
[[File:AddScalar_05_VectorInputs.JPG|none|800px|When vector values are used as the source, the scalar values are based on the length of the vector from a zero origin.]] | |||
[[File:AddScalar_06_VectorAndColourInputs.JPG|none|800px|Vector and colour values can be used simultaneously as inputs to the Add Scalar node. Their component values are converted as necessary and output as scalar data.]] | |||
[[File:AddScalar_07_VDMAndColourInputs.JPG|none|800px|No matter the type of source data, the output of the Add Scalar node is scalar data.]] | |||
<br /n> | |||
[[Category: Add]] | [[Category: Add]] | ||
Revision as of 23:52, 20 January 2022

Overview
The Add family of nodes allow you to add the colour/scalar/vector coming into the Main Input by the color/scalar/vector coming into Input 2. The addition is component-wise, for example with scalar:
Main Input.X + Input 2.X
Main Input.Y + Input 2.Y
Main Input.Z + Input 2.Z
When the source of the incoming data is colour data, the Add 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 Add 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.
Settings:
- Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Add Scalar nodes in a project.
- Enable: When checked, the node is active and the Main Input value is added with the Input 2 value. When unchecked, only the Main Input value is passed through the node.
- Input 2: The values from the shader or function nodes assigned to this setting are added to the values of the Main Input.
Fun with Add Scalar