Continuing my journey into Blender compositing, I’ve tried adjusting a shadow catcher pass. Boy, is it interesting. The pass is rendered on a (1,1,1) white background. I assume this is for compositing purposes, but it messes with my goal of being able to composite on top of an sRGB brand color. I can’t simply transform this pass to sRGB as then the (1,1,1) values would get compressed and I won’t be able to use them anymore.
The solution I found was this, but I’m not entirely sure it makes sense.
- extract the white values as alpha mask from the shadow catcher pass
- apply this mask to the shadow catcher pass and transform it to sRGB with AgX.
- Tint the shadows blue-ish for demonstrating purposes. (In a real case I’d choose a similar tint as the background color). I have to be honest I have no clue what the color node is doing exactly here.
- Composite this modified shadow catcher pass over an sRGB green background color
- Composite the original shadowless render over this.
Image pass has alpha (sRGB through AgX)
Shadow catcher pass does not have alpha (Linear BT.709 I-D65)
Composite (sRGB) Yes it looks horrible, but it looks like I intended it to.
I’ll tag @troy_s as well to slap the nonsense out of me