<p>When shading a point on an opaque surface, you need to gather incoming light and weight it with the bidirectional reflectance distribution function (BRDF) of the material.</p>

<p>The naive approach is to distribute samples equally over the hemisphere and probe all directions equally for incoming light. This is called <strong>uniform sampling</strong> (Fig. 1). While this works in most cases, it can take a long time to converge towards the correct result.</p>

<p><a href="https://i.sstatic.net/sG2z5.jpg" rel="noreferrer"><img src="https://i.sstatic.net/sG2z5.jpg" alt="Uniform sampling on the hemisphere"></a><br>
<strong>Figure 1:</strong> Uniform sampling on the hemisphere</p>

<p>To speed things up, let's consider the properties of the surface in question. A diffuse surface needs to take light from all directions on the hemisphere into account, where light coming from flat angles has less influence. A perfect mirror only needs a single direction according to the law of reflection. <strong>Importance sampling</strong> takes this into account and distributes samples where light is expected to have a greater influence, judging from the BRDF. For the diffuse surface, a cosine sampling would be used (Fig. 2), resulting in fewer samples at flat angles that presumably have a lower influence. For the perfect mirror, only a single ray is shot because all other directions have zero influence anyway.</p>

<p><a href="https://i.sstatic.net/uJksp.jpg" rel="noreferrer"><img src="https://i.sstatic.net/uJksp.jpg" alt="Cosine sampling on the hemisphere"></a><br>
<strong>Figure 2:</strong> Cosine sampling on the hemisphere</p>

<p>Now, the BRDF is not the only thing that can be taken into account. When you have known light sources with strong intensity, it is often desirable to direct more rays towards these light sources, as these directions presumably have a greater impact on the result (i.e. there is more light coming from these directions). The idea to combine various different importance sampling strategies into one is called <strong>multiple importance sampling</strong>. This technique is not limited to the given example of BRDF + known lights, but can be used with any kind of sensible heuristic you can come up with.</p>

<p>Images were generated using Holger Dammertz' <a href="http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html" rel="noreferrer">Hammersley Points on the Hemisphere</a>.</p>

CC BY-SA 3.0
2015-10-28T10:12:19.223Z
2015-10-28T13:37:44.837Z
2015-10-28T13:37:44.837Z
David Kuri
<p>I can't understand math equations. I'm a graphic designer.</p>

<ul>
<li><p>What is "importance sampling"?</p></li>
<li><p>What is "multiple importance sampling"?</p></li>
</ul>

<p>Could you explain easily, using illustrations and no math equations? What is the difference between "importance sampling" and "multiple importance sampling"?</p>

<raytracing><sampling><importance-sampling>
What is the difference between importance sampling and mutiple importance sampling?
kangsume
# What is the difference between importance sampling and mutiple importance sampling?

(Asked by: username_0 on 2015-10-28)

I can't understand math equations. I'm a graphic designer.

* What is "importance sampling"?
* What is "multiple importance sampling"?

Could you explain easily, using illustrations and no math equations? What is the difference between "importance sampling" and "multiple importance sampling"?

**Tags:** raytracing, sampling, importance-sampling


---

## 1 answers

### Answer by username_1 on 2015-10-28. Score: 12

When shading a point on an opaque surface, you need to gather incoming light and weight it with the bidirectional reflectance distribution function (BRDF) of the material.

The naive approach is to distribute samples equally over the hemisphere and probe all directions equally for incoming light. This is called **uniform sampling** (Fig. 1). While this works in most cases, it can take a long time to converge towards the correct result.

[![Uniform sampling on the hemisphere](https://i.sstatic.net/sG2z5.jpg)](https://i.sstatic.net/sG2z5.jpg)  
**Figure 1:** Uniform sampling on the hemisphere

To speed things up, let's consider the properties of the surface in question. A diffuse surface needs to take light from all directions on the hemisphere into account, where light coming from flat angles has less influence. A perfect mirror only needs a single direction according to the law of reflection. **Importance sampling** takes this into account and distributes samples where light is expected to have a greater influence, judging from the BRDF. For the diffuse surface, a cosine sampling would be used (Fig. 2), resulting in fewer samples at flat angles that presumably have a lower influence. For the perfect mirror, only a single ray is shot because all other directions have zero influence anyway.

[![Cosine sampling on the hemisphere](https://i.sstatic.net/uJksp.jpg)](https://i.sstatic.net/uJksp.jpg)  
**Figure 2:** Cosine sampling on the hemisphere

Now, the BRDF is not the only thing that can be taken into account. When you have known light sources with strong intensity, it is often desirable to direct more rays towards these light sources, as these directions presumably have a greater impact on the result (i.e. there is more light coming from these directions). The idea to combine various different importance sampling strategies into one is called **multiple importance sampling**. This technique is not limited to the given example of BRDF + known lights, but can be used with any kind of sensible heuristic you can come up with.

Images were generated using Holger Dammertz' [Hammersley Points on the Hemisphere](http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html).


---

