Page MenuHome

Cycles: Improved equiangular sampling.
Needs ReviewPublic

Authored by Stefan Werner (swerner) on Wed, Oct 16, 10:49 AM.

Details

Summary

For area lights that emit light only in one direction, equiangular
sampling will now not sample any positions on the back side
of the light.

For spot lights, the ray will first be intersected with the spot
light's cone and clipped to the illumnated section.

The previous approximation as point lights would very often select
points with no contribution whatsoever, leading to excessive noise.

Diff Detail

Repository
rB Blender
Branch
cycles_improved_equiangular_sampling
Build Status
Buildable 5394
Build 5394: arc lint + arc unit

Event Timeline

Come to think of it, it should be possible to apply the same ray clipping to distance sampling as well.

Code deduplication.

Jeroen Bakker (jbakker) added inline comments.
intern/cycles/kernel/kernel_light.h
1154

typo

intern/cycles/util/util_math_intersect.h
259

typo

The idea sounds great!

The spot_light test seems less noisy in the light cone itself, but more noisy on the background where light hits the backdrop plane. Is it something you would expect from the new method?

From the render result is hard to say, does the new method converge to the same result? Worth adding .blend file which was used for comparison.

intern/cycles/kernel/kernel_volume.h
328

These two cases seems speciously almost the same as in kernel_volume_equiangular_sample(). Is there a way to de-duplicate?

It doesn't work quite right yet with spot lights with a non-zero radius. That said, I'm not happy with the way spot lights behave in Cycles in general, but that will be another patch.