d5273

2 answers · asked · Lesson: Configuring a Wood Material · Course: Modeling, Texturing and Shading a Treasure Chest in Blender 2.8

How does Texture Coordinate's UV data contribute to specular calculation?

In the video, the object's UV map is sent to two Image Texture nodes, which are mixed in a MixRGB node, and then piped to a Color Ramp, which is then sent to Principal BSDF's  specular input. 

I realize that Texture Coordinate's outputs vector date, and Image Texture nodes outputs non-vector data, but how does Texture Coordinate's UV map information affect the resulting specular calculations when the Image Nodes are already using UV map images (namely treasure-chest_COLOR and DVC-bake)?

Also, what happens a RGB color output is connected to a Black and White input (such as the Color Ramp)? Are the values in the HSV data extracted from the Color data or are RGB values somehow mapped to greyscale for the Color Ramp to use?

  • Good questions d.

    First: the Input > Texture Coordinates node just tells the Image Texture nodes to use the UV maps. Image Texture nodes use UV coordinates by default (so you could leave it out) and procedural textures like Noise Texture or Brick Texture etc. use Generated Coordinates by default. When manipulating those UV coordinates, by using a Vector > Mapping node for instance you must explicitely tell Blender what coordinates to manipulate.

    what happens a RGB color output is connected to a Black and White input

    The Color output gets converted to values between 0 and 1. This is done by using the following formula:

    0.2126*R + 0.7152*G + 0.0722*B

    This is called the Luminance of a color and could be thought of as the 'perceived brightness' (Humans are more sensitive to yellow-green than to blue, meaning that something blue will appear darker than something green with the same 'value').

    Not all humans have the same color perception of course, but this is a standard formula (probably not the only one).

    This formula is also used in the Converter > RGB to BW node.

    On the other hand: when you put a single value into a Color or Vector input then all three values (RGB or XYZ) get that same value.

    • Wow, thank you for the formula and explanation! While I understood the necessity of sending UV coordinates to the procedural texture nodes, I was confused about the connection to Image Texture nodes  since having the connection from Texture Coordinates nodes didn't seem to do anything extra to the specular calculations (I thought there was something I didn't understand). This cleared it up for me.