From 75a6d3abf75f3082adf5240ae34973844c0d9a09 Mon Sep 17 00:00:00 2001 From: Sebastian Herhoz Date: Wed, 21 Sep 2022 17:58:34 +0200 Subject: Cycles: add Path Guiding on CPU through Intel OpenPGL This adds path guiding features into Cycles by integrating Intel's Open Path Guiding Library. It can be enabled in the Sampling > Path Guiding panel in the render properties. This feature helps reduce noise in scenes where finding a path to light is difficult for regular path tracing. The current implementation supports guiding directional sampling decisions on surfaces, when the material contains a least one diffuse component, and in volumes with isotropic and anisotropic Henyey-Greenstein phase functions. On surfaces, the guided sampling decision is proportional to the product of the incident radiance and the normal-oriented cosine lobe and in volumes it is proportional to the product of the incident radiance and the phase function. The incident radiance field of a scene is learned and updated during rendering after each per-frame rendering iteration/progression. At the moment, path guiding is only supported by the CPU backend. Support for GPU backends will be added in future versions of OpenPGL. Ref T92571 Differential Revision: https://developer.blender.org/D15286 --- intern/cycles/blender/addon/ui.py | 59 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'intern/cycles/blender/addon/ui.py') diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index ee284dd899a..7036e58f6fb 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -278,6 +278,63 @@ class CYCLES_RENDER_PT_sampling_render_denoise(CyclesButtonsPanel, Panel): col.prop(cscene, "denoising_prefilter", text="Prefilter") +class CYCLES_RENDER_PT_sampling_path_guiding(CyclesButtonsPanel, Panel): + bl_label = "Path Guiding" + bl_parent_id = "CYCLES_RENDER_PT_sampling" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + from . import engine + return use_cpu(context) and engine.with_path_guiding() + + def draw_header(self, context): + scene = context.scene + cscene = scene.cycles + + self.layout.prop(cscene, "use_guiding", text="") + + def draw(self, context): + scene = context.scene + cscene = scene.cycles + + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + layout.active = cscene.use_guiding + + col = layout.column(align=True) + col.prop(cscene, "use_surface_guiding") + col.prop(cscene, "use_volume_guiding") + col.prop(cscene, "guiding_training_samples") + + +class CYCLES_RENDER_PT_sampling_path_guiding_debug(CyclesDebugButtonsPanel, Panel): + bl_label = "Debug" + bl_parent_id = "CYCLES_RENDER_PT_sampling_path_guiding" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + scene = context.scene + cscene = scene.cycles + + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + layout.active = cscene.use_guiding + + layout.prop(cscene, "guiding_distribution_type", text="Distribution Type") + + col = layout.column(align=True) + col.prop(cscene, "surface_guiding_probability") + col.prop(cscene, "volume_guiding_probability") + + col = layout.column(align=True) + col.prop(cscene, "use_deterministic_guiding") + col.prop(cscene, "use_guiding_direct_light") + col.prop(cscene, "use_guiding_mis_weights") + + class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel): bl_label = "Advanced" bl_parent_id = "CYCLES_RENDER_PT_sampling" @@ -2286,6 +2343,8 @@ classes = ( CYCLES_RENDER_PT_sampling_viewport_denoise, CYCLES_RENDER_PT_sampling_render, CYCLES_RENDER_PT_sampling_render_denoise, + CYCLES_RENDER_PT_sampling_path_guiding, + CYCLES_RENDER_PT_sampling_path_guiding_debug, CYCLES_RENDER_PT_sampling_advanced, CYCLES_RENDER_PT_light_paths, CYCLES_RENDER_PT_light_paths_max_bounces, -- cgit v1.2.3