From 366262bef5426fa98e75c96a1562dd16001fba26 Mon Sep 17 00:00:00 2001 From: William Leeson Date: Tue, 26 Oct 2021 08:30:15 +0200 Subject: Distance Scrambling for for Cycles X - Sobol version Cycles:Distance Scrambling for Cycles Sobol Sampler This option implements micro jittering an is based on the INRIA research paper [[ https://hal.inria.fr/hal-01325702/document | on micro jittering ]] and work by Lukas Stockner for implementing the scrambling distance. It works by controlling the correlation between pixels by either using a user supplied value or an adaptive algorithm to limit the maximum deviation of the sample values between pixels. This is a follow up of https://developer.blender.org/D12316 The PMJ version can be found here: https://developer.blender.org/D12511 Reviewed By: leesonw Differential Revision: https://developer.blender.org/D12318 --- intern/cycles/blender/addon/properties.py | 18 ++++++++++++++++++ intern/cycles/blender/addon/ui.py | 7 +++++++ 2 files changed, 25 insertions(+) (limited to 'intern/cycles/blender/addon') diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 0f92238015d..e5853529d1c 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -342,6 +342,24 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): default='PROGRESSIVE_MUTI_JITTER', ) + scrambling_distance: FloatProperty( + name="Scrambling Distance", + default=1.0, + min=0.0, max=1.0, + description="Lower values give faster rendering with GPU rendering and less noise with all devices at the cost of possible artifacts if set too low", + ) + preview_scrambling_distance: BoolProperty( + name="Scrambling Distance viewport", + default=False, + description="Uses the Scrambling Distance value for the viewport. Faster but may flicker", + ) + + adaptive_scrambling_distance: BoolProperty( + name="Adaptive Scrambling Distance", + default=False, + description="Uses a formula to adapt the scrambling distance strength based on the sample count", + ) + use_layer_samples: EnumProperty( name="Layer Samples", description="How to use per view layer sample settings", diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index facf1b08676..47907481b03 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -289,6 +289,13 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel): col = layout.column(align=True) col.active = not(cscene.use_adaptive_sampling) col.prop(cscene, "sampling_pattern", text="Pattern") + col = layout.column(align=True) + col.active = cscene.sampling_pattern == 'SOBOL' and not cscene.use_adaptive_sampling + col.prop(cscene, "scrambling_distance", text="Scrambling Distance Strength") + col.prop(cscene, "adaptive_scrambling_distance", text="Adaptive Scrambling Distance") + col = layout.column(align=True) + col.active = ((cscene.scrambling_distance < 1.0) or cscene.adaptive_scrambling_distance) and cscene.sampling_pattern == 'SOBOL' and not cscene.use_adaptive_sampling + col.prop(cscene, "preview_scrambling_distance", text="Viewport Scrambling Distance") layout.separator() -- cgit v1.2.3