## Clarifications on NEE/MIS

Practical and theoretical implementation discussion.
toomuchvoltage
Posts: 3
Joined: Mon Nov 18, 2019 8:57 am

### Clarifications on NEE/MIS

Hello ompf2!

Apologies in advance if this seems like opening an old topic but I'm trying to get clarification on a few items w.r.t NEE+MIS that have been bothering me for a long time:
• On page 152 of: [url]https://jbikker.github.io/literature/Ray%20Tracing%20in%20Real-time%20Games%20-%202012.pdf[/url] it is mentioned that the implementation does include MIS. However, I can't see the MIS weight being computed. Is this just a slight mistake?
• On page 50 of: [url]http://www.cs.uu.nl/docs/vakken/magr/portfolio/INFOMAGR/lecture8.pdf[/url] I can see how explicit luminare samples are weighted down using MIS weights computed from both solid angle light and BSDF pdfs. If I'm not mistaken, it's basically identical to slide 29+30 from Jaroslav Krivanek's https://slideplayer.com/slide/10434073/ . However a question remains: even with MIS applied as it is in the code... are random BSDF hits ignored, even then? Could we possibly weigh down the BSDF path with MIS computed from ωi ( ωi being the BSDF direction with which the last bounce hits the luminaire) and add it to all the explicit lighting contributions? Wouldn't that effectively sum up to an unbiased+low variance addition of both images on slide 31 of [url]https://slideplayer.com/slide/10434073/[/url] ?
• I see the words 'technique' and 'strategy' thrown around loosely in literature regarding this topic a lot which I find quite frustrating. Especially PBRT's chapter 14.3 basically treats different approaches to sampling luminaries as strategies while almost every other literature considers 'BSDF sampling' and 'light source sampling' as individual strategies... much like chapter 9 of Veach's thesis. Am I rightfully confused in this case?
• Regarding PBRT's Chapter 14.3, I'm guessing their 'strategies' are NEE parallels to multi-sample and one-sample models in some fashion (as expressed in Veach's thesis Ch. 9)? Am I wrongfully conflating the two?
• And finally the lights * 1 / N that appears on slide 38 of [url]http://www.cs.uu.nl/docs/vakken/magr/portfolio/INFOMAGR/lecture8.pdf[/url] I assume signifies the UniformSampleOneLight(...) 'strategy' of PBRT for sampling 1 luminare per vertex except in this case with N samples from luminare.
Your potential clarifications are highly appreciated.

jbikker
Posts: 222
Joined: Mon Nov 28, 2011 8:18 am
Contact:

### Re: Clarifications on NEE/MIS

Page 152 of my thesis: you are correct, MIS is not computed in that code.
Page 50 of lecture 8: this is just the handling of NEE. Doing MIS like that also requires MIS for implicit light paths. You may take a look at the path tracing kernels of Lighthouse 2, which implements this.

- Jacco.

toomuchvoltage
Posts: 3
Joined: Mon Nov 18, 2019 8:57 am

### Re: Clarifications on NEE/MIS

Thank you Dr. Bikker.

The code cleared up everything. It actually came down to almost exactly what I thought was needed.

Cheers!
Baktash

toomuchvoltage
Posts: 3
Joined: Mon Nov 18, 2019 8:57 am

### Re: Clarifications on NEE/MIS

Hi Dr. Bikker,

Wanted to add one more thing. I think I've a spotted a bug:

in https://github.com/jbikker/lighthouse2/blob/master/lib/rendercore_optix7/kernels/pathtracer.h:

Code: Select all

if ((bsdfPdf + lightPdf * pickProb) > 0) contribution = throughput * shadingData.color * (1.0f / (bsdfPdf + lightPdf * pickProb));

is immediately overwritten by a weighted BSDF contribution that does not take into account light picking probability:

Code: Select all

contribution = throughput * shadingData.color * (1.0f / (bsdfPdf + lightPdf));

I have a feeling you didn't intend this?

Cheers,
Baktash.

jbikker
Posts: 222
Joined: Mon Nov 28, 2011 8:18 am
Contact:

### Re: Clarifications on NEE/MIS

Good find, you're right!
I have removed the erroneous line now.