blender/intern/cycles
Lukas Stockner 5505ba8d47 Cycles/Eevee: Implement disk and ellipse shapes for area lamps
The implementation is pretty straightforward.

In Cycles, sampling the shapes is currently done w.r.t. area instead of solid angle.

There is a paper on solid angle sampling for disks [1], but the described algorithm is based on
simply sampling the enclosing square and rejecting samples outside of the disk, which is not exactly
great for Cycles' RNG (we'd need to setup a LCG for the repeated sampling) and for GPU divergence.

Even worse, the algorithm is only defined for disks. For ellipses, the basic idea still works, but a
way to analytically calculate the solid angle is required. This is technically possible [2], but the
calculation is extremely complex and still requires a lookup table for the Heuman Lambda function.

Therefore, I've decided to not implement that for now, we could still look into it later on.

In Eevee, the code uses the existing ltc_evaluate_disk to implement the lighting calculations.

[1]: "Solid Angle Sampling of Disk and Cylinder Lights"
[2]: "Analytical solution for the solid angle subtended at any point by an ellipse via a point source radiation vector potential"

Reviewers: sergey, brecht, fclem

Differential Revision: https://developer.blender.org/D3171
2018-05-24 16:43:47 +02:00
..
app Merge branch 'master' into blender2.8 2018-03-16 04:35:37 +01:00
blender Cycles/Eevee: Implement disk and ellipse shapes for area lamps 2018-05-24 16:43:47 +02:00
bvh msvc: Use source folder structure for project file. 2018-02-03 16:38:27 -07:00
cmake Fix Cycle standalone build. 2018-03-02 19:56:22 +01:00
device Merge branch 'master' into blender2.8 2018-05-02 12:46:14 +02:00
doc Cycles: relicense GNU GPL source code to Apache version 2.0. 2013-08-18 14:16:15 +00:00
graph Code refactor: make Transform always affine, dropping last row. 2018-03-10 04:54:05 +01:00
kernel Cycles/Eevee: Implement disk and ellipse shapes for area lamps 2018-05-24 16:43:47 +02:00
render Cycles/Eevee: Implement disk and ellipse shapes for area lamps 2018-05-24 16:43:47 +02:00
subd msvc: Use source folder structure for project file. 2018-02-03 16:38:27 -07:00
test Fix Cycles gtests build on macOS. 2017-10-24 17:52:20 +02:00
util Cycles/Eevee: Implement disk and ellipse shapes for area lamps 2018-05-24 16:43:47 +02:00
CMakeLists.txt Build: fixes for the Intel compiler versions 2016, 2017, 2018. 2018-04-02 16:39:04 +02:00