[Bf-cycles] Lightprobe importance sampling

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Jul 15 05:40:37 CEST 2014

The background is added as a light when MIS is enabled. So just like point
or area lights, it's in the list of lights that will we be used for direct
light sampling. So we are in fact taking light samples, look for

The unusual thing that we do is that we don't take BSDF samples
specifically for a light, but rather take advantage of the BSDF sample that
we are already taking for indirect light bounces.

BSDF samples for the background are handled in indirect_background, and
light samples for the background in direct_emission.

On Jul 15, 2014 3:50 AM, "jumpjump88" <jumpjump88 at hotmail.com> wrote:
> Hi Brecht and Mike,
> I am having trouble understanding this part:
> "It is not needed that for every Light sample ray, there is a matching
> BSDF sample ray, all that is needed is that the pdf's match. Avoiding
> that extra BSDF sample and instead doing it using the BSDF sample that
> is already done for the next path vertex gives a nice speedup."
> I learned MIS from PBRT, and as Mike said, PBRT takes one sample generated
> from Light and one sample generated from BSDF, and then use power
> to weight their contribution. My understanding is, for MIS to work, there
> needs to have probabilities to sample from both light and BSDF. But if we
> are only generating samples from BSDF, how will the light samples weigh
> To be more specific, I am looking at the code in function
> indirect_background(KernelGlobals *kg, Ray *ray, int path_flag, float
> bsdf_pdf, int bounce), before calling indirect_background, the ray
> is already determined by importance sampling the BSDF, it seems that there
> is no chance to generate a ray direction by importance sampling the
> background as a light source. Could you please point out what I am
> Thanks a lot,
> Zhanpeng
> --
> View this message in context:
> Sent from the Bf-cycles mailing list archive at Nabble.com.
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20140715/27a82359/attachment.htm 

More information about the Bf-cycles mailing list