Optix denoising is not working everywhere. #78571

Open
opened 2020-07-03 11:35:26 +02:00 by Colin Marmond · 15 comments
Member

System Information
Operating system:
Linux : 5.6.0-0.bpo.2-amd64 #1 SMP Debian 5.6.14-2~bpo10+1 (2020-06-09) x86_64 GNU/Linux
Nvidia : Driver Version: 440.82 CUDA Version: 10.2
CPU :AMD Athlon 2 with 8Gio RAM
GPU: Nvidia Gtx 750 2Gio VRAM

Blender Version
Broken: 2.90 dev master

Short description of error
The Nvidia optix denoising does not work on the entire frame. It just makes a circle denoised; the rest is denoised strangely. This results in a not efficient render.
bug.png

Exact steps for others to reproduce the error
Open Blender 2.90 master with startup config. In settings, change to device Optix, then in the scene, go into Cycles). Replace the cube by a plane. Add a material to the plane with 0.2 Roughness. Then remove the light and put the camera near the plane. Then, put the samples to 2 for render and view-port. Activate denoising with optix, and start a render preview in the view-port.
bug.blend

**System Information** Operating system: Linux : 5.6.0-0.bpo.2-amd64 #1 SMP Debian 5.6.14-2~bpo10+1 (2020-06-09) x86_64 GNU/Linux Nvidia : Driver Version: 440.82 CUDA Version: 10.2 CPU :AMD Athlon 2 with 8Gio RAM GPU: Nvidia Gtx 750 2Gio VRAM **Blender Version** Broken: 2.90 dev master **Short description of error** The Nvidia optix denoising does not work on the entire frame. It just makes a circle denoised; the rest is denoised strangely. This results in a not efficient render. ![bug.png](https://archive.blender.org/developer/F8661304/bug.png) **Exact steps for others to reproduce the error** Open Blender 2.90 master with startup config. In settings, change to device Optix, then in the scene, go into Cycles). Replace the cube by a plane. Add a material to the plane with 0.2 Roughness. Then remove the light and put the camera near the plane. Then, put the samples to 2 for render and view-port. Activate denoising with optix, and start a render preview in the view-port. [bug.blend](https://archive.blender.org/developer/F8661302/bug.blend)
Author
Member

Added subscriber: @Kdaf

Added subscriber: @Kdaf
Contributor

Added subscriber: @Gilberto.R

Added subscriber: @Gilberto.R
Contributor

Setting rendering device to Optix is for RTX cards only, Didn't it warn you in the preferences "no compatible gpus found"? yours is GTX, which doesn't fully support it, only the the Optix Denoiser. For using the optix denoiser, go to the preferences you should have your rendering device as CUDA. Ok. Now put cycles as the render engine and set Optix denoiser under the Properties Editor->Denoising->Viewport. turn on the checkbox and change it in the dropdown from open image denoise to Optix Denoise.

Setting rendering device to Optix is for RTX cards only, Didn't it warn you in the preferences "no compatible gpus found"? yours is GTX, which doesn't fully support it, only the the Optix Denoiser. For using the optix denoiser, go to the preferences you should have your rendering device as CUDA. Ok. Now put cycles as the render engine and set Optix denoiser under the Properties Editor->Denoising->Viewport. turn on the checkbox and change it in the dropdown from open image denoise to Optix Denoise.
Author
Member

The same problem comes with CUDA activated in the settings (not optix) and the Optix denoising enabled. I always have this weird circle of delimitation between two area, one is denoised and the other one is not denoised. You can see the result (CUDA in the settings with the optix denoising enabled) : Screenshot_20200704_085233.png

