[Bf-blender-cvs] [6391248321e] cycles-x: Fix black Combined pass when using Denoising Data passes

Brecht Van Lommel noreply at git.blender.org
Wed Aug 18 20:35:08 CEST 2021


Commit: 6391248321e2ff98511a945f540b1091b14cd6a5
Author: Brecht Van Lommel
Date:   Wed Aug 18 20:30:06 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB6391248321e2ff98511a945f540b1091b14cd6a5

Fix black Combined pass when using Denoising Data passes

There is a conflict in the new passes code when having an identical Combined
and Noisy Image pass. For now leave out the Noisy Image pass in this case, it's
not obvious the extra memory and disk space usage is worth the convenience.

===================================================================

M	intern/cycles/blender/addon/engine.py
M	intern/cycles/blender/blender_sync.cpp

===================================================================

diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py
index 33b36d09e84..e6839cfd01d 100644
--- a/intern/cycles/blender/addon/engine.py
+++ b/intern/cycles/blender/addon/engine.py
@@ -234,13 +234,13 @@ def list_render_passes(scene, srl):
             yield ("CryptoAsset" + '{:02d}'.format(i), "RGBA", 'COLOR')
 
     # Denoising passes.
-    if (scene.cycles.use_denoising and crl.use_denoising) or crl.denoising_store_passes:
+    if scene.cycles.use_denoising and crl.use_denoising:
         yield ("Noisy Image", "RGBA", 'COLOR')
         if crl.use_pass_shadow_catcher:
             yield ("Noisy Shadow Catcher", "RGBA", 'COLOR')
-        if crl.denoising_store_passes:
-            yield ("Denoising Normal",          "XYZ", 'VECTOR')
-            yield ("Denoising Albedo",          "RGB", 'COLOR')
+    if crl.denoising_store_passes:
+        yield ("Denoising Normal",          "XYZ", 'VECTOR')
+        yield ("Denoising Albedo",          "RGB", 'COLOR')
 
     # Custom AOV passes.
     for aov in srl.aovs:
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index b56cbf67a28..813b6215043 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -665,21 +665,20 @@ void BlenderSync::sync_render_passes(BL::RenderLayer &b_rlay, BL::ViewLayer &b_v
   const bool use_denoising = get_boolean(cscene, "use_denoising") &&
                              get_boolean(crl, "use_denoising");
   const bool store_denoising_passes = get_boolean(crl, "denoising_store_passes");
-  if (use_denoising || store_denoising_passes) {
+  if (use_denoising) {
     b_engine.add_pass("Noisy Image", 4, "RGBA", b_view_layer.name().c_str());
     pass_add(scene, PASS_COMBINED, "Noisy Image", PassMode::NOISY);
-
     if (get_boolean(crl, "use_pass_shadow_catcher")) {
       b_engine.add_pass("Noisy Shadow Catcher", 3, "RGB", b_view_layer.name().c_str());
       pass_add(scene, PASS_SHADOW_CATCHER, "Noisy Shadow Catcher", PassMode::NOISY);
     }
-    if (store_denoising_passes) {
-      b_engine.add_pass("Denoising Normal", 3, "XYZ", b_view_layer.name().c_str());
-      pass_add(scene, PASS_DENOISING_NORMAL, "Denoising Normal", PassMode::NOISY);
+  }
+  if (store_denoising_passes) {
+    b_engine.add_pass("Denoising Normal", 3, "XYZ", b_view_layer.name().c_str());
+    pass_add(scene, PASS_DENOISING_NORMAL, "Denoising Normal", PassMode::NOISY);
 
-      b_engine.add_pass("Denoising Albedo", 3, "RGB", b_view_layer.name().c_str());
-      pass_add(scene, PASS_DENOISING_ALBEDO, "Denoising Albedo", PassMode::NOISY);
-    }
+    b_engine.add_pass("Denoising Albedo", 3, "RGB", b_view_layer.name().c_str());
+    pass_add(scene, PASS_DENOISING_ALBEDO, "Denoising Albedo", PassMode::NOISY);
   }
 
   /* Custom AOV passes. */



More information about the Bf-blender-cvs mailing list