Portal BSDF: Render Artifacts #121304

Closed
opened 2024-05-01 15:56:26 +02:00 by Rincewind · 6 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.86

Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-04-30 20:02, hash: 02f2d73b78f4
Worked: never

Short description of error
Render Artifacts with Portal BSDF.

Exact steps for others to reproduce the error
If I use Portal BSDF like a mirror (because of Crytomatte and Depth mask) I get such artifacts:
portal artifacts.jpg

If I use a real mirror (via Glossy BSDF) it's fine:
portal artifacts mirror.jpg

nodes.jpg

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.86 **Blender Version** Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-04-30 20:02, hash: `02f2d73b78f4` Worked: never **Short description of error** Render Artifacts with Portal BSDF. **Exact steps for others to reproduce the error** If I use Portal BSDF like a mirror (because of Crytomatte and Depth mask) I get such artifacts: ![portal artifacts.jpg](/attachments/fd916c91-0014-4379-8e92-a757c80afb90) If I use a real mirror (via Glossy BSDF) it's fine: ![portal artifacts mirror.jpg](/attachments/f7c55f71-9984-4084-9d58-908a9c80315f) ![nodes.jpg](/attachments/d5977fe1-ead5-4315-9f04-756abb2275f9)
Rincewind added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2024-05-01 15:56:27 +02:00
Iliya Katushenock added the
Interest
Render & Cycles
label 2024-05-01 15:59:24 +02:00
Member

