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

Stefan Werner stewreo at gmail.com
Tue Jun 5 09:38:00 CEST 2018


Note that there will not be a way of reliably estimating the emission for all light sources. With procedural shaders, users can create light sources with infinite energy, singularities and other tricks that make calculating the total emission hard if not impossible. 

-Stefan

> On 2. Jun 2018, at 14:07, Brecht Van Lommel <brechtvanlommel at gmail.com> wrote:
> 
> Great to see an initial working implementation already!
> 
> Regarding how Cycles represents energy for lights, it's defined by shader nodes which make it a bit tricky. To start I suggest using light->shader->is_constant_emission(&constant_emission) to get a constant emission value if it exists.
> 
> In general lights can have textures, and we can imagine some ways to estimate average emission by averaging a few samples, or analyzing the shader node tree. But I wouldn't worry about that case for now.
> 
> On Fri, Jun 1, 2018 at 10:41 PM, Erik Englesson <erikenglesson at gmail.com <mailto:erikenglesson at gmail.com>> wrote:
> Hi all,
> 
> This week I had my final exam so now I can focus on the project full-time the entire summer! Looking forward to it.
>  
> My project consists of two code parts: the light BVH construction and the traversal code to sample a light. Our idea is to do this iteratively by first creating a simple BVH construction and traversal code and then extend this more and more. 
> 
> This week I have been working on the following:
> A simple implementation of the light BVH that is based on the PBRT book 
> The splitting method to divide a node into two children is the simplest possible right now. It is not using orientations or SAH.
> Method to convert the light BVH data representation on the host to a data structure that can be used in the kernel
> The data structure of the BVH for the kernel is also the simplest possible right now. It is essentially a single array of structures only that the structure is represented as 4xfloat4.
> Kernel code to traverse the light BVH to chose a light
> This code calculates the probability of going down the left and right child as described in the paper and then randomly picks one and continues the process until a leaf node(think light) is found.
> That is, I have a bare-bones implementation of the full pipeline now. It is very much work in progress and there are several things that can be improved upon. I pushed all of this to my local branch here <https://developer.blender.org/rB2e17c3f3a10bb2f6a62b1e8d5d236c437f7ae4e8>.
> 
> Plan for next week
> 
> The main focus of next week will be on implementing the splitting method for the light BVH construction that is described in the paper. If I have the time I also want to have a look at some smaller details:
> 
> 1. Traversal code: Figure out a better way to rescale/stretch a random number so I can reuse it
> 2. Traversal code: Talk to the authors of the paper about the "uncertainty angle"
> 3. Each node should have a member that represents the "energy" of all lights inside it. I need to figure out how Cycles represents energy(strength?) for each light and set this member correctly.
> 4. Get a better understanding/overview of the kernel code e.g. the kernel_path_surface.h file. 
> 
> Unfortunately, I do not have any images to show you guys this week. Maybe next week!
> 
> Have a great weekend!
> 
> Thanks,
> Erik
> 
> 
> 
> 
> -- 
> Soc-2018-dev mailing list
> Soc-2018-dev at blender.org <mailto:Soc-2018-dev at blender.org>
> https://lists.blender.org/mailman/listinfo/soc-2018-dev <https://lists.blender.org/mailman/listinfo/soc-2018-dev>
> 
> 
> -- 
> Soc-2018-dev mailing list
> Soc-2018-dev at blender.org
> https://lists.blender.org/mailman/listinfo/soc-2018-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/soc-2018-dev/attachments/20180605/66804292/attachment.html>


More information about the Soc-2018-dev mailing list