In the material editor numbers can come in many forms a single number by itself is known as a scalar
value but several numbers combined into a single node is a vector value.
Many common math operations like adding multiplying and rounding can be done to scalar values or to
the individual numbers that make up a vector value.
There are some math operations though that can only be done with vector values.
The dot product node gives us the dot product between two vectors.
If you can think of a combination of three numbers representing a direction like for example a combination
of 0 0 1 would be pointing straight up and a combination of 1 0 0 would be pointing directly to the
side.
Then the dot product will essentially tell you how parallel those two directions are.
A common use for this note is for creating falloff shaders on this sphere the vertices around the edge
are pointing out to the sides.
While our camera view is looking at the sphere dead on since these two directions are almost perpendicular
they return a value of zero.
The vertices in the center are pointing directly towards the camera.
They are looking in the exact opposite direction of the camera's view.
So they return a value of 1.
The cross-product node returns the cross product of two vector 3s while the dot product returns a scalar
value.
The cross product returns another vector.
This will look at the direction of two vectors and return a vector that is perpendicular to both of
them.
So as an example if we feed the cross product node A red and blue value it will return the green value.
The Append node allows us to create vector values out of scalar values.
We can take three seperate single numbers and combine them to create a color or position in space or
custom U.V. coordinates.
It is often best to use with our next node the component mask node.
This allows us to separate the red green and blue channels from the vector node if we want to add a
particular piece of data to only the green channel and our vector.
We could separate the channels out perform operations on each of them individually and then combine
them back together with the append node the Panner and rotator nodes are very easy ways to add animation
to a texture on our materials.
The Panter node will make a text or scroll at a certain speed in the U and V axes while the rotator
node will make the TX to rotate around a specified pivot point.
These are used for a lot of moving materials like water lava or moving patterns of lights.