1
$\begingroup$

I'm using a material setup in Blender Internal for cell look. I want to use same setup for Cycles but I can't get exact same result. In this setup; I can select shadow color and direction in color ramp. And also this setup works good in viewport. enter image description here

$\endgroup$
1

1 Answer 1

5
$\begingroup$

You cannot get this exact setup because Cycles does not let you use lighting as a factor in your materials. There is no Lamp Data node in Cycles, and you cannot use a shader's output as an input for another shader or color like you can in Blender Internal. This is because Cycle's lighting and shading isn't calculated until render, so that data is not available. You can make a fake one by using drivers to feed the location of a lamp into value nodes, but it isn't very accurate.

You can still get pretty close by using a Toon Diffuse with a high size and low smooth. Probably .9 for Size, and .01 or .025 for smooth (which is very slight, really just for anti-aliasing.) Note that Cycles will be very sensitive to proper setup of Smooth shading, sharp edges, etc. For a model like that, be sure to use Autosmooth.

If you want your shadows recolored, you will have to do it in the compositor. You can Add the Diffuse Direct and Indirect passes to get a proper shadow mask (the normal Shadow Pass does not include mesh lights or bounce lighting). Then use that as a factor for a color mix or HSV node with hue/saturate adjustments. This works if your shadows are a darker version of your existing color, but it will not work if you want to change the shadow color to something specific on an individual basis (in which case you'd need to use ID masks to select each specific different area that needed a color, which is very inefficient.) Note that when you add these shading passes, the values will be way above 1. You may need to ramp or clamp them.

The other major element here is that your shadows do not get very dark in your image. This can be achieved either through world lighting, having lots of lamps or a scene for light to bounce off of, or with ambient occlusion. Or in the compositor, you can use RGB curves/color correction to lift the blacks of the whole image up to what you want, or you can re-combine the image from it's passes and ramp or use math nodes to control the minimum values.

Keep in mind however that bounce lighting will generally ruin a hard edged, flat cell look. And the whole point of Cycles is bounce light. It can do fine for more detailed toon styles, but if you want to keep things flat and simple, stick to BI.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .