[Soc-2018-dev] Weekly Report #07 - Many Light Sampling

Erik Englesson erikenglesson at gmail.com
Fri Jun 29 18:03:17 CEST 2018


Hi all,

Here is my report for the week:

*This week* I have been working on adding support for background lights
when using the light tree. Before this week, we had a certain fixed
probability of choosing either to sample the distant lights or the light
tree(background lights not supported).

Now, a decision is made either to sample one of the three light groups: the
light tree, the distant lights or the background. After a group has been
chosen, the corresponding group sampling method is used. Deciding which
light group to sample is done by sampling a CDF that is based on the energy
of all the lights within each group. The tree is using the energy of the
root node, which is the aggregate energy of all the lights in the tree. The
distant and background lights uses an energy based on an approximation of
how much of their emitted energy hits the scene(as PBRT does).

I also found and fixed some bugs. One bug was an indexing bug between
indices to the scene->lights array and the dscene->lights array. These
started to differ as soon as lights were disabled since only enabled lights
are sent to the device.

The work done this week can be found in this commit
<https://developer.blender.org/rB2cdb08f4ffb3d7d24935d82ba32b1b1100ee2cd6>.

*Next week* I want to start on the first iteration of the traversal
splitting method. One of the things I find unclear right now is the
following in bold from the slide on page 20
<https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxja3VsbGF8Z3g6NWM0NmU2YWVlNjE3ODk1Yw>
:

"Approximate solid angle of the cluster times BSDF peak
• BSDF peak is computed as follows:
1. Sample a random direction from the BSDF
2. Compute a conservative maximum cosine with the vector to the
cluster’s center
3. *Evaluate a simple GGX model with the BSDF roughness*"

I have a limited understanding of microfacet theory and I have not read
about the GGX model. I will have to look into this. Learning new things all
the time!

If there is time, after having implemented a first pass of the splitting
method, I would like to see if I could do another iteration on the distant
light sampling. It would be nice for the choice between different distant
lights to depend on energy and maybe direction(the light_distant_sample()
function in kernel_light.h).

Have a great weekend!

Thanks,
Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/soc-2018-dev/attachments/20180629/f54ef3e7/attachment.html>


More information about the Soc-2018-dev mailing list