I have been using the mix shader to get different types of metals by mixing diffuse and glossy, I always get good results. However there is a thing I have not understand yet: why the material changes when I exchange the two mix shader inputs (diffuse and glossy). Any explanation out there? Thanks.
-
$\begingroup$ related: blender.stackexchange.com/questions/10595/… $\endgroup$ – user1853 Apr 21 '16 at 16:38
The fresnel node will produce a mask like this:
when you use it as a factor you are just saying that the first input will replace the black and the 2nd will replace the white,
when you switch the inputs,you are just saying that the black should be the 2nd input and the white should be he first.
You can see how this work using a mix color node to visualize it:
By switching :
Yes, has explained above in Omar Ahmad answer the question it's not so much "How does the mix shader work" it's more "How does the Fresnel node work".
They reason your are getting different results when switching positions between those shaders is because of the Fresnel node, not the mix shader itself.
If you were to remove the Fresnell from your material the results would indeed be the same given the Mix node was at 0.5 .
-
$\begingroup$ Unless your mix node is set up to another value than 0.5.The second input is the top color. $\endgroup$ – Yvain Apr 22 '16 at 21:37
-
$\begingroup$ Good point, missed that detail. I'll add that to the answer, thanks $\endgroup$ – Duarte Farrajota Ramos♦ Apr 22 '16 at 22:11