Cycles: Add optional probabilistic termination of light samples based on their expect...
authorLukas Stockner <lukas.stockner@freenet.de>
Sat, 29 Oct 2016 21:47:30 +0000 (23:47 +0200)
committerLukas Stockner <lukas.stockner@freenet.de>
Sun, 30 Oct 2016 10:31:28 +0000 (11:31 +0100)
commit26bf230920cb9ca0aa9626430169967f9e120482
tree266e7e0939a6471db8af7086635cc4e914c85b06
parentce785868a56a1446750f5af1779f7623ca462ec2
Cycles: Add optional probabilistic termination of light samples based on their expected contribution

In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways.
To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased.
This is the same approach that's also used in path termination based on length.

Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise.

Reviewers: #cycles

Subscribers: sergey, brecht

Differential Revision: https://developer.blender.org/D2217
15 files changed:
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_sync.cpp
intern/cycles/kernel/kernel_accumulate.h
intern/cycles/kernel/kernel_emission.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_path_surface.h
intern/cycles/kernel/kernel_path_volume.h
intern/cycles/kernel/kernel_random.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/split/kernel_direct_lighting.h
intern/cycles/render/integrator.cpp
intern/cycles/render/integrator.h
intern/cycles/util/util_math.h