13
$\begingroup$

I want to change the color of the shadow casting by a cube to green. While it's very easy to do it in Blender Internal (you select the lamp, go to the Lamp data header and change the shadow's color in the Shadow panel) in Cycles there're no such options. How to achieve it in Cycles? enter image description here

$\endgroup$
9
$\begingroup$

With the Cycles renderer enabled select the cube, give it a new material and set the material nodes as pictured below. Use the Is Camera Ray of the Light Path node as a factor for mixing the Diffuse and Transparent nodes (Is Shadow Ray works good as well). enter image description here

Change the Hue, Saturation and Value values of the Transparent shader to change the shadow's color, intensity and transparency. enter image description here

Here's the animated test using the changes mentioned above: enter image description here

$\endgroup$
  • 3
    $\begingroup$ Shadow ray is the proper way to do this as camera ray will color reflections as well which will be noticeable in more complex scenes. $\endgroup$ – PGmath Dec 23 '16 at 4:05
  • $\begingroup$ This doesn't seem to work when the shadow is cast on a shadow catcher, is there a workaround for that? $\endgroup$ – rraallvv Mar 6 at 15:18
8
$\begingroup$

An alternative way to do this is to make the light have different colors for direct and indirect rays:

1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.