3
$\begingroup$

With Node Wrangler enabled, I can quickly preview a texture node with Shift+Ctrl+LMB.

But what puzzles me is that it creates a Viewer Node, which seems unnecessary:

enter image description here

enter image description here

As shown above, the result doesn't look different if I connect my Texture Node to Material Output directly.

So why does Node Wrangler create this Viewer Node? In which situation would it be necessary?

$\endgroup$
0

1 Answer 1

6
$\begingroup$

It's a technical detail but using the Emission Shader as some kind of bridge is technically correct.


The color of each socket represents a specific data type. Quoting from What is the meaning of the color of the node sockets in the node editor?:

  • Grey is a single value
  • Yellow is a tuple containing 3 values; the red, green, and blue channels of a color.
  • Purple is a tuple containing 3 values. Used for vector/coordinate information.
  • Green is a shader closure, representing a description of how light will interact with a surface or volume. This one can only be connected into other green sockets.

As you can see the Surface socket from the Output node is green so it expects an incoming shader (closure) and no other kind of data. However, that you're allowed to plug any other node type into the Surface Socket is actually a great feature...

enter image description here

For the sake of completeness: In case a float socket (grey) is connected to rgb (yellow) the resulting g and b channels are just a copy of r to fill it up.

$\endgroup$
1
  • $\begingroup$ In older versions of Blender, there was no implicit type conversion when plugging non-green sockets into Surface. It did nothing. That is the context Node Wrangler was originally made in. The emission viewer node was mandatory until fairly recently. $\endgroup$
    – Ascalon
    Jul 17, 2022 at 0:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .