[Bf-blender-cvs] [5fea147d466] cycles_path_guiding: Cycles-X: Path Guiding: (Internal) Renaming of the ui parameters (adding use_ prefix)

Sebastian Herholz noreply at git.blender.org
Thu Jul 28 09:33:57 CEST 2022


Commit: 5fea147d466065e78b9e89577e83ce6840033aac
Author: Sebastian Herholz
Date:   Mon Jul 25 11:58:46 2022 +0200
Branches: cycles_path_guiding
https://developer.blender.org/rB5fea147d466065e78b9e89577e83ce6840033aac

Cycles-X: Path Guiding: (Internal) Renaming of the ui parameters (adding use_ prefix)

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

M	intern/cycles/blender/addon/properties.py
M	intern/cycles/blender/addon/ui.py
M	intern/cycles/blender/sync.cpp
M	intern/cycles/integrator/path_trace.cpp
M	intern/cycles/integrator/path_trace_work_cpu.cpp
M	intern/cycles/kernel/integrator/intersect_closest.h
M	intern/cycles/kernel/integrator/shade_background.h
M	intern/cycles/kernel/integrator/shade_light.h
M	intern/cycles/kernel/integrator/shade_shadow.h
M	intern/cycles/kernel/integrator/shade_surface.h
M	intern/cycles/kernel/integrator/shade_volume.h
M	intern/cycles/kernel/integrator/shader_eval.h
M	intern/cycles/kernel/integrator/subsurface_disk.h
M	intern/cycles/kernel/integrator/subsurface_random_walk.h
M	intern/cycles/kernel/types.h
M	intern/cycles/scene/integrator.cpp
M	intern/cycles/scene/integrator.h

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

diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 321b3cda6f9..82c8546ea3c 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -512,9 +512,11 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
         default=1.0,
     )
 
-    guiding: BoolProperty(
+    use_guiding: BoolProperty(
         name="Guiding",
-        description="Use path guiding for sampling paths",
+        description="Use path guiding for sampling paths. Path guiding incrementally "
+        "learns the light distribution of the scene and guides path into directions "
+        "with high indirect/direct light contributions.",
         default=False,
     )
 
@@ -525,33 +527,33 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
         default='PAVMM',
     )
 
-    surface_guiding: BoolProperty(
+    use_surface_guiding: BoolProperty(
         name="Surface Guiding",
         description="Use guiding when sampling directions on a surface",
         default=True,
     )
 
     surface_guiding_probability: FloatProperty(
-        name="Surface Guiding Prob.",
+        name="Surface Guiding Probability",
         description="The probability of guiding a direction on a surface",
         min=0.0, max=1.0,
         default=0.5,
     )
 
-    volume_guiding: BoolProperty(
+    use_volume_guiding: BoolProperty(
         name="Volume Guiding",
         description="Use guiding when sampling directions inside a volume",
         default=True,
     )
 
     volume_guiding_probability: FloatProperty(
-        name="Volume Guiding Prob.",
+        name="Volume Guiding Probability",
         description="The probability of guiding a direction inside a volume",
         min=0.0, max=1.0,
         default=0.5,
     )
 
-    guide_direct_light: BoolProperty(
+    use_guide_direct_light: BoolProperty(
         name="Guide Direct Light",
         description="Consider the contribution of directly visible light sources during guiding",
         default=True,
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 21d474c280d..f8071ce4c60 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -471,7 +471,7 @@ class CYCLES_RENDER_PT_light_paths_guiding(CyclesButtonsPanel, Panel):
         scene = context.scene
         cscene = scene.cycles
 
-        self.layout.prop(cscene, "guiding", text="")
+        self.layout.prop(cscene, "use_guiding", text="")
 
     def draw(self, context):
         scene = context.scene
@@ -482,18 +482,18 @@ class CYCLES_RENDER_PT_light_paths_guiding(CyclesButtonsPanel, Panel):
         layout = self.layout
         layout.use_property_split = True
         layout.use_property_decorate = False
-        layout.active = cscene.guiding
+        layout.active = cscene.use_guiding
 
         col = layout.column(align=True)
         if experimentalView:
             col.prop(cscene, "guiding_distribution_type", text="Distribution Type")
-        col.prop(cscene, "surface_guiding", text="Surface Guiding")
+        col.prop(cscene, "use_surface_guiding", text="Surface Guiding")
         if experimentalView:
             col.prop(cscene, "surface_guiding_probability", text="Surface Guiding Probability")
-        col.prop(cscene, "volume_guiding", text="Volume Guiding")
+        col.prop(cscene, "use_volume_guiding", text="Volume Guiding")
         if experimentalView:
             col.prop(cscene, "volume_guiding_probability", text="Volume Guiding Probability")
-            col.prop(cscene, "guide_direct_light", text="Guide Direct Light")
+            col.prop(cscene, "use_guide_direct_light", text="Guide Direct Light")
             col.prop(cscene, "use_mis_weights", text="Use MIS Weights")
 
 
diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp
index c81d205c6e4..3194094cb70 100644
--- a/intern/cycles/blender/sync.cpp
+++ b/intern/cycles/blender/sync.cpp
@@ -413,12 +413,12 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
 #endif
 
 #ifdef __PATH_GUIDING__
-  integrator->set_guiding(get_boolean(cscene, "guiding"));
-  integrator->set_surface_guiding(get_boolean(cscene, "surface_guiding"));
+  integrator->set_use_guiding(get_boolean(cscene, "use_guiding"));
+  integrator->set_use_surface_guiding(get_boolean(cscene, "use_surface_guiding"));
   integrator->set_surface_guiding_probability(get_float(cscene, "surface_guiding_probability"));
-  integrator->set_volume_guiding(get_boolean(cscene, "volume_guiding"));
+  integrator->set_use_volume_guiding(get_boolean(cscene, "use_volume_guiding"));
   integrator->set_volume_guiding_probability(get_float(cscene, "volume_guiding_probability"));
-  integrator->set_guide_direct_light(get_boolean(cscene, "guide_direct_light"));
+  integrator->set_use_guide_direct_light(get_boolean(cscene, "use_guide_direct_light"));
   integrator->set_use_mis_weights(get_boolean(cscene, "use_mis_weights"));
   GuidingDistributionType guiding_distribution_type = (GuidingDistributionType)get_enum(
       cscene, "guiding_distribution_type", GUIDING_NUM_TYPES, GUIDING_TYPE_PAVMM);
diff --git a/intern/cycles/integrator/path_trace.cpp b/intern/cycles/integrator/path_trace.cpp
index bcf098e0456..40aa106ab83 100644
--- a/intern/cycles/integrator/path_trace.cpp
+++ b/intern/cycles/integrator/path_trace.cpp
@@ -176,7 +176,7 @@ void PathTrace::render_pipeline(RenderWork render_work)
 #ifdef __PATH_GUIDING__
   /* Prepare all per-thread guiding structures before we start with the
    * next rendering iteration/progression. */
-  const bool use_guiding = device_scene_->data.integrator.guiding;
+  const bool use_guiding = device_scene_->data.integrator.use_guiding;
   if (use_guiding) {
     guiding_prepare_structures();
   }
diff --git a/intern/cycles/integrator/path_trace_work_cpu.cpp b/intern/cycles/integrator/path_trace_work_cpu.cpp
index 1b21dcd0ffd..e79f26c4e07 100644
--- a/intern/cycles/integrator/path_trace_work_cpu.cpp
+++ b/intern/cycles/integrator/path_trace_work_cpu.cpp
@@ -180,7 +180,7 @@ void PathTraceWorkCPU::render_samples_full_pipeline(KernelGlobalsCPU *kg,
     }
 
 #ifdef __PATH_GUIDING__
-    const bool use_guiding = kernel_data.integrator.guiding;
+    const bool use_guiding = kernel_data.integrator.use_guiding;
     if (use_guiding) {
       /* Clear path segment storage. */
       guiding_prepare_integrator_state(kg, state);
@@ -377,10 +377,10 @@ void PathTraceWorkCPU::guiding_push_sample_data_to_global_storage(
 #    endif
 #    if PATH_GUIDING_LEVEL >= 2
   /* Converting the path segment representation of the random walk into radiance samples. */
-  const bool guide_direct_light = kernel_data.integrator.guide_direct_light;
+  const bool use_guide_direct_light = kernel_data.integrator.use_guide_direct_light;
   const bool use_mis_weights = kernel_data.integrator.use_mis_weights;
   state->guiding.path_segment_storage->PrepareSamples(
-      false, nullptr, use_mis_weights, guide_direct_light, false);
+      false, nullptr, use_mis_weights, use_guide_direct_light, false);
 #    endif
 
 #    if defined(PATH_GUIDING_DEBUG_VALIDATE) && PATH_GUIDING_LEVEL >= 5
diff --git a/intern/cycles/kernel/integrator/intersect_closest.h b/intern/cycles/kernel/integrator/intersect_closest.h
index c3441636ae9..0369e9f275c 100644
--- a/intern/cycles/kernel/integrator/intersect_closest.h
+++ b/intern/cycles/kernel/integrator/intersect_closest.h
@@ -51,7 +51,7 @@ ccl_device_forceinline bool integrator_intersect_terminate(KernelGlobals kg,
   const float continuation_probability = path_state_continuation_probability(kg, state, path_flag);
   INTEGRATOR_STATE_WRITE(state, path, continuation_probability) = continuation_probability;
 #if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 1
-  if (kernel_data.integrator.guiding) {
+  if (kernel_data.integrator.use_guiding) {
     guiding_set_continuation_probability(state, continuation_probability);
   }
 #endif
@@ -223,7 +223,7 @@ ccl_device_forceinline void integrator_intersect_next_kernel(
     /* Hit a surface, continue with light or surface kernel. */
     if (isect->type & PRIMITIVE_LAMP) {
 #if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 1
-      if (kernel_data.integrator.guiding) {
+      if (kernel_data.integrator.use_guiding) {
         guiding_new_virtual_light_segment(state, isect);
       }
 #endif
diff --git a/intern/cycles/kernel/integrator/shade_background.h b/intern/cycles/kernel/integrator/shade_background.h
index f496d9aad5a..bf50e117ef6 100644
--- a/intern/cycles/kernel/integrator/shade_background.h
+++ b/intern/cycles/kernel/integrator/shade_background.h
@@ -73,7 +73,7 @@ ccl_device float3 integrator_eval_background_shader(KernelGlobals kg,
 #  endif
 
 #  if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 1
-  if (kernel_data.integrator.guiding) {
+  if (kernel_data.integrator.use_guiding) {
     guiding_add_background(state, L, mis_weight);
   }
 #  endif
diff --git a/intern/cycles/kernel/integrator/shade_light.h b/intern/cycles/kernel/integrator/shade_light.h
index 9f76125a6dd..dfee59df9b7 100644
--- a/intern/cycles/kernel/integrator/shade_light.h
+++ b/intern/cycles/kernel/integrator/shade_light.h
@@ -76,7 +76,7 @@ ccl_device_inline void integrate_light(KernelGlobals kg,
     mis_weight = light_sample_mis_weight_forward(kg, mis_ray_pdf, ls.pdf);
   }
 #if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 1
-  if (kernel_data.integrator.guiding) {
+  if (kernel_data.integrator.use_guiding) {
     guiding_add_direct_contribution(state, light_eval, mis_weight);
   }
 #endif
diff --git a/intern/cycles/kernel/integrator/shade_shadow.h b/intern/cycles/kernel/integrator/shade_shadow.h
index da22e4d7c11..322660aaa9e 100644
--- a/intern/cycles/kernel/integrator/shade_shadow.h
+++ b/intern/cycles/kernel/integrator/shade_shadow.h
@@ -99,7 +99,7 @@ ccl_device_inline bool integrate_transparent_shadow(KernelGlobals kg,
   /* Accumulate shadow for transparent surfaces. */
   const uint num_recorded_hits = min(num_hits, INTEGRATOR_SHADOW_ISECT_SIZE);
 #  if defined(__PATH_GUIDING__)
-  const bool use_guiding = kernel_data.integrator.guiding;
+  const bool use_

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list