1
$\begingroup$

enter image description here

I was following a tutorial in order to learn nodes for 2.8. When this line turned red and made the entire thing pink (missing textures). Does anyone know how to prevent this?

$\endgroup$
  • 2
    $\begingroup$ The mix Shader node doesn't make sense there, hence the red line. 'Mix RGB' node might work for your case $\endgroup$ – WhatAMesh Jul 26 at 20:12
  • 2
    $\begingroup$ All of the connections are wrong. Don't connect texture's color output(yellow) to a mix shader(green). Don't connect shader outputs (green) to inputs that expect images (yellow or gray). don't conect color outputs (yellolow) to surface inputs (green). Read What is the meaning of the color of the node sockets and blender.stackexchange.com/questions/102520/… $\endgroup$ – cegaton Jul 26 at 20:31
2
$\begingroup$

In the latest builds of Blender 2.8, the node editor has been enhanced to highlight some links in red to indicate that they are invalid connections. In this particular case, you're using a Mix Shader node to mix colors - you should instead be using a MixRGB node for this; the Mix Shader should only be used to connect to Green sockets.

In general, you should only connect 'like for like' - ie, green to green, grey to grey, yellow to yellow, etc. There are exceptions to this and Blender can automatically convert between some types - eg, connecting a Scalar (Grey) socket to a Color (Yellow) will automatically generate a greyscale color. Similary, connecting a Color (Yellow) to a Scalar (Grey) will average all the color channels together as (r+g+b)/3 to use the result.

However, Green represents a shader output - which is more than just a surface color and cannot be automatically converted - so connecting one of those to another color is not valid. Previously Blender would allow this without warning and simply produce an invalid result, but the Node Editor has now been enhanced to warn of such invalid connections by highlighting the link in Red.

$\endgroup$
0
$\begingroup$

On The Red Line Put The "Shader To RGB" Node (Eevee Exclusive)

$\endgroup$

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

  • $\begingroup$ Do note though that RGB has to be converted to shader after ColorRamp since the latter outputs color. It is much more logical to cut Mix shader from where it is and paste it into the place between ColorRamp and Material Output in this case $\endgroup$ – Mr Zak Sep 30 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.