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
path: root/intern
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2015-07-12 18:56:54 +0300
committerThomas Dinges <blender@dingto.org>2015-07-12 18:56:54 +0300
commitd54e77b66dcb8aaf2dc567c1fce900b3b13ce465 (patch)
tree4829d267dcbd859d5fbf304719a556051d2b6832 /intern
parent6ffc988ae3aa57822be89e9580146908c938e0a0 (diff)
Cycles: Expose "Max Bounces" for the world light.
When using MIS, the world is treated as regular light and in this case we can now also limit the maximum amount of bounces, the background light will contribute to the scene. This can improve performance in some cases, where it's e.g. sufficient to only have a contribution on first 1-2 bounces. Examples can be found in the differential. Differential revision: https://developer.blender.org/D1399
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/addon/properties.py6
-rw-r--r--intern/cycles/blender/addon/ui.py1
-rw-r--r--intern/cycles/blender/blender_object.cpp1
3 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 16a807b3af5..87c0f7c154a 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -739,6 +739,12 @@ class CyclesWorldSettings(bpy.types.PropertyGroup):
min=1, max=10000,
default=4,
)
+ cls.max_bounces = IntProperty(
+ name="Max Bounces",
+ description="Maximum number of bounces the background light will contribute to the render",
+ min=0, max=1024,
+ default=1024,
+ )
cls.homogeneous_volume = BoolProperty(
name="Homogeneous Volume",
description="When using volume rendering, assume volume has the same density everywhere"
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index f6ff86ac30e..f7179e2472b 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1040,6 +1040,7 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
sub.prop(cworld, "sample_map_resolution")
if use_branched_path(context):
sub.prop(cworld, "samples")
+ sub.prop(cworld, "max_bounces")
col = split.column()
col.label(text="Volume:")
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 1e17d306fd0..9fa1b35d2ad 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -215,6 +215,7 @@ void BlenderSync::sync_background_light(bool use_portal)
light->map_resolution = get_int(cworld, "sample_map_resolution");
light->shader = scene->default_background;
light->use_mis = sample_as_light;
+ light->max_bounces = get_int(cworld, "max_bounces");
int samples = get_int(cworld, "samples");
if(get_boolean(cscene, "use_square_samples"))