The same problem comes with CUDA activated in the settings (not optix) and the Optix denoising enabled. I always have this weird circle of delimitation between two area, one is denoised and the other one is not denoised. You can see the result (CUDA in the settings with the optix denoising enabled) : ![Screenshot_20200704_085233.png](https://archive.blender.org/developer/F8663158/Screenshot_20200704_085233.png)
Author
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Added subscriber: @volto

Added subscriber: @volto

Annotazione 2020-07-07 113648.png hi 2060 super user here i rendered the scene on my gpu and it looks like it isn't working but if you look closely the closer the plane goes to the camera the less noise it has; that's because the optix denoising it's trying to do his best with only 2 samples it can't do much

![Annotazione 2020-07-07 113648.png](https://archive.blender.org/developer/F8675160/Annotazione_2020-07-07_113648.png) hi 2060 super user here i rendered the scene on my gpu and it looks like it isn't working but if you look closely the closer the plane goes to the camera the less noise it has; that's because the optix denoising it's trying to do his best with only 2 samples it can't do much

here i added a lamp to make it look more obvious Annotazione 2020-07-07 115100.png

here i added a lamp to make it look more obvious ![Annotazione 2020-07-07 115100.png](https://archive.blender.org/developer/F8675178/Annotazione_2020-07-07_115100.png)
Member

Added subscribers: @LukasStockner, @pmoursnv

Added subscribers: @LukasStockner, @pmoursnv
Member

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Member

This isn't an issue with the OptiX denoiser, but the denoising passes generated by Cycles (which are passed on to the OptiX denoiser, but are incorrect, so the OptiX denoiser cannot produce correct results):

Noisy Denoising Albedo Denoising Normal
noisy.png noisy-albedo.png noisy-normal.png
The problem occurs when the material uses both low roughness and base color values, which could indicate an issue with how denoising data is handled with specular closures. I'm guessing that since denoising data updates for specular-like closures in kernel_update_denoising_features are deferred to the next bounce, but in this case the next bounce likely hits the background, it's never updated. @LukasStockner is more familiar with this code I think, maybe he could chime in?
This isn't an issue with the OptiX denoiser, but the denoising passes generated by Cycles (which are passed on to the OptiX denoiser, but are incorrect, so the OptiX denoiser cannot produce correct results): | Noisy | Denoising Albedo | Denoising Normal | | -- | -- | -- | | ![noisy.png](https://archive.blender.org/developer/F8678180/noisy.png) | ![noisy-albedo.png](https://archive.blender.org/developer/F8678182/noisy-albedo.png) | ![noisy-normal.png](https://archive.blender.org/developer/F8678186/noisy-normal.png) | The problem occurs when the material uses both low roughness and base color values, which could indicate an issue with how denoising data is handled with specular closures. I'm guessing that since denoising data updates for specular-like closures in `kernel_update_denoising_features` are deferred to the next bounce, but in this case the next bounce likely hits the background, it's never updated. @LukasStockner is more familiar with this code I think, maybe he could chime in?
Member

I guess the problem here is the heuristic used to determine where along the path to record the normal. Due to the Fresnel effect, the relative weights of the diffuse and specular parts change with viewing angle, so at shallow angles the code treats the surface as specular.

This is a known limitation, but I have no idea how to avoid it - we need to set the threshold somewhere. One approach would be to blend it or jitter the threshold, but that results in noisy normal/albedo passes. That causes problems with the NLM denoiser, maybe if Optix/OIDN is more robust to noisy feature passes we could enable it for them.

I guess the problem here is the heuristic used to determine where along the path to record the normal. Due to the Fresnel effect, the relative weights of the diffuse and specular parts change with viewing angle, so at shallow angles the code treats the surface as specular. This is a known limitation, but I have no idea how to avoid it - we need to set the threshold somewhere. One approach would be to blend it or jitter the threshold, but that results in noisy normal/albedo passes. That causes problems with the NLM denoiser, maybe if Optix/OIDN is more robust to noisy feature passes we could enable it for them.
Member

AFAIK both OptiX/OIDN need noise-free normal/albedo passes too (I know for sure for OptiX). In this case the best solution I can think of is to use the OptiX denoiser with only the color pass as input (so to not confuse it with that albedo/normal data). That's currently only possible to select for final renders though (in the render layer properties), not for viewport denoising (which always uses color+albedo).

AFAIK both OptiX/OIDN need noise-free normal/albedo passes too (I know for sure for OptiX). In this case the best solution I can think of is to use the OptiX denoiser with only the color pass as input (so to not confuse it with that albedo/normal data). That's currently only possible to select for final renders though (in the render layer properties), not for viewport denoising (which always uses color+albedo).

Added subscriber: @franMarz

Added subscriber: @franMarz

Added subscriber: @YAFU

Added subscriber: @YAFU
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:02:03 +01: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
7 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#78571
No description provided.