manipulating output of cycles nodes

When I’m working with Blender Internal, I can mix prettymuch any colour output of any node.
For example, I can overlay the output of a lambert with a phong.

Does cycles not allow this? The output of any shader has a green coloured output, which appears to be incompatible with colour mix nodes. I can combine them with mix shader node, but that node only allows for “mix” blend modes- and I want something else.

What if I want to put a shader’s output through a ramp?

Perhaps we should approach this a bit more results-oriented: What exactly is it that you want to achieve?
If we’re clearer about that, perhaps we can tell you how to achieve the desired effect with the way Cycles’ nodes work.

A shader is a universal, isolated definition of a certain way a surface can react to light: Does it emit, absorb, reflect, diffuse, refract etc. light? This makes the shader essential for any material, as light is what our ability to see is based on and without light interaction any object would be invisible. And that’s why a shader is always the last step before feeding into the Material Output node.

Based on that definition: Why would you want to mix a shader with a color?
That’s like answering the question: “Is that object made of glass or of steel?” with: “Well, it’s red.” http://blenderartists.org/forum/images/smilies/sago/wink.gif
Color and shader are simply different levels of information and mixing them does not make any sense to Cycles.

I’m trying to create a toon shader where a light’s highlights appear to be painted on. I’ve built this in BI, but I want to mix in some bounced light. I’d like to be able to use cycles to do this. I’d much prefer to be able to mix together the effects in the material tree rather than in comp. I don’t want to have to rebuild the same comp tree in all of my scenes.

The trick relies on running the output of a lambert through a curve in order to select the bright areas from the dark.


You can use a pair of tool specular shaders and use that texture for the fac. input in the mix shader node (there’s two different types of toon shading available in Cycles that are designed more for stylized rendering than accuracy).

I tried this yesterday - it sort of works, except that it fails to restrict the paint texture to the transition between highlight and shadow.

Here’s one of the better shaders I came up with in BI. I like how it looks, but it would be nice to have the texture projection options that are available in cycles - another reason I’d like to do this in cycles.

And again, I wish I could include this in a bounced light calculation.


Ok guys,
I’m probably going to end up giving each light a different paint-style texture, so I’m gonna have to split the lights into different passes, and recombine everything in comp.

In other words, if I’m going to be comping my image together, I may as well build my light fields in cycles, and do all the trickery in comp.

Thanks for your help.
Incidentally, while reading around I bumped into that Blender BEER project’s website. I’m really excited about that project - and I hope it goes forward. If I could construct toon shaders in realtime using Blender’s interface, that would be really exciting. Cycles really isn’t the right tool to do NPR stuff- and while BI is more appropriate, it lacks the refined design of cycles.