Seperate XYZ vs Combine XYZ as the final output [Pic Attached]

Hi guys, my question is: What does seperate XYZ output? Is it a single number or a varying number depending on the face of the mesh?

image

As we can tell from the above picture, it seems different Z axis on the monkey will have different fac value, ranging from 0 to 1, as output by the “Seperate XYZ” node. So we can tell this node is giving out a “varying” Fac output, depending on the z-axis value. Is that right?

image

However, if we add “combine XYZ” in between, the monkey becomes all green, regardless of the z-axis. And making it a constant green needs a “Fac” of “0”. So the “Combine XYZ” is giving out a constant number, “0”, rather than a “varying” number. Is that right?

My explanation is that the output node on the “Seperate XYZ” node’s “Z” exit, as colored in grey, is giving out a “varying” number.

However, the “Combine XYZ” node’s “vector” exit, as colored in purple, is giving out a “fixed” number? Or it is giving out a vector in “XYZ” dimension, but the “Fac” does not recognize the input. So it ignores the input and give everything a Fac of “0”?

image
But if we all look back to the initial node, “Texture Coordinate” (Generated), it is giving out a vector (a direction), to go from 0 to 1 in both X, Y and Z axis. “Seperate XYZ” says we single out the others and only focus on going from 0 to 1 in Z axis/direction. And the purpose of “Combine XYZ” is to let you do some manipulation before only making it a boring 0 to 1. e.g. 0 to 100. Since I did not do any operation in behind, shouldn’t “Combine XYZ” be taking the original direction of “going 0 to 1 in z-axis” and reflect the same thing?

Separate XYZ returns 3 scalar outputs.
Combine XYZ returns 1 vector output.
In your example with combine you’re feeding the mix node, which requires a scalar input,with a vector (0,0,Z).
You can’t expect that it behaves as if it was a scalar.
I guess the mix node takes the average value, (X+Y+Z) / 3.
At (0,0,0) it gets 0

At (0,0,1) -> 0,33333…

In general:
Blue dot: vector.
Grey dot: scalar.
Yellow dot: color.

1 Like

Afaik if vector output is conncted to scalar input it uses first channel (R or X) not average of them.

I’ve not checked the code, I could be wrong, as I’ve said mine is a guess based on this:

Interesting, maybe it has changed. I have pretty clear memory it used to be like that. Good to know.