unable to rebuild combined image from passes if shadow catcher enabled because the shadow catcher data is missing from the alpha channel #96758

Closed
opened 2022-03-24 14:33:54 +01:00 by michael campbell · 25 comments

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

Blender Version
Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-02-18 21:28, hash: 93cc892470
Worked: (newest version of Blender that worked as expected)

I develop an addon which rebuilds the combined image from the passes and then outputs to an image format with an alpha channel. If a shadow catcher is in the scene, then it seems impossible to get the correct result in the re-combined image because the shadow catcher data is missing from the alpha pass.

image.png

test file:
Turbo_Test_02.blend

**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12 **Blender Version** Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-02-18 21:28, hash: `93cc892470` Worked: (newest version of Blender that worked as expected) I develop an addon which rebuilds the combined image from the passes and then outputs to an image format with an alpha channel. If a shadow catcher is in the scene, then it seems impossible to get the correct result in the re-combined image because the shadow catcher data is missing from the alpha pass. ![image.png](https://archive.blender.org/developer/F12942673/image.png) test file: [Turbo_Test_02.blend](https://archive.blender.org/developer/F12942676/Turbo_Test_02.blend)

Added subscriber: @3di

Added subscriber: @3di

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'

You can choose to render the shadow catcher as alpha or as a separate pass to be multiplied into the background. You have set up the latter in this file, so there's not going to be an influence on the alpha channel.

You can choose to render the shadow catcher as alpha or as a separate pass to be multiplied into the background. You have set up the latter in this file, so there's not going to be an influence on the alpha channel.

@brecht Where is this option please?

@brecht Where is this option please?

It's the shadow catcher pass that you enabled.

It's the shadow catcher pass that you enabled.

ah never mind, you just disable the pass. Thanks.

ah never mind, you just disable the pass. Thanks.

@brecht this still isn't producing the correct result, sorry I've never used the shadow catcher when rebuilding from passes. Perhaps I'm doing something wrong?

image.png

@brecht this still isn't producing the correct result, sorry I've never used the shadow catcher when rebuilding from passes. Perhaps I'm doing something wrong? ![image.png](https://archive.blender.org/developer/F12942703/image.png)

or is it just a case of the plane needing to be black?

or is it just a case of the plane needing to be black?

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk

This doesn't appear to be a user issue. I think the shadow catcher objects need to show as black in the diffuse direct and indirect passes (where there is no indirect lighting), this way the alpha will leave just the shadow and indirect lighting.

The glossy passes are fine because they automatically show as black where there's no reflection. Haven't tested transmission passes.

I can't do it using the shadow catcher pass, because this removes it from the alpha.

@brecht can you re-open this?
@lichtwerk could you also have a look just to make sure this is not a user issue at my side?

image.png

This doesn't appear to be a user issue. I think the shadow catcher objects need to show as black in the diffuse direct and indirect passes (where there is no indirect lighting), this way the alpha will leave just the shadow and indirect lighting. The glossy passes are fine because they automatically show as black where there's no reflection. Haven't tested transmission passes. I can't do it using the shadow catcher pass, because this removes it from the alpha. @brecht can you re-open this? @lichtwerk could you also have a look just to make sure this is not a user issue at my side? ![image.png](https://archive.blender.org/developer/F12942788/image.png)
Member

@3di: is the latest file the one from the report description?

@3di: is the latest file the one from the report description?

Thanks @lichtwerk I'm pretty desperate on this one as someone just asked for refund because of it. So hopefully it is just something I'm doing wrong.

Here's a simpler version
rebuild combined from passes with shadow catcher.blend

Thanks @lichtwerk I'm pretty desperate on this one as someone just asked for refund because of it. So hopefully it is just something I'm doing wrong. Here's a simpler version [rebuild combined from passes with shadow catcher.blend](https://archive.blender.org/developer/F12942814/rebuild_combined_from_passes_with_shadow_catcher.blend)
Member

will look at it tomorrow

will look at it tomorrow

thanks. I'm pretty sure it's a bug as I'm quite skilled in this area (been doing it for 20 years), but perhaps there is some Blender specific thing that I'm missing.

thanks. I'm pretty sure it's a bug as I'm quite skilled in this area (been doing it for 20 years), but perhaps there is some Blender specific thing that I'm missing.

This issue was referenced by 9ef400ddf7

This issue was referenced by 9ef400ddf74731057b7259b1ed449ad9f3ebd772

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'

thanks @brecht much appreciated. Did you discard the diffuse direct only and keep the indirect pass for the shadow catcher? Indirect could be kept as that renders black already where there's no indirect light. Would be nice to keep the indirect light if possible as that's included in the alpha

thanks @brecht much appreciated. Did you discard the diffuse direct only and keep the indirect pass for the shadow catcher? Indirect could be kept as that renders black already where there's no indirect light. Would be nice to keep the indirect light if possible as that's included in the alpha

Hi The shadow catcher's diffuse colour is still being written to the diffuse direct pass in today's daily build of 3.1.1:
image.png

Hi The shadow catcher's diffuse colour is still being written to the diffuse direct pass in today's daily build of 3.1.1: ![image.png](https://archive.blender.org/developer/F12959219/image.png)

@lichtwerk could you re-open this?

@lichtwerk could you re-open this?
Member

Fix is only in 3.2 (if this is what you meant -- or did you mean to reopen because of indirect?)

Fix is only in 3.2 (if this is what you meant -- or did you mean to reopen because of indirect?)

ah ok, sorry, I thought the bug fixes were applied to all daily's. I'll check now. It shouldn't have affected the indirect passes hopefully, as they are already black where there's no indirect lighting data.

ah ok, sorry, I thought the bug fixes were applied to all daily's. I'll check now. It shouldn't have affected the indirect passes hopefully, as they are already black where there's no indirect lighting data.

@lichtwerk I've just checked in 3.2 and although the shadow catcher's diffuse colour have been removed from the DiffDir pass (allowing it to work), it's also been unncecessarily removed from the DiffInd and gloss passes, resulting in loss of indirect lighting and reflection. Ideally these should have been left alone, as now all the GI etc has been lost. These can be left alone because they render black where there's no data anyway.

@lichtwerk I've just checked in 3.2 and although the shadow catcher's diffuse colour have been removed from the DiffDir pass (allowing it to work), it's also been unncecessarily removed from the DiffInd and gloss passes, resulting in loss of indirect lighting and reflection. Ideally these should have been left alone, as now all the GI etc has been lost. These can be left alone because they render black where there's no data anyway.

The shadow catcher makes no distinction between diffuse and glossy, or direct and indirect, and they do not behave fundamentally differently when it comes to what renders black or not in general. Diffuse direct light is not special here and should not be treated as such.

The shadow catcher makes no distinction between diffuse and glossy, or direct and indirect, and they do not behave fundamentally differently when it comes to what renders black or not in general. Diffuse direct light is not special here and should not be treated as such.

ah ok. I just thought if you only removed the shadow catcher from the DiffDir, then we could still have indirect lighting and reflection. The only issue was the shadow catchers diffuse colour showing up on the diffDir pass (making the shadow catcher visible when combining the image).

ah ok. I just thought if you only removed the shadow catcher from the DiffDir, then we could still have indirect lighting and reflection. The only issue was the shadow catchers diffuse colour showing up on the diffDir pass (making the shadow catcher visible when combining the image).
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#96758
No description provided.