Trouble with a shadow catcher

I’m working on an animation. The scene is camera mapped to a background HDRI, and shadows are cast by the HDRI. However, I’m tryibng to match the shadows to the BG, and whilst I can get them to the right tone, density and blur in post, I’m hitting a ghostying problem.
Screenshot_2023-11-15_13-10-41

You can clearly see the issue under foot. The “halo” doesn’t appear in the un-treated image.
I’ve tried reducing the scale of the shadow catcher slightly before comping, but whilst it helps, it doesn’t remove the problem, and introduces unwanted shading around the actual foot.

My compositing setup

The problem is caused by the blur.

Any ideas?

Yeah, the problem is that the Shadow Catcher pass is held out by all the casting objects, so you’ve got a white foot in the pass where you should just have more shadow. I render my shadow passes in a second go with the casting objects set to Indirect Only.



If you can’t re-render, you might be able to get away with a simple edge-extend setup, something like this, smearing the pixels inward at the edge of the foot before the blur operation happens.

1 Like

Thank you. It looks like rendering the shadow catcher in isolation, and them comping the rest of the anim on top of that looks like the way to go after testing a couple of options. I had to adjust my compositing node set up (and I’ve learned that the env pass works even if transparent film is enabled, so bonus).

At least, since I know the animation won’t change, I only need to render the shadows once, and I can tweak the rest to my hearts content.