Whatever I do, I can't figure out how to change the color of my shadows.

I am using the "shadow catcher" feature in v.2.79 and have my object and the shadow catcher on separate layers.

I tried adding an additional Sun with a blueish tint and HDRI images as Environment Maps but both only colored the object, not the shadow. Also, I tried to use a mix node with the shadow layer and a blueish color as inputs, but it looked weird. I am compositing the Render onto a Background video.

The final render looks like this:

(Also for some reason the shadow is much lighter than in the render preview).
Also here is my composite node graph:

## migrated from stackoverflow.comAug 22 '17 at 8:26

This question came from our site for professional and enthusiast programmers.

• Your second link gives 404 page, could you reupload the image with the node setup using internal tool – Mr Zak Aug 22 '17 at 9:46
• there are various reasons why the shadow in the final render is lighter than in preview render. Without the blend file it's hard to diagnose. It could be a render layer setup mismatch, different restriction settings between vieport and render mode, etc. If you could provide the blend at blend-exchange.giantcowfilms.com/?ref=be-community-add-2 , it could be looked into. – aliasguru Aug 29 '17 at 20:08
• – cegaton Mar 15 at 16:36

The Shadow Catcher shader is designed to return the whole appearance of the shader in the Alpha channel. You can see this when rendering a shadow catching object, and switching the display from RGBA to RGB (discarding the Alpha channel information):

normal RGBA display mode:

only RGB channels, entirely black:

only Alpha channel:

Now to add color to your shadows, You'll need to work on the RGB components, as the Alpha is just a blending factor between foreground and background. You can use a very simplified setup like this to get started:

So I'm feeding the Alpha Channel of my shadow catcher layer into a set alpha node, which allows me to define completely different RGB components there. In this setup, I went for a cheap and simple solid dark blue color, but it could also be your color corrected background image with a bluish tint in there.

## further examination

For further explanation and the Render Layer setup, check out the .blend file here:

## EDIT: Comping over a background image

The following setup should give a hint on how to tint the shadow, in case you need to comp it over an arbitrary background. I forgot that in the original answer, apologies here. Check the updated .blend file from here:

As troy_s suggests in the comments, to tint that shadow on the background, a multiplication has to happen first. Think of the Alpha channel as a constriction of light: It's like cutting out a FG image, and thus it merely defines a geometry rather than a transparency. That can be utilized here. The node setup basically multiplies the BG image with the desired tint color:

Multiplying is one way to treat that BG, but you can use other grade nodes if you like. In that first section you basically tint the whole background before assigning the Alpha channel to that resulting image. So in essence, you grade the BG, and then cut out the portion which is in shadow, and comp that over the original background. An additional Alpha Convert is needed here. If you mute it, you'll notice a lift of pixel values in areas where there should not be any change. The Alpha Convert fixes that.

The resulting image shows a comparison between the two (black and tinted). Please note that the tinted shadow will always get lighter than the black one. That's simply because nothing can become darker than (0.0, 0.0, 0.0). To achieve a different color (like blue), channels need to be lifted.

• How did you get the shadow catcher to render to a separate render layer? When I try it, I get no shadow because my object's not in that layer. – Dan Bennett Sep 6 '17 at 20:07
• @DanBennett I've uploaded a .blend file for you to examine. Basically, I need to setup two render layers, one for the foreground and one for the shadow. While the FG has to be masked by the shadow plane, the shadow itself must not be masked by the FG (so there is no holdout, thus it will be much easier to comp later on). – aliasguru Sep 7 '17 at 7:12
• Thanks, aliasguru! I think I was close, but didn't know about the Set Alpha node. – Dan Bennett Sep 14 '17 at 22:08
• Shouldn't that set be a multiply first, and then the set? Constrict to emission level, then set? – troy_s Sep 25 '17 at 23:40
• @troy_s You're referring to correct composition with an arbitrary background image I suppose? The current node setup does not account for that, I'll need to update the answer. Seems like I'm too much used to comp over white... – aliasguru Sep 26 '17 at 7:57