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 11 months ago by 3di · 25 comments
3di commented 11 months ago

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)
3di commented 11 months ago
Poster

Added subscriber: @3di

Added subscriber: @3di
Owner

Added subscriber: @brecht

Added subscriber: @brecht
Owner

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

Changed status from 'Needs Triage' to: 'Archived'
brecht closed this issue 11 months ago
Owner

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.
3di commented 11 months ago
Poster

@brecht Where is this option please?

@brecht Where is this option please?
Owner

It's the shadow catcher pass that you enabled.

It's the shadow catcher pass that you enabled.
3di commented 11 months ago
Poster

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

ah never mind, you just disable the pass. Thanks.
3di commented 11 months ago
Poster

@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)
3di commented 11 months ago
Poster

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?
3di commented 11 months ago
Poster

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
3di commented 11 months ago
Poster

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)
Collaborator

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

@3di: is the latest file the one from the report description?
3di commented 11 months ago
Poster

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)
Collaborator

will look at it tomorrow

will look at it tomorrow
3di commented 11 months ago
Poster

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.
Collaborator

This issue was referenced by 9ef400ddf7

This issue was referenced by 9ef400ddf74731057b7259b1ed449ad9f3ebd772
Owner

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'
3di commented 11 months ago
Poster

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
3di commented 11 months ago
Poster

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)
3di commented 11 months ago
Poster

@lichtwerk could you re-open this?

@lichtwerk could you re-open this?
Collaborator

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?)
3di commented 11 months ago
Poster

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.
3di commented 11 months ago
Poster

@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.
Owner

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.
3di commented 11 months ago
Poster

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/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
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/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
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
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
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 & Devices
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 Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#96758
Loading…
There is no content yet.