artefacts in transparent area in depth pass #100537

Closed
opened 2022-08-21 15:21:56 +02:00 by Robert Rioux · 37 comments

System Information
Operating system: macOS-12.3.1-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro Vega 64 OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.8.15

Blender Version
Broken: version: 3.2.1, branch: master, commit date: 2022-07-05 15:44, hash: a2d59b2dac
Worked: (newest version of Blender that worked as expected)

Short description of error
If objects have parts that are transparent, it will create artefacts in the depth pass

Exact steps for others to reproduce the error

Check out the attached files. You can clearly see the issue if you check the compositing tab and reduce the exposure.

depth_issue.blend.zip

Screen Shot 2022-08-21 at 9.16.25 AM.jpg

**System Information** Operating system: macOS-12.3.1-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro Vega 64 OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.8.15 **Blender Version** Broken: version: 3.2.1, branch: master, commit date: 2022-07-05 15:44, hash: `a2d59b2dac` Worked: (newest version of Blender that worked as expected) **Short description of error** If objects have parts that are transparent, it will create artefacts in the depth pass **Exact steps for others to reproduce the error** Check out the attached files. You can clearly see the issue if you check the compositing tab and reduce the exposure. [depth_issue.blend.zip](https://archive.blender.org/developer/F13446308/depth_issue.blend.zip) ![Screen Shot 2022-08-21 at 9.16.25 AM.jpg](https://archive.blender.org/developer/F13409441/Screen_Shot_2022-08-21_at_9.16.25_AM.jpg)
Author

Added subscriber: @Funnybob

Added subscriber: @Funnybob
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Thanks for the report. I'm not able to repro it
image.png

**System Information**
Blender Version: version: 3.2.1
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.78
Thanks for the report. I'm not able to repro it ![image.png](https://archive.blender.org/developer/F13410565/image.png) ``` **System Information** Blender Version: version: 3.2.1 Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.78 ```

Added subscriber: @pixeltrain3d

Added subscriber: @pixeltrain3d

Hi Robert, had problems with your scene because of missing stuff.
I think, @PratikPB2123 had also the missing texture on the objects, so he doesn't see the problem. It's only geometry, so no problem.

But built a comparable scene with leafs (transparencies).

I also get artifacts in the depth pass, looking like pixels which have extrem values in the areas of the leafs with the alpha textures.
Both on CPU and GPU in Blender 3.2.2

Transparent Bounces are 200, no denoiser

Bildschirmfoto 2022-08-22 um 12.29.18.png

I'm on Mac 12.5.1

Hi Robert, had problems with your scene because of missing stuff. I think, @PratikPB2123 had also the missing texture on the objects, so he doesn't see the problem. It's only geometry, so no problem. But built a comparable scene with leafs (transparencies). I also get artifacts in the depth pass, looking like pixels which have extrem values in the areas of the leafs with the alpha textures. Both on CPU and GPU in Blender 3.2.2 Transparent Bounces are 200, no denoiser ![Bildschirmfoto 2022-08-22 um 12.29.18.png](https://archive.blender.org/developer/F13410975/Bildschirmfoto_2022-08-22_um_12.29.18.png) I'm on Mac 12.5.1
Author

Oh! That's strange. I did pack the file before sending it. Here's the leaf texture. IS_Licuala_Grandis_Leaf.png

Oh! That's strange. I did pack the file before sending it. Here's the leaf texture. ![IS_Licuala_Grandis_Leaf.png](https://archive.blender.org/developer/F13411199/IS_Licuala_Grandis_Leaf.png)

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

There must have been a problem choosing the file.
There's no material assigned to the leafs, so I'm not sure what to do with the imagem attached.
Note that this problem appears to be the same as described in #97562 (Noisy in Mist Pass) (closed as a duplicate of #66149, but perhaps better separated).

There must have been a problem choosing the file. There's no material assigned to the leafs, so I'm not sure what to do with the imagem attached. Note that this problem appears to be the same as described in #97562 (Noisy in Mist Pass) (closed as a duplicate of #66149, but perhaps better separated).
Author

@mano-wii Just take the leaf texture and apply it to the leaf shader of the original file. :-)

@mano-wii Just take the leaf texture and apply it to the leaf shader of the original file. :-)
Member

Hi, not sure where to apply texture. Node group you've been using in the file is linked data block.
Please either attach IS_Licuala_Grandis_wind.blend or make a local scenario where we can redo the problem.
image.png

Hi, not sure where to apply texture. Node group you've been using in the file is linked data block. Please either attach `IS_Licuala_Grandis_wind.blend` or make a local scenario where we can redo the problem. ![image.png](https://archive.blender.org/developer/F13444013/image.png)
Author

depth_issue.blend.zip

Try this one instead, Thanks

[depth_issue.blend.zip](https://archive.blender.org/developer/F13446308/depth_issue.blend.zip) Try this one instead, Thanks
Author

Looks like it affect the mist, depth and position passes too. So it's more serious that I thought. Because of this issue, it makes all 3 AOVs useless. It's a major issue.

Looks like it affect the mist, depth and position passes too. So it's more serious that I thought. Because of this issue, it makes all 3 AOVs useless. It's a major issue.
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Added subscriber: @jbverdier

Added subscriber: @jbverdier

I can confirm the bug, it's really annoying when building natural environments (most of the vegetation assets will use alphas for the leaves) and rendering the mist or position pass.
To compare, Clarisse makes the clip map available in raytracing, maybe that would help as the noise doesn't seem to appear in eevee.

I can confirm the bug, it's really annoying when building natural environments (most of the vegetation assets will use alphas for the leaves) and rendering the mist or position pass. To compare, Clarisse makes the clip map available in raytracing, maybe that would help as the noise doesn't seem to appear in eevee.

Added subscriber: @AnishSreedhar

Added subscriber: @AnishSreedhar

For now only workaround is to filter out semi transparent alpha using math node and just use pure black and white alpha

For now only workaround is to filter out semi transparent alpha using math node and just use pure black and white alpha

Added subscriber: @zrp

Added subscriber: @zrp

This is really a frustrating bug, getting this to work is crucial for many of the renders. I hope this will be fixed soon.image.png

This is really a frustrating bug, getting this to work is crucial for many of the renders. I hope this will be fixed soon.![image.png](https://archive.blender.org/developer/F13935184/image.png)

Added subscriber: @Sergey

Added subscriber: @Sergey

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'

Thanks for the report, but it is not really a bug.

The Depth pass is only written for the first sample, so that there is no depth interpolation is going on. This leads to the visual artefacts in mixed transparency cases like the one form the example file in this report.

If you are fine with interpolated depth then using Denoising Depth (available when enabling Denoising Data pass) will give you the result you expect.

Thanks for the report, but it is not really a bug. The Depth pass is only written for the first sample, so that there is no depth interpolation is going on. This leads to the visual artefacts in mixed transparency cases like the one form the example file in this report. If you are fine with interpolated depth then using Denoising Depth (available when enabling Denoising Data pass) will give you the result you expect.

Attention, this bug report is not about missing AA in the depth pass. This is good so, because data passes should never be anti-aliased.
But in my tests I see that you will find pixel in the depth pass which make no sense in the depth value in relation to the surrounding areas. So the should be sampled more accurate.
(Sorry, no programmer but comper)

Attention, this bug report is not about missing AA in the depth pass. This is good so, because data passes should never be anti-aliased. But in my tests I see that you will find pixel in the depth pass which make no sense in the depth value in relation to the surrounding areas. So the should be sampled more accurate. (Sorry, no programmer but comper)

To me it seems that the depth pass behaves according to the setup.

Those artefacts happens on a semi-transparent are from which ray bounces and does not hit anything else, but the depth is not recorded because of the value of the Alpha Threshold.

To me it seems that the depth pass behaves according to the setup. Those artefacts happens on a semi-transparent are from which ray bounces and does not hit anything else, but the depth is not recorded because of the value of the Alpha Threshold.

Thanks for the repley. As you said, only Sample 1 is used. So it will not help to increase the samples, right?
What would be a production solution for that? Any ideas or improvements in mind?
Would be so useful ...

Thanks for the repley. As you said, only Sample 1 is used. So it will not help to increase the samples, right? What would be a production solution for that? Any ideas or improvements in mind? Would be so useful ...

Increasing the number of samples indeed will not help.

You can try two things:

  • Set Alpha Threshold to 0
  • Use Denoising Depth pass
Increasing the number of samples indeed will not help. You can try two things: - Set Alpha Threshold to 0 - Use Denoising Depth pass

ok, thx

ok, thx
Author

Humm, if I may.... It is a bug. I've worked with Renderman, Arnold, Mental Ray, Guerilla and even Maya's renderer and none of them has this issue. It's not a problem with half transparent objects. The edges on the leaves all 100% transparent and therefor should be ignored. It should not be fixed by denoising because this will create antialiasing and zDepth should not be antialiased. So I would like you to reconsider and reopen that task. It's a major issue for anyone who has to deal with vegetation. Thanks.

Humm, if I may.... It is a bug. I've worked with Renderman, Arnold, Mental Ray, Guerilla and even Maya's renderer and none of them has this issue. It's not a problem with half transparent objects. The edges on the leaves all 100% transparent and therefor should be ignored. It should not be fixed by denoising because this will create antialiasing and zDepth should not be antialiased. So I would like you to reconsider and reopen that task. It's a major issue for anyone who has to deal with vegetation. Thanks.

The far edges are 100% transparent, but there is this anti-aliased region around the leaves edge where the alpha values are neither fully transparent nor fully opaque. You can clearly see this in the image editor by choosing the Alpha as the display channel:

Screenshot 2022-11-17 at 16.17.42.png

So what is happening in the pixels which appear to be artefacts is the following:

  • Camera ray hits the leaf in the pixel where texture has alpha value of, say, 0.4
  • The alpha is less than the Alpha Threshold which is set to 0.5, so no depth is recorded
  • After the BSDF evaluation the ray reflects from the surface and hits the background
  • The depth for background is a very high value (10k, AFAIR)

But even if the ray did transmit instead of reflect then the depth pass on that pixel would have been much different from the surrounding values.

Having new information form you that you don't want anti-aliased depth, but fine with the binary separation of alpha channel then the options are:

  • Set Alpha Threshold to 0
  • Modify the image texture so that it does not contain semi-transparent pixels
  • Insert Math node Greater Than 0 between the Alpha output of the image texture before the Alpha input of the BSDF:

Screenshot 2022-11-17 at 16.25.58.png

The far edges are 100% transparent, but there is this anti-aliased region around the leaves edge where the alpha values are neither fully transparent nor fully opaque. You can clearly see this in the image editor by choosing the Alpha as the display channel: ![Screenshot 2022-11-17 at 16.17.42.png](https://archive.blender.org/developer/F13937044/Screenshot_2022-11-17_at_16.17.42.png) So what is happening in the pixels which appear to be artefacts is the following: - Camera ray hits the leaf in the pixel where texture has alpha value of, say, 0.4 - The alpha is less than the Alpha Threshold which is set to 0.5, so no depth is recorded - After the BSDF evaluation the ray reflects from the surface and hits the background - The depth for background is a very high value (10k, AFAIR) But even if the ray did transmit instead of reflect then the depth pass on that pixel would have been much different from the surrounding values. Having new information form you that you don't want anti-aliased depth, but fine with the binary separation of alpha channel then the options are: - Set Alpha Threshold to 0 - Modify the image texture so that it does not contain semi-transparent pixels - Insert Math node Greater Than 0 between the Alpha output of the image texture before the Alpha input of the BSDF: ![Screenshot 2022-11-17 at 16.25.58.png](https://archive.blender.org/developer/F13937077/Screenshot_2022-11-17_at_16.25.58.png)

I have worked with mentalray, v-ray, arnold, redshift, mantra. None of the rendering engines have this issue. Its definitely a bug, Please consider reopening this task.

I have worked with mentalray, v-ray, arnold, redshift, mantra. None of the rendering engines have this issue. Its definitely a bug, Please consider reopening this task.

This issue was referenced by 3d41d0b1b5

This issue was referenced by 3d41d0b1b5779631ea3e1d6edbfd29f791ab27b1

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'

Added subscriber: @brecht

Added subscriber: @brecht

Looked at this together with @Sergey, I committed a change that fixes the gaps at least. However the resulting depth pass is still noisy, just like it is for motion blur and depth of field.

Fixing the noisy may require making Cycles work a bit more like a rasterizer, which is tricky as we are doing pure path tracing and this would be a big change. One possible solution would be supporting an option to use the minimum depth over all samples, which is not quite the same but maybe better. However improving that I consider outside the scope of the bug tracker.

Looked at this together with @Sergey, I committed a change that fixes the gaps at least. However the resulting depth pass is still noisy, just like it is for motion blur and depth of field. Fixing the noisy may require making Cycles work a bit more like a rasterizer, which is tricky as we are doing pure path tracing and this would be a big change. One possible solution would be supporting an option to use the minimum depth over all samples, which is not quite the same but maybe better. However improving that I consider outside the scope of the bug tracker.

This issue was referenced by 719ad4f93f

This issue was referenced by 719ad4f93f83facca909ed2be69900a684ad27d0

This issue was referenced by ca5062071c

This issue was referenced by ca5062071c6fd2db919da776a77f61bff2ad2132
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
10 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#100537
No description provided.