Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/blender/addon')
-rw-r--r--intern/cycles/blender/addon/properties.py18
-rw-r--r--intern/cycles/blender/addon/ui.py8
-rw-r--r--intern/cycles/blender/addon/version_update.py13
3 files changed, 26 insertions, 13 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 8dbd80f3747..4484dcfbfd7 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -128,6 +128,12 @@ enum_volume_interpolation = (
('CUBIC', "Cubic", "Smoothed high quality interpolation, but slower")
)
+enum_world_mis = (
+ ('NONE', "None", "Don't sample the background, faster but might cause noise for non-solid backgrounds"),
+ ('AUTOMATIC', "Auto", "Automatically try to determine the best setting"),
+ ('MANUAL', "Manual", "Manually set the resolution of the sampling map, higher values are slower and require more memory but reduce noise")
+ )
+
enum_device_type = (
('CPU', "CPU", "CPU", 0),
('CUDA', "CUDA", "CUDA", 1),
@@ -938,15 +944,15 @@ class CyclesWorldSettings(bpy.types.PropertyGroup):
description="Cycles world settings",
type=cls,
)
- cls.sample_as_light = BoolProperty(
- name="Multiple Importance Sample",
- description="Use multiple importance sampling for the environment, "
- "enabling for non-solid colors is recommended",
- default=True,
+ cls.sampling_method = EnumProperty(
+ name="Sampling method",
+ description="How to sample the background light",
+ items=enum_world_mis,
+ default='AUTOMATIC',
)
cls.sample_map_resolution = IntProperty(
name="Map Resolution",
- description="Importance map size is resolution x resolution; "
+ description="Importance map size is resolution x resolution/2; "
"higher values potentially produce less noise, at the cost of memory and speed",
min=4, max=8192,
default=1024,
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 707f8756f6f..2b11a2eefb0 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1214,11 +1214,13 @@ class CYCLES_WORLD_PT_settings(CyclesButtonsPanel, Panel):
col = split.column()
col.label(text="Surface:")
- col.prop(cworld, "sample_as_light", text="Multiple Importance")
+ col.prop(cworld, "sampling_method", text="Sampling")
sub = col.column(align=True)
- sub.active = cworld.sample_as_light
- sub.prop(cworld, "sample_map_resolution")
+ sub.active = cworld.sampling_method != 'NONE'
+ subsub = sub.row(align=True)
+ subsub.active = cworld.sampling_method == 'MANUAL'
+ subsub.prop(cworld, "sample_map_resolution")
if use_branched_path(context):
subsub = sub.row(align=True)
subsub.active = use_sample_all_lights(context)
diff --git a/intern/cycles/blender/addon/version_update.py b/intern/cycles/blender/addon/version_update.py
index 292f0a1fa90..dc28bc647b5 100644
--- a/intern/cycles/blender/addon/version_update.py
+++ b/intern/cycles/blender/addon/version_update.py
@@ -377,10 +377,6 @@ def do_versions(self):
for world in bpy.data.worlds:
cworld = world.cycles
- # World MIS
- if not cworld.is_property_set("sample_as_light"):
- cworld.sample_as_light = False
-
# World MIS Samples
if not cworld.is_property_set("samples"):
cworld.samples = 4
@@ -431,3 +427,12 @@ def do_versions(self):
if bpy.data.version <= (2, 79, 3):
# Switch to squared roughness convention
square_roughness_nodes_insert()
+
+ for world in bpy.data.worlds:
+ cworld = world.cycles
+ # World MIS
+ if not cworld.is_property_set("sampling_method"):
+ if cworld.get("sample_as_light", False):
+ cworld.sampling_method = 'MANUAL'
+ else:
+ cworld.sampling_method = 'NONE'