8
$\begingroup$

I am mixing colors and roughness of a Glossy shader through Layer weight node.

Material:

enter image description here

Mix Shader:

enter image description here

Mix RGB:

enter image description here

Why do the same properties used in two similar approaches give a very different renders? Colors more or less equal, but roughness difference is quite visible.

$\endgroup$
12
$\begingroup$

Mix shader use a very simple method to combine two shader output. It doesn't guarantee any real material based on physic light reproduce. You are actually using alpha compositing rather than reevaluate a BSDF shader. See the example below.

enter image description here

On the left we use Mix Shader to mix the Roughness between 1.0 and 0.0. Right we use real 0.5 value for a single Glossy BSDF.

You can see that the Glossy 100% reflection just blend into the rough one without any transition. This is totally impossible in real world unless a clear-coat is presented.

So if a single BSDF shader can do the job, don't try to mix other shader, just let it do the calculation and connect it to the output directly.

$\endgroup$
  • $\begingroup$ Great explanation! I always prefered mixing RGB's rather than shaders due to hypothetical performance, but now I see real reason here. $\endgroup$ – Serge L Nov 21 at 9:46
  • $\begingroup$ @SergeL There is the performance difference. Double any BSDF shader is actually almost double the calculation of a surface. They are expensive shader compare to mix shader and mix RGB node. $\endgroup$ – Hikariztw Nov 21 at 10:01
  • 1
    $\begingroup$ @SergeL if you're interested at taking a look at the implementation of Mix RGB and Mix Shader as GLSL shader. The closure_mix is implemented in bsdf_common_lib.glsl. $\endgroup$ – Robert Gützkow Nov 21 at 10:54
  • $\begingroup$ The OSL shader implementation for Cycles can be found here. $\endgroup$ – Robert Gützkow Nov 21 at 11:03
  • $\begingroup$ @RobertGützkow So the mix shader is a linear interpolation of two shader closure output? And the closure contain absorption scatter emission anisotropy properties, and there is no roughness property left for an accurate glossy BSDF? $\endgroup$ – Hikariztw Nov 21 at 11:14

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.