Denoise artifacts with Direct Glossy #52802

Closed
opened 2017-09-17 20:42:53 +02:00 by Michael Rochefort · 23 comments

System Information
CentOS 7.4.1708
VMWare VM
GNOME 3.22
i7-6850K (8 Threads)
8GB RAM

Blender Version
Broken: 2.79 5bd8ac9abf

Description
When using the denoiser 'Direct Glossy' can cause artifacting. The intensity of the artifact may or may not be influenced (slightly) by SSS.

demo.png

Exact steps for others to reproduce the error
Create and apply glossy material to object.
Add light(s)
Enable denoiser (with direct glossy)
Render

Based on a (as simple as possible) attached .blend file with minimum amount of steps. Test with and without Direct Glossy. Uses default denoiser settings. If you disable both SSS on the Principled shader and the point light, the artifact shrinks.

denoise_glossy.blend

**System Information** CentOS 7.4.1708 VMWare VM GNOME 3.22 i7-6850K (8 Threads) 8GB RAM **Blender Version** Broken: 2.79 5bd8ac9abfa **Description** When using the denoiser 'Direct Glossy' can cause artifacting. The intensity of the artifact may or may not be influenced (slightly) by SSS. ![demo.png](https://archive.blender.org/developer/F807935/demo.png) **Exact steps for others to reproduce the error** Create and apply glossy material to object. Add light(s) Enable denoiser (with direct glossy) Render Based on a (as simple as possible) attached .blend file with minimum amount of steps. Test with and without Direct Glossy. Uses default denoiser settings. If you disable both SSS on the Principled shader and the point light, the artifact shrinks. [denoise_glossy.blend](https://archive.blender.org/developer/F807906/denoise_glossy.blend)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @MikeRochefort

Added subscriber: @MikeRochefort

#53450 was marked as duplicate of this issue

#53450 was marked as duplicate of this issue

Added subscriber: @sebastian_k

Added subscriber: @sebastian_k

Yeah, I am currently suffering from the same problem. I think it's mainly a problem with the very bright intensities of glossy reflections. At least in my case it doesn't need any SSS to produce the issue, just a rather reflective surface. I am facing this problem mostly with metals in scenes with bright lamps. I think the denoiser somehow tries compensate for the brightness differences between the glossy reflection and the much darker surrounding areas, and by overcompensating that brightness differences it makes the problematic areas black. Or something like that. No idea how to solve that but maybe as a workaround the denoiser could just keep the super bright highlights just white?
Here's the above file but without SSS and point lamp, but with a metal surface, still producing a black artefact. denoise_glossy_v2.blend

Yeah, I am currently suffering from the same problem. I think it's mainly a problem with the very bright intensities of glossy reflections. At least in my case it doesn't need any SSS to produce the issue, just a rather reflective surface. I am facing this problem mostly with metals in scenes with bright lamps. I think the denoiser somehow tries compensate for the brightness differences between the glossy reflection and the much darker surrounding areas, and by overcompensating that brightness differences it makes the problematic areas black. Or something like that. No idea how to solve that but maybe as a workaround the denoiser could just keep the super bright highlights just white? Here's the above file but without SSS and point lamp, but with a metal surface, still producing a black artefact. [denoise_glossy_v2.blend](https://archive.blender.org/developer/F809664/denoise_glossy_v2.blend)
Lukas Stockner was assigned by Sebastian Koenig 2017-09-18 10:38:09 +02:00

Added subscriber: @brecht

Added subscriber: @brecht

Perhaps the denoising should work on log(glossy) or some other kind of remapping to bring the extreme values into a smaller range.

Perhaps the denoising should work on log(glossy) or some other kind of remapping to bring the extreme values into a smaller range.

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Changing priority to Normal, until @LukasStockner confirms that this is a bug.

Changing priority to Normal, until @LukasStockner confirms that this is a bug.
Member

In #52802#460544, @brecht wrote:
Perhaps the denoising should work on log(glossy) or some other kind of remapping to bring the extreme values into a smaller range.

I've just tried that, and while it works decently (I used no mapping between 0..1 and log(x)+1 above 1, since just using log(x) causes problems in really dark areas) it's really biased to do the regression in the remapped range and can make noisy images noticeably darker. In this case, the highlight ends up in the 1.7 range even though the original pixels are >40.
I guess making the NLM filter more robust to not overblur the highlight would be the better option here.

Generally, I don't really like any solutions that aren't exposure-invariant, mainly because they feel like a cheap band-aid fix instead of a proper solution...

But yeah, I would consider this a bug since highlights aren't that uncommon.

> In #52802#460544, @brecht wrote: > Perhaps the denoising should work on log(glossy) or some other kind of remapping to bring the extreme values into a smaller range. I've just tried that, and while it works decently (I used no mapping between 0..1 and log(x)+1 above 1, since just using log(x) causes problems in really dark areas) it's really biased to do the regression in the remapped range and can make noisy images noticeably darker. In this case, the highlight ends up in the 1.7 range even though the original pixels are >40. I guess making the NLM filter more robust to not overblur the highlight would be the better option here. Generally, I don't really like any solutions that aren't exposure-invariant, mainly because they feel like a cheap band-aid fix instead of a proper solution... But yeah, I would consider this a bug since highlights aren't that uncommon.

Added subscribers: @2474379411, @VukGardasevic

Added subscribers: @2474379411, @VukGardasevic

Added subscriber: @robobeg

Added subscriber: @robobeg

I also encountered this problem and found a remedy.

The black artifacts are actually negative results of denoise computation clamped to zero, which almost always appear near fireflies of glossy reflections.
I marked the glossy pass ( + the scatter pass ) as 'noisy' and the other passes ( + the emission and the backgroud pass ) as 'clean', and modified the code to denoise the 'noisy' part and the 'clean' part separately and add the results. I managed to denoise both parts at a single denoise stage since they share the feature data (and the computation for feature extraction and transform too). The artifacts still showed up but became less annoying because they now revealed the pixel values of the (denoised) 'clean' part, not empty black pixels.

Increasing # of samples let the fireflies ( and the black artifacts ) disappear eventually, but it required lots of computation time. Changing the denoising computation from float to double did not affect the artifacts so it is not likely a precision problem.

I also encountered this problem and found a remedy. The black artifacts are actually negative results of denoise computation clamped to zero, which almost always appear near fireflies of glossy reflections. I marked the glossy pass ( + the scatter pass ) as 'noisy' and the other passes ( + the emission and the backgroud pass ) as 'clean', and modified the code to denoise the 'noisy' part and the 'clean' part separately and add the results. I managed to denoise both parts at a single denoise stage since they share the feature data (and the computation for feature extraction and transform too). The artifacts still showed up but became less annoying because they now revealed the pixel values of the (denoised) 'clean' part, not empty black pixels. Increasing # of samples let the fireflies ( and the black artifacts ) disappear eventually, but it required lots of computation time. Changing the denoising computation from float to double did not affect the artifacts so it is not likely a precision problem.

Added subscriber: @Eranekao

Added subscriber: @Eranekao

Added subscriber: @Pandorave

Added subscriber: @Pandorave

Hello everybody,

I just stumbled into this myself and I noticed that increasing the "Clamp Direct" value helps reduce the artefact. Here an image (I used the same file uploaded here in discussion, the only value changed is Clamp Direct)

I'm not a developer but hope this helps you guys

clamp-and-denoiser.jpg

Hello everybody, I just stumbled into this myself and I noticed that increasing the "Clamp Direct" value helps reduce the artefact. Here an image (I used the same file uploaded here in discussion, the only value changed is Clamp Direct) I'm not a developer but hope this helps you guys ![clamp-and-denoiser.jpg](https://archive.blender.org/developer/F3896859/clamp-and-denoiser.jpg)

Added subscriber: @Calandro

Added subscriber: @Calandro

This comment was removed by @Calandro

*This comment was removed by @Calandro*

Added subscriber: @AngeloTartanian

Added subscriber: @AngeloTartanian
Lukas Stockner was unassigned by Dalai Felinto 2019-12-23 16:36:32 +01:00

Added subscriber: @LukasStockner

Added subscriber: @LukasStockner

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-01-08 18:22:48 +01:00

Appears to be resolved now.

Appears to be resolved now.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
13 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#52802
No description provided.