Cycles/Compositor: The denoiser returns a black image if not all requirements are fulfilled #94127

Open
opened 2021-12-15 21:47:50 +01:00 by Raimund Klink · 18 comments
Contributor

System Information
Operating system: Default KVM (Proxmox, Linux)
Graphics card: None

Blender Version
Broken: Blender 3.0
Worked: Before Blender 3.0 the frame was just not denoised

Short description of error
If you enable OIDN/Optix denoising without having the needed CPU flags you will get a black frame back.
The desired outcome would be an aborted render with a helpful error.

Exact steps for others to reproduce the error

  1. Set up a default KVM
  2. Enable denoising
  3. Render over the CLI one Frame
  4. It will be black

Further information
The config of a default KVM:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   40 bits physical, 48 bits virtual
CPU(s):                          6
On-line CPU(s) list:             0-5
Thread(s) per core:              1
Core(s) per socket:              6
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       AuthenticAMD
CPU family:                      15
Model:                           6
Model name:                      Common KVM processor
Stepping:                        1
CPU MHz:                         3399.998
BogoMIPS:                        6799.99
Hypervisor vendor:               KVM
Virtualization type:             full
L1d cache:                       384 KiB
L1i cache:                       384 KiB
L2 cache:                        3 MiB
L3 cache:                        16 MiB
NUMA node0 CPU(s):               0-5
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full AMD retpoline, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm rep_good nopl cpuid extd_apicid tsc_known_freq pni cx16 x2apic hypervisor cmp_legacy 3dnowprefetch vmmcal
                                 l

The command that I used to render one frame:

./blender -b --debug --debug-cycles --python-expr 'import _cycles;print(_cycles.with_openimagedenoise);print(_cycles.with_embree);print(_cycles.with_osl)' "your path to the .blend" -f 1 

oidn_disabled.blend
oidn_disabled.txt
oidn_disabled_0001.png
oidn_enabled.blend
oidn_enabled.txt
oidn_enabled_0001.png
optix_enabled.blend
optix_enabled.txt
optix_enabled_0001.png

If I set up the KVM to use HOST at least OIDN works
HOST config:

Virtualization:                  AMD-V
Hypervisor vendor:               KVM
Virtualization type:             full
L1d cache:                       384 KiB
L1i cache:                       384 KiB
L2 cache:                        3 MiB
L3 cache:                        16 MiB
NUMA node0 CPU(s):               0-5
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full AMD retpoline, IBPB conditional, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx1
                                 6 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core ssbd ibpb vmmcall fsgsbase tsc_adjust bm
                                 i1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr virt_ssbd arat npt nrip_save arch_capabilities

Why it would be nice to have the bug fixed:
We have a renderfarm that consist out of random machines and it is always a problem if random frames are black/not denoised/strange colored/broken/out of order.

