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:

enter image description here

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


Hopefully this can be fixed, happy about your input :)

  • 2
    $\begingroup$ Your second link gives 404 page, could you reupload the image with the node setup using internal tool $\endgroup$ – Mr Zak Aug 22 '17 at 9:46
  • $\begingroup$ 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. $\endgroup$ – aliasguru Aug 29 '17 at 20:08
  • $\begingroup$ Related: devtalk.blender.org/t/lets-finally-fix-the-shadowcatcher/691 $\endgroup$ – user1853 Mar 15 '19 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:

RGBA composite

only RGB channels, entirely black:

RGB only

only Alpha channel:

alpha only

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:

demo setup

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.


| improve this answer | |
  • $\begingroup$ 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. $\endgroup$ – Dan Bennett Sep 6 '17 at 20:07
  • $\begingroup$ @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). $\endgroup$ – aliasguru Sep 7 '17 at 7:12
  • $\begingroup$ Thanks, aliasguru! I think I was close, but didn't know about the Set Alpha node. $\endgroup$ – Dan Bennett Sep 14 '17 at 22:08
  • $\begingroup$ Shouldn't that set be a multiply first, and then the set? Constrict to emission level, then set? $\endgroup$ – troy_s Sep 25 '17 at 23:40
  • $\begingroup$ @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... $\endgroup$ – aliasguru Sep 26 '17 at 7:57

There is one easier way to get over it

1.open your PNG with Photoshop and use select color layer to adjust shadow part

Here is the original effect enter image description here

2.choose color to black in select color layer(which point to shadow part), and then adjust it the color parameter by youself enter image description here

3.If you want to batch adjust PNG images or video clip, make a action record in Photoshop enter image description here

4.export that action to execution file enter image description here

5.Every time you want to make shadow colorful , just drag your image or folder to that exported execution file , you will quickly reach your dream enter image description here

| improve this answer | |
  • $\begingroup$ Rendering 101: PNG and Alpha = No good. ...You can however render as separate layer to EXR and use the alpha as mask for another fill layer. $\endgroup$ – brockmann Mar 6 at 9:15
  • $\begingroup$ No,different layer combination will generate a white line in the border ,cause they can't touch tightly this is Blender bug itself $\endgroup$ – Super-ilad Mar 6 at 9:15
  • $\begingroup$ Nope, not a bug - try OpenEXR. $\endgroup$ – brockmann Mar 6 at 9:17
  • $\begingroup$ well, in my try , OpenEXR or any kind of image file cant prevent separate render layer generating a white line in the their border , you can find it in blender.stackexchange.com/q/7440/88489 , this is a Blender bug , and many people discuss it $\endgroup$ – Super-ilad Mar 6 at 9:35
  • $\begingroup$ Again, not a bug, you just have to understand what you do and do it right: blender.stackexchange.com/a/67371/31447 and en.wikipedia.org/wiki/Alpha_compositing $\endgroup$ – brockmann Mar 6 at 9:41

Your Answer

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