[Cycles] Indirect light catcher?

Hello.
I would like to export a single transparent PNG containing only the shadows and indirect light that a plane receives from other objects. Could you tell me if there is a method similar to a “shadow catcher” but for indirect light?
I am using the Cycles rendering engine; the Blender version does not matter.

What’s the context here? What are you actually trying to do? What is this for?

I don’t think simple transparency is going to work for this. What’s a shadow in indirect lighting? Anything that is darker than white?

I think you should probably look into compositing light passes for whatever you need this for.

Thank you MartinZ for your reply.

While waiting for a response to my message, I experimented on my own and managed to get things looking quite good; however, I had overlooked the fact that exporting a Cycles render as a PNG results in semi-transparent areas looking significantly different from how they appear within Blender itself.
I have concluded that this is not an issue that can be resolved within Blender alone, so I am closing this topic.
Thank you very much.

Doesn’t seem to be closed. I think it would make sense to detail the solution so it can be useful for someone else looking for a solution to a similar question (or even for yourself, I sometimes look for some solution online and find my own answers from a few years back :laughing: ) and then mark that as the solution and I think then the topics close automatically in a few days after last reply.

Because this.. is a PiNG design flaw and you might have to use EXR or TIFF ??

( You migh use the awesome forum search function (top right; :mag:–icon) to look into dozen of topics about the transparency PiNG problem :wink: )

Also: Why..

..? AFAIK this is for what the shadow catcher feature was made for..

Hi there and welcome to Blender Artists :tada: ,

On Blender Artists only moderators can close threads, instead you should mark the appropriate post as the solution.

But.. what is “the solution” here ?? I might not even undestood the problem.. is it shadow catching or PiNG transparency flaw ?

Not sure, but I just thought I would mention how the forum works and that threads can’t be closed by standard users.

It seems to be the standard problem where one wants to replace compositing passes with simple alpha. This is one of those. There is no real general solution.

We have this:

Combined = (Diffuse Direct + Diffuse Indirect) * Diffuse Color + (Glossy Direct + Glossy Indirect) * Glossy Color + (Transmission Direct + Transmission Indirect) * Transmission Color + Emission + Environment + (Volume Direct + Volume Indirect)

And then we have whatever straight alpha does:

Image = Image2 * Alpha + Image1 * (1 - Alpha)

And we need to solve for… the pink elephant. …I think. …might as well. :laughing:

Although… how does regular shadow catcher work? It doesn’t in my opinion, but you get a pass that you use to multiply, right? So maybe that’s OK, one can just take direct and indirect light passes without color passes and that’s it?.. I am not sure. You cannot really save regular shadow catcher in a transparent png…

First, I believe a major reason for the color discrepancy in the transparent areas of the PNG output is the difference in color spaces between Blender and my other graphics applications.
As for the method I discovered to render shadows and indirect lighting with a transparent background, here are the steps:

  1. Place two planes in the scene—one for the shadow catcher and one for indirect lighting—along with the object that will generate the shadows and indirect light.

  2. Move each object into a separate collection.

  3. Set up two render layers (name them “Shadow Layer” and “Indirect Lighting Layer”).

  4. For the Shadow Layer, disable the indirect lighting plane collection so that only the shadow and the subject are rendered.

  5. For the Indirect Lighting Layer, enable the Diffuse Indirect and Glossy Indirect passes, disable the shadow catcher plane collection, and enable “Indirect Only” for the subject collection.

  6. Configure the Compositor Nodes as shown in the image, and you are done.