Combining two shaders, one with color map, one with a specularity map

I'm trying to add a specularity map to a mesh with a color map shader already on it. However, when I attempt this, I seem to have to choose between one shader or another (see the body and glossy shaders in the materials tab in this screenshot of my screen

(source: deepplanet.com)

They just toggle back and forth, letting me use one or the other but not both.

So, do I have to remove the color image texture, and then somehow do this another way? Or is there a simple way just to add it? I was trying to follow this tutorial but it seemed like a really long way to go about it. Is there a simple, shorter way to do this?

You want to use a mix shader (or sometimes an add shader) to combine multiple shader nodes in the node editor. The mix shader node will combine two shaders based on a given fraction. The fac value determines the amount of the second shader in the output.

For instance the following will result in a 20% glossy (and 80% diffuse) material:

You can even use something else, such as a map or input node, to control the mix factor variably across the object.

Here I have plugged a specularity map into the factor, lighter areas on the map will receive more gloss, darker areas will receive more diffuse.

And here I have mixed in another glossy shader using an input > fresnel node as a factor, this will make grazing angles even more glossy (which is more realistic).

Note: to add a node hit Shift+A and select the node you want to use.

• So how do I add a mix shader? Can I just add it in the node window? – Agent Zebra Aug 11 '15 at 3:48
• @AgentZebra See my last edit. – PGmath Aug 11 '15 at 4:11
• Thank you so much! Fantastic in-depth answer. Super helpful! – Agent Zebra Aug 19 '15 at 5:58