Do you mean these artifacts (The bright speckles I've drawn around in orange).

Selected artifacts.jpg

If not, then please correct me.


That "artifact" is just noise from the ray tracing process. And increased noise is expected when using the Ray Portal BSDF in this, and quite a few other situations. There are a few factors that contribute to this:

  • The main way Cycles samples lights (Next Event Estimation) does not work through a ray portal. So light "reflecting" off the ray portal object can only be sampled via the less efficient forward path tracing, which greatly increases noise related to that light "reflecting" off the ray portal. This issue plaques the glossy bsdf mirror as well, but there are systems built into Cycles specifcally for reflective and refractive surfaces that try to reduce this noise (the roughness of reflective and refractive materials are increased after a ray has hit a diffuse material, allowing Next Event Esimation to continue off the reflective/refractive surface). This system is enabled by default , but can be turned off. The same sort of technique probably shouldn't be applied to ray portals.
  • With sparse noise (like what appears in this scene), the adaptive sampling system stops sampling too early in many situations, creating blobs.

How do we fix this issue?

  • On the Cycles code side, the adaptive sampling system can be improved to identify these blobs. But this is a complex task and may not work for all scenes.
  • On the Cycles code side, bi-directional path tracing can be implemented to resolve the issues with forward path tracing in this scene. However this is a large task and I do not believe the Cycles developers want to work on it due to it being a bad design for GPUs.
  • If you're rendering with the CPU, you can enable Path guiding, which will help out here. But it also has the chance of causing other issues (Just like the adatpive sampling system, if the noise is too spare, then "blobs" can appear in the path guiding structure which can manifest as blobs in the render)
  • You can turn off adaptive sampling, it will help reduce blobs forming.
  • You can increase the size of the light (This increases the chance that forward path tracing can actually hit it)
  • You can select the ray portal object and turn off it's visibility to everything but the camera. Or use a node setup like this so the camera sees the ray portal, but everything else sees the mirror (which has the system I talked about early to reduce noise)

Ray portal only camera.png

Do you mean these artifacts (The bright speckles I've drawn around in orange). ![Selected artifacts.jpg](/attachments/8b5c832c-63c0-4794-ab10-d535b59c8c48) If not, then please correct me. --- That "artifact" is just noise from the ray tracing process. And increased noise is expected when using the Ray Portal BSDF in this, and quite a few other situations. There are a few factors that contribute to this: - The main way Cycles samples lights (Next Event Estimation) does not work through a ray portal. So light "reflecting" off the ray portal object can only be sampled via the less efficient forward path tracing, which greatly increases noise related to that light "reflecting" off the ray portal. This issue plaques the glossy bsdf mirror as well, but there are systems built into Cycles specifcally for reflective and refractive surfaces that try to reduce this noise (the roughness of reflective and refractive materials are increased after a ray has hit a diffuse material, allowing Next Event Esimation to continue off the reflective/refractive surface). This system is enabled by default , but can be turned off. The same sort of technique probably shouldn't be applied to ray portals. - With sparse noise (like what appears in this scene), the adaptive sampling system stops sampling too early in many situations, creating blobs. How do we fix this issue? - On the Cycles code side, the adaptive sampling system can be improved to identify these blobs. But this is a complex task and may not work for all scenes. - On the Cycles code side, bi-directional path tracing can be implemented to resolve the issues with forward path tracing in this scene. However this is a large task and I do not believe the Cycles developers want to work on it due to it being a bad design for GPUs. - If you're rendering with the CPU, you can enable Path guiding, which will help out here. But it also has the chance of causing other issues (Just like the adatpive sampling system, if the noise is too spare, then "blobs" can appear in the path guiding structure which can manifest as blobs in the render) - You can turn off adaptive sampling, it will help reduce blobs forming. - You can increase the size of the light (This increases the chance that forward path tracing can actually hit it) - You can select the ray portal object and turn off it's visibility to everything but the camera. Or use a node setup like this so the camera sees the ray portal, but everything else sees the mirror (which has the system I talked about early to reduce noise) ![Ray portal only camera.png](/attachments/197a0efc-239e-4857-a93c-a222c92811f4)
Alaska added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-05-02 06:46:45 +02:00
Author

Yes I'm talking about the noise.

I just tried two things:

  1. Reduced the Noise Threshold, what made it even worse:
    image

The noise became one big bright area:
image

  1. Tested your "Is Camera Ray" node setup. That sadly not an option, because I loose here all benefits of the Ray Portal: Depth Pass and Crytomatte behaves than also like with the Glossy BSDF.

"Turn off adaptive sampling" is setting max samples to 0? I already rendering this image with a crazy high sample rate of 5000 and that's a super simple one. I don't think it's feasible to render complex images with a sample rate of 100.000+ ;)

Yes I'm talking about the noise. I just tried two things: 1. Reduced the Noise Threshold, what made it even worse: ![image](/attachments/2d105ce5-1ccd-4264-b7a6-b62b4ab863bc) The noise became one big bright area: ![image](/attachments/aa4674e5-7fa4-4025-92e7-7dbd145313fb) 2. Tested your "Is Camera Ray" node setup. That sadly not an option, because I loose here all benefits of the Ray Portal: Depth Pass and Crytomatte behaves than also like with the Glossy BSDF. "Turn off adaptive sampling" is setting max samples to 0? I already rendering this image with a crazy high sample rate of 5000 and that's a super simple one. I don't think it's feasible to render complex images with a sample rate of 100.000+ ;)
  1. Tested your "Is Camera Ray" node setup. That sadly not an option, because I loose here all benefits of the Ray Portal: Depth Pass and Crytomatte behaves than also like with the Glossy BSDF.

Works on my end. Are you expecting something else?

> 2. Tested your "Is Camera Ray" node setup. That sadly not an option, because I loose here all benefits of the Ray Portal: Depth Pass and Crytomatte behaves than also like with the Glossy BSDF. Works on my end. Are you expecting something else?
Member
  1. Reduced the Noise Threshold, what made it even worse:

The noise became one big bright area.

This is the expected result. The light in your scene is lighting up the ground, then is lighting up the ground again in that specific spot by "bouncing off the ray portal mirror", making a bright patch.

"Turn off adaptive sampling" is setting max samples to 0?

Beside the noise threshold option is a tick box. Changing this tick box to off turns off adaptive sampling.

I already rendering this image with a crazy high sample rate of 5000 and that's a super simple one. I don't think it's feasible to render complex images with a sample rate of 100.000+ ;)

High sample counts are needed to reduce noise, and when something has a low probabilty of happening (like the light being sampled through the ray portal mirror), then more samples are needed than things that have a high probabilty of happening.

> 1. Reduced the Noise Threshold, what made it even worse: > > The noise became one big bright area. This is the expected result. The light in your scene is lighting up the ground, then is lighting up the ground again in that specific spot by "bouncing off the ray portal mirror", making a bright patch. > "Turn off adaptive sampling" is setting max samples to 0? Beside the `noise threshold` option is a tick box. Changing this tick box to off turns off adaptive sampling. > I already rendering this image with a crazy high sample rate of 5000 and that's a super simple one. I don't think it's feasible to render complex images with a sample rate of 100.000+ ;) High sample counts are needed to reduce noise, and when something has a low probabilty of happening (like the light being sampled through the ray portal mirror), then more samples are needed than things that have a high probabilty of happening.
Author
  1. Tested your "Is Camera Ray" node setup. That sadly not an option, because I loose here all benefits of the Ray Portal: Depth Pass and Crytomatte behaves than also like with the Glossy BSDF.

Works on my end. Are you expecting something else?

Not sure what I did wrong before, but now it works as it should. Crytomatte and Depth pass work well with the Glossy Shader Mix Workaround.

Well than, at least for mirrors this is a well working solution.

> > 2. Tested your "Is Camera Ray" node setup. That sadly not an option, because I loose here all benefits of the Ray Portal: Depth Pass and Crytomatte behaves than also like with the Glossy BSDF. > > Works on my end. Are you expecting something else? Not sure what I did wrong before, but now it works as it should. Crytomatte and Depth pass work well with the Glossy Shader Mix Workaround. Well than, at least for mirrors this is a well working solution.
Member

I am closing this issue. The increase in noise in this scene is expected. The blobs forming is a known limitation of the adaptive sampling system. And the issues @Rincewind3D was having with Cryptomatte with an updated node setup have resolved theirself (there was probably a configuration error earlier)

I am closing this issue. The increase in noise in this scene is expected. The blobs forming is a known limitation of the adaptive sampling system. And the issues @Rincewind3D was having with Cryptomatte with an updated node setup have resolved theirself (there was probably a configuration error earlier)
Blender Bot added
Status
Archived
and removed
Status
Needs Information from User
labels 2024-05-02 12:01:05 +02:00
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
3 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#121304
No description provided.