24
$\begingroup$

What's the difference between Add Shader and Mix Shader nodes with the Cycles rendering engine?

I know that Mix Shader gives you more control over the material ratio, of course, but are there any important differences between using an Add Shader and a Mix Shader with ratio set to 0.5?

$\endgroup$
35
$\begingroup$

Add Shaders aren't necessarily physically correct. Simply put the values of the two input shaders are added up for every pixel

value_out = value_1 + value_2

It is possible to reflect more light than received.

If you mix two shaders with the Mix Shader Node you get more physically correct values because it calculates a weighted (by the Fac param) average

value_out = value_1 * Fac + value_2 * (1 - Fac)

This way you reflect at most as much light as you receive provided both inputs are physically correct.

When in doubt use the Mix Shader.

$\endgroup$
  • $\begingroup$ Sorry, @Maccesh. I hope it doesn't look like I'm stealing your answer, I just never posted my answer that I started working on this morning. . . Might as well post it. +1, btw. $\endgroup$ – Daniel Pendergast May 29 '13 at 3:44
  • 6
    $\begingroup$ Generally you'll want to use the Mix Shader to combine BSDF, Subsurface Scattering and Holdout nodes. For Emission and Background nodes Add Shader is ok. $\endgroup$ – brecht May 30 '13 at 18:08
  • $\begingroup$ @brecht What about with translucent BSDFs? (translucent+diffuse?) $\endgroup$ – gandalf3 Sep 2 '14 at 0:59
  • 2
    $\begingroup$ For translucent BSDFs you still want to mix. A photon that hits a surface can either reflect or transmit, not both. $\endgroup$ – brecht Sep 13 '14 at 17:34
0
$\begingroup$

Both shaders have this in common: They are used to combine or put shaders properties together. The difference I would give is that the mix shaders takes the property of one shader e.g diffuse and mixes it with the property of another, say glossy shader.

However, in this case, the mix will be dependent on the factor value. The factor has a proximity of zero to one. By default, the factor value will be 0.5. Setting it to 0 would mean that you get the property of one of the shaders without the other. This will again depend on how you have connected the nodes; either the upper or the lower.

Setting the factor to 1 will get you the absolute property of the other shader. This is very different in the add shader. Taking the example above, and replacing the mix shader with the add shader, we get different results. As its name goes, this adds the property of the two materials.

To mention, this add shader should be used in specific materials since not all materials will add up desirably. Additionally, add shader doesn't have a factor since it cannot. Remember we are adding two properties together and the rule of math is. 1+1=2. Adding a diffuse to another diffuse will make it brighter, sometimes very unpleasant. Adding a diffuse on top of a glossy shader will give you a diffuse material a bit brighter than the original one but no glossy at all. In math you cannot add X and Y and arrive at an absolute answer. But you can add X and -X to give you zero.

$\endgroup$

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.