Here, I will talk about my understanding of Multiple Importance Sampling as well as Next Event Estimation and BRDF Sampling. Plus, I will interpret the results of the render of Veach MIS Scene.
What I think MIS is?
MIS effectively combines different Importane Sampling (IS) techniques by weighting each technique based on their PDFs (Probability Distribution Function) for each ray sample.
That way, the overall variance is aimed to be reduced.
The motivation behind MIS is that if an IS technique achieves the highest PDF at some area (or for some samples), its radiance contribution will dominate others in that area.
If, for instance, some IS technique is better at Specular Reflections, it will mostly determine the radiance at those regions.
In this example, I combined BRDF and Next Event Estimation (NEE) sampling techniques and I only enabled the Direct Illumination.
Some observations on the final result
The below is the rendering of the Veah MIS scene by my renderer.
In the scene, there are four rectangular sheets with increasing roughness as we go down.
The first thing that caught my attention in this render was that the colorful lights did not seem to hit some regions in the top rectangular sheet.
For instance, look at the area between the reflection of red and blue area lights (on the top sheet), there is no much visible red or blue reflection at those parts.
How come it can happen? Doesn't the red or blue light hit that part of the surface?
Actually, the lights *do* hit the surface, but the funny thing is that most of the rays cannot reach the camera because the surface is very specular or not-rough (i.e. it *almost* acts like a mirror).
In other words, the rays I sent from the camera hits that part of the surface undergoes a mirror reflection and misses the light source. However,
the mirror reflections of the rays I sent to entirely red or entirely blue regions can reach the light sources.
Although this explanation does not exactly reflect the implementation, this is an easy way to understand the phenomenon.
On the contrary, as you can see in the bottommost surface, there is some reflection in the middle regions. This time the surface is rougher and reflects diffusely more.
Therefore, the rays I sent have more chance of hitting the light source.
What about NEE and BRDF Sampling?
Then, let's investigate the weighted contribution of BRDF and Next Event Estimation one by one.
Weighted Contribution of BRDF:
Weighted Contribution of NEE:
The areas where each sampling techniques' contribution is close to zero are the place where that technique creates high variance.
Therefore, the other technique which introduces lower variance can compensate for it. That, simply, is the gist of the MIS.
Both BRDF and NEE have some strengths and weaknesses. The MIS is, in a sense, a way to combine the strengths (though Salesin and Jarosz
suggest that MIS can also combine the weaknesses by taking the worst convergence rate of each IS technique ).
Let's begin with the NEE Sampling Technique. In NEE, at least one shadow ray is sent to each light source. Assume we send only one ray.
If the ray hits another surface before the light source, then that place will be shadowed and not receive light from that light source
(though it can still receive light from other light sources, potentially creating penumbra).
If the ray directly hits the light source,
the radiance contribution of that light source on that surface will be calculated using the BRDF function based on the ray sample and the surface material characteristics.
To exemplify, if the surface is specular and the sample ray aligns with the reflected ray direction, the pixel will receive lots of radiance from the light source.
The potential cause of the phenomenon I explained earlier (paragraph under the final image) was that the surface was specular but the light was not in the reflection direction.
Let's scrutinize the reasons why the weighted contribution of NEE is high or low at some parts. If you compare NEE and BRDF contributions,
you will notice that NEE's contributions are lower for bigger area light sources. The reason probably is that we send 1 shadow ray to each light source and it is not
enough to capture a big light source. In addition, the PDF function of NEE is inversely proportional to the area of the light source. Since the weight is related to
the PDF functions, NEE seems to have less weight at those regions. The NEE can illuminate most of the scene and has high contribution throughout. Because
it can send direct rays to the light source, it can most of the time have at least some radiance contributions from the sources.
Then, we shall move on to the BRDF Sampling. In the BRDF Sampling, the ray samples are generated based on a function that
chooses rays close to specular or diffuse direction with some probability. Unlike NEE, it does not guarantee that the ray is generated toward the light sources. Therefore, a lot of the time
the rays do not hit the light source. This is why you are seeing tiny contribution from it throughout the scene. It creates a high variance in most of the
regions which is later compensated by NEE. Nevertheless, it can capture the reflections of the big area light sources and especially on specular surfaces.
The reason probably is that BRDF Sampling considers the material (i.e. BRDF) of the surface during ray sample generation. However, the NEE's
sample generation process does not take it into account.
Therefore, BRDF Sampling Technique can generate *smarter* rays to capture specular reflections with smaller effort.
I have attempted to express my understanding of these topics to you. I had to omit some details for the sake of brevity.
You can send me an e-mail if something is unclear or you have detected an error.