Maniphest T101301

shadow catcher shadows no longer present on diffuse passes if shadow catcher pass is disabled.
Closed, Archived

Assigned To
None
Authored By
michael campbell (3di)
Sep 23 2022, 4:07 PM
Tags
  • BF Blender
  • Render & Cycles
Subscribers
Brecht Van Lommel (brecht)
michael campbell (3di)

Description

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.96

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-09-22 21:54, hash: rBe9344d329ffa
Worked: it was last working as usual directly after brecht made this commit: https://developer.blender.org/rCd3895f168d4ffc620e57f09f733323cc9d8428d9 . I'm not sure at which point afterwards the issue was introduced, but I can't see any information in the release notes relating to it.

Short description of error
shadow catcher shadows no longer present on diffuse passes if shadow catcher pass is disabled.

Exact steps for others to reproduce the error
open file


go to the compositor
render still frame
click the left viewer (for the image pass), and then the right viewer (for the manually combined passes).

Because the shadow data is missing from the diffuse direct and indirect passes, the shadows are missing from the manually combined passes. Previously the shadow data would only be missing from the diffuse direct and indirect passes if the Shadow Catcher pass was enabled.

Related Objects

Mentioned Here
rB9ef400ddf747: Cycles: don't write light passes for shadow catcher objects
T96758: unable to rebuild combined image from passes if shadow catcher enabled because the shadow catcher data is missing from the alpha channel
rCd3895f168d4f: Fix T91861: Black environment behind shadow catcher

Event Timeline

michael campbell (3di) created this task.Sep 23 2022, 4:07 PM
michael campbell (3di) added a project: Render & Cycles.Sep 23 2022, 4:11 PM
Brecht Van Lommel (brecht) closed this task as Archived.Sep 23 2022, 4:20 PM
Brecht Van Lommel (brecht) added a subscriber: Brecht Van Lommel (brecht).

The shadow catcher was never part of the diffuse pass, nor was it intended to be. That might be useful, but this is not a bug.

michael campbell (3di) added a comment.EditedSep 23 2022, 5:22 PM

Hi Brecht, previously the shadows were included in the diffuse direct and indirect passes if the object was set to be a shadow catcher and the shadow catcher pass was disabled.

Please see these previous reports and commits you made as examples of the previous behaviour where the data was still kept on the diffuse passes:

https://developer.blender.org/T96758
https://developer.blender.org/rB9ef400ddf74731057b7259b1ed449ad9f3ebd772

In 3.2 daily build the below image pass (0_image) was built from the diffuse passes (no shadow catcher pass was used). Please note the presence of the shadows over the alpha where the shadow catcher object is located. At this point in time, the shadow cast on shadow catchers were kept on the diffuse passes if the shadow catcher pass was NOT enabled.

michael campbell (3di) added a comment.EditedSep 23 2022, 5:25 PM

the above was created on the 31/03/2022 , which was a few days after your commit. So the issue has been introduced somewhere between the 31/03/2022 and some other 3.2 change (as it's also no longer working in 3.2)

Apologies by the way, In this report's last working section I linked to the incorrect commit. I meant to link to the commit shown in the previous comment. Perhaps that led to the confusion.

Brecht Van Lommel (brecht) added a comment.Sep 23 2022, 5:46 PM

T96758 is about shadow catcher objects themselves being in the diffuse pass, not their shadows.

Did you confirm it works in 3.1 or 3.0? The code for this does not exist as far as I can tell, so not sure how it would have ever worked.

michael campbell (3di) added a comment.EditedSep 23 2022, 5:58 PM

Hi, yes I just checked in 3.1 and the lighting data was present in the area of the image where the shadow catcher is, but only if the shadow catcher pass was disabled. Historically turning on the shaodw cathcer pass would then exclude that data from those passes. The issue with the above bug report was fixed by removing just the shadow catcher object from just the diffuse colour pass, but the direct and indirect passes remained untouched providing the shadow catcher pass was disabled.

If you recall you removed the shadow catcher object from the diffuse colour pass, which was great as it all worked correctly after that, but I also asked if you could leave the gloss direct and indirect untouched so that we could get reflections without the need to use a seperate shadow catcher pass (just telling you this to refresh your memory).

Brecht Van Lommel (brecht) added a comment.Sep 23 2022, 6:17 PM

Hi, yes I just checked in 3.1 and the lighting data was present in the area of the image where the shadow catcher is, but only if the shadow catcher pass was disabled.

I see no difference in the diffuse passes in 3.1 when enabling/disabling the shadow catcher pass. The diffuse lighting data is always present.

The issue with the above bug report was fixed by removing just the shadow catcher object from just the diffuse colour pass, but the direct and indirect passes remained untouched providing the shadow catcher pass was disabled.

In 3.2 the shadow catcher object was removed from the diffuse direct/indirect passes, not the color pass. And here also the diffuse passes look the same with shadow catcher enabled/disabled.

If you recall you removed the shadow catcher object from the diffuse colour pass, which was great as it all worked correctly after that, but I also asked if you could leave the gloss direct and indirect untouched so that we could get reflections without the need to use a seperate shadow catcher pass (just telling you this to refresh your memory).

Right, and I explained why making a distinction between diffuse/glossy here would be wrong.

michael campbell (3di) added a comment.Sep 23 2022, 7:07 PM

Oh it was the dir/ind was it, apologies.

I've just realised that it was only working previously because the film was set to transparent, so the alpha pass could be used to leave only the image and shadows on the shadow catcher:

But then that leaves the problem of not being able to put it over the environment, because the parts of the environment obscured by the shadow catcher object are rendered as black:

I guess it's just not possible to rebuild the image from passes if there's a shadow catcher object unless you use the shadow catcher pass:

michael campbell (3di) added a comment.Sep 23 2022, 7:09 PM

bit of a bummer as that means it needs an additional denoise node, and can't denoise to the same quality as denoising the individual passes.

michael campbell (3di) added a comment.Sep 23 2022, 7:26 PM

although even if the shadow catcher pass is enabled, it's not possible to combine the image from the passes if you need film to be set to transparent, because the env pass is not rendered behind the shadow catcher again in that case. Should I raise a new bug for this:

Disabling transparent film brings back the full environment even where it's occluded by the shadow catcher object: