[Bf-cycles] Lightprobe importance sampling

Mike Farnsworth mike.farnsworth at gmail.com
Fri Dec 30 21:43:09 CET 2011


I got a new light type up and going (I had to hack it into
BlenderSync::sync_objects() for now so it would happen after the light
map gets cleared, although I'll find a more explicit/suitable way to
sync the environment light before I post a patch), and have it doing
generic infinite-area light sampling, and just using the
light_distribution texture's vanilla importance.

Adding the additional importance information to light_distribution
seems...not like a good place, though, so I'm experimenting with
putting out a new texture or two (one with the marginal and one with
the conditional CDF values).  I'm running into some difficulty in
extracting the environment texture from the shader graph, though.  I
have the dichotomy of a background shader graph, and an infinite-area
light shader graph, and I need to make the two agree, and have the env
light CDF texture get built based on that.

I was hoping I could actually suck values at a fixed resolution out of
an arbitrary background shader graph, so that it doesn't matter if you
are using an image, the sky shader, or anything else; it'll importance
sample them all.  How do I query the shader graph at arbitrary color
results from vector directions or UVs?

-Farny

On Wed, Dec 28, 2011 at 4:46 AM, Brecht Van Lommel
<brechtvanlommel at pandora.be> wrote:
> Yes, this sounds right, the environment should be added as another
> light type. It can be added to the light_distribution texture,
> initially with just a fixed overall importance, and then in a next
> step split up into smaller pieces with different importance based on
> pixel intensity.
>
> For the background shader evaluation in kernel_path_integrate, MIS can
> be added in a similar way as is done in indirect_emission.


More information about the Bf-cycles mailing list