Why do I get way to dark shadows in transparent PNG? (Shadow Catcher)

Hey there,
I’m working in 4.1 and don’t get this solved: as soon as I activate the shadow catcher option for my floor plane, the shadows from the area light gets waaaay to dark. The shadows from the hdri seem OK. And everything is fine as long as I render the floor plane also. But I have to output a transparent PNG with the shadows.
Any suggestions?

you could use this material for your shadow catcher… with a factor of 0.0, the shadow catcher will act as normally, but if you increase the factor, the shadows will become transparent.

Thanks for that.
So the shadow catches does not work as intended in 4.1? For me it seems as if the alpha for the catcher catcher isn’t saved correctly.
And I have another issue: I don’t get an correct alpha for objects with transparency (it’s enabled in the settings under “film”).

Is the object with transparency, a shadow catcher?

No, there are objects on a floor plane. the plane is the shadow catcher. But I just found out that I had to raise the Roughness Threshold value under “Transparent Glass”.

But… are your objects transparent or glass? (these are totally different effects)
… could you please post some images of what your scene looks like? it’s difficult for me to imagine whatever is going on over there.

SceneSetup.blend (1.4 MB)
That’s how far as I could get. At least in the compositor I managed to get the look right. But saving the viewer image results in a B/W-image whicht seems to be kind of the alpha but not really, because it’s missing the objects transparency…

How transparency is missing if none of your objects is transparent (aside the shadow catcher)?
They are a mix of glass and translucent closures, which are both full opaque.

What do you really want to do? Do you want a translucent object to work as if it was transparent for a later composition? :confused:

The objects are not fully transoparent, but transmissive. So light shines through them. To be able to comp them over any colored background, I need the alpha reflecting this “transparency”. The Images are totally fine as long as I render the floor plane too. But I need the images on transparent BG.

But that isn’t how an alpha channel in an image works…
The alpha, just lets color pass through directly from the pixels below it… they cannot distort or diffuse the layer below!

There are some tricks, like masking the translucent objects, and later colored them with some blurred background version… but is just a simple composition trick.

2 Likes

somehow it must be calculated, where the background affects the image and to what amount. Otherwise the image with rendered floor plane wouldn’t be possible. All I need is to replace the background color with transparency.
I just don’t get how to bring htis data into the compositor…

I could use the visibility of the (rendered) floor plane via cryptomatte as a kind of alpha channel, but how do I create a transparent background in the compositor and how do I get the floor shadows ont top of this transparent “layer”?

Ok… let go by parts:
If the object is opaque (translucent/refractive inclusive), then everything behind the object will not be rendered (it might be hit, by some transmissive ray, but as far as the end image goes, the first hit is opaque).

If you want to have an alpha value for those objects, you need to render the scene once again with those objects transparent (or hidden), so that the information behind them can be rendered… (It will loose the ‘translucent’ effect, but you cannot store that in the alpha channel, anyway).
Then you mix everything in the compositor.

1 Like

The “Matte” output of the cryptomatte for the floor plane exactly gives me what I need. There obviously is the transmissive information stored. Inverted and set as alpha for the rendered image I get a translucive look I can comp over any BG in post.
Now I’m struggling to comp in the floor shadow inside blender. I used the CryptoMaterial “Matte” output to isolate the floor shadows. All I need to do now is bring this into the image… but I can’t get this working.
SceneSetup.blend (1.4 MB)

is this what you want to accomplish?

you can add more transparency, by tweaking the output of the Invert Color node, with a FloatCurve or a ColorRamp.

Nearly.
The goal is to have the background shine through and keep the floor shadows.
But that should be possible with an additional alpha over I guess.

Here’s an even simpler setup… I just activated the shadow catcher.

OK, final question: how do I replace that "untitled "node with transparence that ist saved withing the PNG?
Just realized - using the plane as shadow catcher results in to dark shadows. My main problem in the beginning. But this ist solved with your idea for the floor material.
I will do it this way I think. It’s not perfect, but good enough.
Thanks al lot for your help!

You don’t need the ‘Untitled’ node, neither the ‘Alpha Over’… that is just to show the transparency of the rendered image.

Yeah, the main point are the dark shadows. This can be tweaked with the material for the floor. But the question remain: why are the shadows so dark as soon as the floor is a shadow catcher?