diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-04-05 19:17:45 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-04-05 19:17:45 +0400 |
commit | 6e93e3329427390c35fb93b2c5add8a639671bb6 (patch) | |
tree | 47785308f6b8341d8cc81e351045180d96f447a1 /intern/cycles/blender | |
parent | 5d0bfc032530018ba20bb13cee5970695753e80b (diff) |
Cycles: add rejection of inf/nan samples, in principle these should not happen
but this makes it more reliable for now.
Also add an integrator "Clamp" option, to clamp very light samples to a maximum
value. This will reduce accuracy but may help reducing noise and speed up
convergence.
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 7 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 1 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index da4de1aeafd..d20507427b4 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -174,6 +174,13 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): default=0, ) + cls.sample_clamp = FloatProperty( + name="Clamp", + description="If non-zero, the maximum value for a sample, higher values will be scaled down to avoid too much noise and slow convergence at the cost of accuracy.", + min=0.0, max=1e8, + default=0.0, + ) + cls.debug_tile_size = IntProperty( name="Tile Size", description="", diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index f22e298f52d..47aba845ba3 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -67,6 +67,7 @@ class CyclesRender_PT_integrator(CyclesButtonsPanel, Panel): sub.prop(cscene, "samples", text="Render") sub.prop(cscene, "preview_samples", text="Preview") sub.prop(cscene, "seed") + sub.prop(cscene, "sample_clamp") sub = col.column(align=True) sub.label("Transparency:") diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index e88f74eea68..066e5b776b8 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -157,6 +157,8 @@ void BlenderSync::sync_integrator() integrator->layer_flag = render_layer.layer; + integrator->sample_clamp = get_float(cscene, "sample_clamp"); + if(integrator->modified(previntegrator)) integrator->tag_update(scene); } |