cycles mix shader versus add shader?

What’s the difference between these two? When would one be preferred over the other?

Andrew Price did a recent video on making a glass of beer and for the foam he points out that the Add Shader is what’s needed. He’s using it with the Subsurface Scattering BSSRDF Shader.

I’m trying to make a simple translucent plastic material with the Subsurface Scattering BSSRDF Shader that is dark; it’s easy to do when it’s light. So far it’s not very convincing looking and I think it’s not easy (or possible?) to do when the material is dark. Its HSV value is 0.1 (saturation is 0, hue is 0).

Great, thanks. I did a search here but didn’t find anything. Didn’t know about stack exchange; yet another bookmark …

Add shader is very simple to understand : you have two shaders, it adds values of the two shaders. One diffuse shader at 0.5 add with another diffuse shader at 0.5 will make a diffuse shader at 1.

Mix shader takes an amount of the two shaders. Example : two diffuse shaders, one red, one green. A mix shader with a fac at 0.7 will take for exemple 30% of the first shader and 70% of the second. The mix shader blends the two shaders and have something in-between red and green. The add shader will output not a blend but red + green value.

another way to see it

mix shader output is limited to 1

add shader can go up to 2 or more ! which means it is beginning to emit light
and this is not physically correct but still fun

happy bl

Not really. If you mix two shaders that is already higher than 1, the result of the mix shader will be higher than 1 anyway.

as I remember from cycles wiki it is one of the limitation for mix shader output!

only the add shader output can be greater then 1 !

where did you see this In wiki ?

from another point of view if a mat is more then one the it begins to emit light!

thanks

I’ve just tested it. Two diffuse shader with the color value at 50. Mixed together, the value is still higher than 1. The object is like incandescent (but it doesn’t emit real light).
Good or bad, it depend of what result you want. Is it realistic? Surely not, but the shaders works like that. So we have to be aware of that to avoid weird stuff like I’ve just had.