Add Vector: Difference between revisions
jrfconvert import |
Updated descriptions and added example images. |
||
| (9 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[ | [[File:AddVector_00_GUI.png|none|470px|Add Vector]] | ||
[[ | |||
__TOC__ | |||
== Overview == | |||
The Add family of nodes allow you to add the colour/scalar/vector coming into the Main Input with the colour/scalar/vector coming into Input 2. | |||
The Add Vector node adds two vectors together. It wants the incoming data to be vectors, but it will convert colours and scalars to vectors if necessary, by setting the vector component’s value to that of the incoming data component’s value. For example, if the incoming data were colour then the vector.x becomes colour.red, and if the incoming data were scalar, the vector.x would be set to the value of scalar.x. | |||
'''Settings:''' | |||
'''Name:''' This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Add Vector 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 Vector == | |||
In the example images below, the box labeled Add Vector Output is used for illustration purposes because the shader preview windows can only display values up to 2. | |||
The Add Vector node adds the Main Input component values with Input 2’s component values. Mathematically, this can be written as (Main Input X + Input 2 X), (Main Input Y + Input 2 Y), (Main Input Z + Input 2 Z) | |||
[[File:AddVector_01_ConstantVectors.JPG|none|800px|The Add Vector adds the component values from the Main Input and Input 2.]] | |||
If a shader or function nodes are not connected to Input 2, the Main Input is passed through as vector data. | |||
[[File:AddVector_02_ConstantVectorsMainInputOnly.JPG|none|800px|When Input 2 is disconnected, the Main Input vector values are passed through.]] | |||
If a shader or function nodes are not connected to the Main Input, nothing is passed through the node. | |||
[[File:AddVector_03_ConstantVectorsInput2Only.JPG|none|800px|When the Main Input is disconnected, nothing is passed through.]] | |||
Vector component values can be positive or negative, and there is no limitation to their value. They can often be quite large depending on what the source is. | |||
[[File:AddVector_04_ConstantVectorsLargeNumber.JPG|none|800px|Vector component values can be positive and negative.]] | |||
When scalar data is used as the source, it is first converted to a vector, then added to each vector component’s value. | |||
[[File:AddVector_05_ConstantVectorsWithScalar.JPG|none|800px|When the source data is scalar, it is first converted to vector data, then added to each of the vector component’s value.]] | |||
When colour data is used as the source, it is first converted to a vector, then the red value is added to the X, green to the Y, and blue to the Z. Note that displacement values are ignored, only the colour component’s values are taken into consideration, and only vector data is output. | |||
[[File:AddVector_06_ConstantVectorsWithColour.JPG|none|800px|When the source data is colour, it is first converted to vector data, then added to the appropriate XYZ component’s value.]] | |||
<br /n> | |||
[[Category: Add]] | |||
Latest revision as of 20:44, 24 January 2022

Overview
The Add family of nodes allow you to add the colour/scalar/vector coming into the Main Input with the colour/scalar/vector coming into Input 2.
The Add Vector node adds two vectors together. It wants the incoming data to be vectors, but it will convert colours and scalars to vectors if necessary, by setting the vector component’s value to that of the incoming data component’s value. For example, if the incoming data were colour then the vector.x becomes colour.red, and if the incoming data were scalar, the vector.x would be set to the value of scalar.x.
Settings:
Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Add Vector 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 Vector
In the example images below, the box labeled Add Vector Output is used for illustration purposes because the shader preview windows can only display values up to 2.
The Add Vector node adds the Main Input component values with Input 2’s component values. Mathematically, this can be written as (Main Input X + Input 2 X), (Main Input Y + Input 2 Y), (Main Input Z + Input 2 Z)
If a shader or function nodes are not connected to Input 2, the Main Input is passed through as vector data.
If a shader or function nodes are not connected to the Main Input, nothing is passed through the node.
Vector component values can be positive or negative, and there is no limitation to their value. They can often be quite large depending on what the source is.
When scalar data is used as the source, it is first converted to a vector, then added to each vector component’s value.
When colour data is used as the source, it is first converted to a vector, then the red value is added to the X, green to the Y, and blue to the Z. Note that displacement values are ignored, only the colour component’s values are taken into consideration, and only vector data is output.