**System Information** Operating system: Default KVM (Proxmox, Linux) Graphics card: None **Blender Version** Broken: Blender 3.0 Worked: Before Blender 3.0 the frame was just not denoised **Short description of error** If you enable OIDN/Optix denoising without having the needed CPU flags you will get a black frame back. The desired outcome would be an aborted render with a helpful error. **Exact steps for others to reproduce the error** 1. Set up a default KVM 2. Enable denoising 3. Render over the CLI one Frame 4. It will be black **Further information** The config of a default KVM: ``` Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 40 bits physical, 48 bits virtual CPU(s): 6 On-line CPU(s) list: 0-5 Thread(s) per core: 1 Core(s) per socket: 6 Socket(s): 1 NUMA node(s): 1 Vendor ID: AuthenticAMD CPU family: 15 Model: 6 Model name: Common KVM processor Stepping: 1 CPU MHz: 3399.998 BogoMIPS: 6799.99 Hypervisor vendor: KVM Virtualization type: full L1d cache: 384 KiB L1i cache: 384 KiB L2 cache: 3 MiB L3 cache: 16 MiB NUMA node0 CPU(s): 0-5 Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Spec store bypass: Not affected Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Full AMD retpoline, STIBP disabled, RSB filling Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm rep_good nopl cpuid extd_apicid tsc_known_freq pni cx16 x2apic hypervisor cmp_legacy 3dnowprefetch vmmcal l ``` The command that I used to render one frame: ``` ./blender -b --debug --debug-cycles --python-expr 'import _cycles;print(_cycles.with_openimagedenoise);print(_cycles.with_embree);print(_cycles.with_osl)' "your path to the .blend" -f 1 ``` [oidn_disabled.blend](https://archive.blender.org/developer/F12749974/oidn_disabled.blend) [oidn_disabled.txt](https://archive.blender.org/developer/F12749975/oidn_disabled.txt) ![oidn_disabled_0001.png](https://archive.blender.org/developer/F12749976/oidn_disabled_0001.png) [oidn_enabled.blend](https://archive.blender.org/developer/F12749978/oidn_enabled.blend) [oidn_enabled.txt](https://archive.blender.org/developer/F12749980/oidn_enabled.txt) ![oidn_enabled_0001.png](https://archive.blender.org/developer/F12749981/oidn_enabled_0001.png) [optix_enabled.blend](https://archive.blender.org/developer/F12749984/optix_enabled.blend) [optix_enabled.txt](https://archive.blender.org/developer/F12749985/optix_enabled.txt) ![optix_enabled_0001.png](https://archive.blender.org/developer/F12749986/optix_enabled_0001.png) If I set up the KVM to use HOST at least OIDN works HOST config: ``` Virtualization: AMD-V Hypervisor vendor: KVM Virtualization type: full L1d cache: 384 KiB L1i cache: 384 KiB L2 cache: 3 MiB L3 cache: 16 MiB NUMA node0 CPU(s): 0-5 Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Full AMD retpoline, IBPB conditional, STIBP disabled, RSB filling Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx1 6 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw perfctr_core ssbd ibpb vmmcall fsgsbase tsc_adjust bm i1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr virt_ssbd arat npt nrip_save arch_capabilities ``` **Why it would be nice to have the bug fixed:** We have a renderfarm that consist out of random machines and it is always a problem if random frames are black/not denoised/strange colored/broken/out of order.
Author
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Author
Contributor

Another example:
The black frames are rendered by a default KVM, the normal ones by a HOST KVM
2021-12-15 21_57_04-SheepIt Render Farm.png

Another example: The black frames are rendered by a default KVM, the normal ones by a HOST KVM ![2021-12-15 21_57_04-SheepIt Render Farm.png](https://archive.blender.org/developer/F12750203/2021-12-15_21_57_04-SheepIt_Render_Farm.png)
Member

Added subscriber: @Imaginer

Added subscriber: @Imaginer
Author
Contributor

Sometimes other features seem to break as well:
0511.png
0512.png
0513.png
The broken frame was rendered by a "Common KVM processor"

Sometimes other features seem to break as well: ![0511.png](https://archive.blender.org/developer/F12764420/0511.png) ![0512.png](https://archive.blender.org/developer/F12764422/0512.png) ![0513.png](https://archive.blender.org/developer/F12764424/0513.png) The broken frame was rendered by a "Common KVM processor"
Author
Contributor

Another Blender 2.93 example:
0025.png
0026.png
0027.png

Another Blender 2.93 example: ![0025.png](https://archive.blender.org/developer/F12764436/0025.png) ![0026.png](https://archive.blender.org/developer/F12764440/0026.png) ![0027.png](https://archive.blender.org/developer/F12764437/0027.png)
Member

Added subscribers: @Sergey, @brecht, @lichtwerk

Added subscribers: @Sergey, @brecht, @lichtwerk
Member

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

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

#76668, #94333 could be related.

@Sergey, @brecht: I am unable to test this, is this something to be expected?

#76668, #94333 could be related. @Sergey, @brecht: I am unable to test this, is this something to be expected?
Member

#93838 (Denoise on Image sequence fails ( results in a blank,transparent image) after first frame) smells the same as well

#93838 (Denoise on Image sequence fails ( results in a blank,transparent image) after first frame) smells the same as well
Author
Contributor

In #94127#1295825, @lichtwerk wrote:
#93838 (Denoise on Image sequence fails ( results in a blank,transparent image) after first frame) smells the same as well

Maybe, but we can identify that better after he attaches his system-info.

> In #94127#1295825, @lichtwerk wrote: > #93838 (Denoise on Image sequence fails ( results in a blank,transparent image) after first frame) smells the same as well Maybe, but we can identify that better after he attaches his system-info.

This issue was referenced by 430f71fce2

This issue was referenced by 430f71fce289e876602178330ac725c46c043abf

Proposed fix for the Cycles part is at D13944. Note that SSE 4.1 is required for OIDN, so the patch will effectively make render fail on the configuration where SSE 4.1 support is not detected.

Not sure what is the best way to tackle Compositor node.

For the extra features which are not working reliably (mentioned in #94127#1275555) think is better to submit a separate report with a demo .blend file.

Proposed fix for the Cycles part is at [D13944](https://archive.blender.org/developer/D13944). Note that SSE 4.1 is required for OIDN, so the patch will effectively make render fail on the configuration where SSE 4.1 support is not detected. Not sure what is the best way to tackle Compositor node. For the extra features which are not working reliably (mentioned in #94127#1275555) think is better to submit a separate report with a demo .blend file.
Author
Contributor

For the extra features which are not working reliably (mentioned in #94127#1275555) think is better to submit a separate report with a demo .blend file.

I would do that if I still had the .blend. But I only have the screenshots. Sorry about that :/
But I think that mainly the denoise broke, but I can not verify that.

Thank you for fixing this <3

>For the extra features which are not working reliably (mentioned in #94127#1275555) think is better to submit a separate report with a demo .blend file. I would do that if I still had the .blend. But I only have the screenshots. Sorry about that :/ But I think that mainly the denoise broke, but I can not verify that. Thank you for fixing this <3
Author
Contributor

@Sergey You wrote:

This change makes it so that if OIDN is not supported on the current
CPU Cycles will report an error and stop rendering. This behavior is
similar to when an OptiX denoiser is requested and there is no OptiX
compatible device available.

But in my tests I also got a black frame from Optix denoising.
Are you sure about the behaviour or did I make a mistake?

@Sergey You wrote: >This change makes it so that if OIDN is not supported on the current >CPU Cycles will report an error and stop rendering. **This behavior is >similar to when an OptiX denoiser is requested and there is no OptiX >compatible device available.** But in my tests I also got a black frame from Optix denoising. Are you sure about the behaviour or did I make a mistake?

@Raimund58 What a great question! In my initial implementation that what would've happened. What I didn't realize is that this change has been made 0ab1b19de4.

@Raimund58 What a great question! In my initial implementation that what would've happened. What I didn't realize is that this change has been made 0ab1b19de4.

@Raimund58 The complicated part is that we kind of want .blend files to be easily shareable between artists in a way that they can render them without running into errors, and this is an opposite of what one'd want for the render farms and studios. Additionally, making such changes without any notification to artists is not good either.

Had a quick discussion with Brecht. The idea is to make it so that warnings will be generated in the interface when requested settings are overwritten and look into adding warnings-as-error type of a toggle for Cycles (with a goal to avoid CPU time waste on the farms, and possibly covering more than just denoiser/device fallback).

Anyway, this is something which is being discussed.

@Raimund58 The complicated part is that we kind of want .blend files to be easily shareable between artists in a way that they can render them without running into errors, and this is an opposite of what one'd want for the render farms and studios. Additionally, making such changes without any notification to artists is not good either. Had a quick discussion with Brecht. The idea is to make it so that warnings will be generated in the interface when requested settings are overwritten and look into adding warnings-as-error type of a toggle for Cycles (with a goal to avoid CPU time waste on the farms, and possibly covering more than just denoiser/device fallback). Anyway, this is something which is being discussed.
Author
Contributor

I am looking forward for good solutions/compromises.
You guys are usually quite good in finding those :)

I am looking forward for good solutions/compromises. You guys are usually quite good in finding those :)
Author
Contributor

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

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:02:51 +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
5 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#94127
No description provided.