Go to file
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
build_files UI: Global "Status-bar" Area (WIP) 2018-05-23 22:38:25 +02:00
doc Collections and groups unification 2018-05-18 13:34:24 +02:00
extern Removing Blender Game Engine from Blender 2.8 2018-04-17 17:51:28 +02:00
intern Cycles/Eevee: Implement disk and ellipse shapes for area lamps 2018-05-24 16:43:47 +02:00
release Cycles/Eevee: Implement disk and ellipse shapes for area lamps 2018-05-24 16:43:47 +02:00
source Cycles/Eevee: Implement disk and ellipse shapes for area lamps 2018-05-24 16:43:47 +02:00
tests Cycles/Eevee tests: add compare.html to see difference between the engines. 2018-05-18 18:08:01 +02:00
.arcconfig Arc: Use proper lacding branch 2018-04-24 12:26:37 +02:00
.gitignore Build: add scripts to build dependencies for Windows and macOS. 2017-08-07 17:46:06 +02:00
.gitmodules Fix git submodules branch configuration 2018-04-23 12:55:04 +02:00
CMakeLists.txt Merge branch 'master' into blender2.8 2018-05-18 15:31:53 +02:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile Merge remote-tracking branch 'origin/master' into blender2.8 2018-04-25 09:31:25 +02:00
make.bat Merge branch 'master' into blender2.8 2017-12-12 13:55:09 +11:00