<p>The correct PDF for an area light is indeed $1/A$. The reason why you see the area term at the top is because you are importance sampling the light, meaning you need to divide by its PDF. This is a Monte Carlo estimator with one sample. Shirley simplifies this by simply writing $1/(1/A) = A$.</p>

<p>I am not sure how he got the $1 / \frac{\|V_1 \times V_2\|}{2}$.</p>

CC BY-SA 4.0
2018-08-21T21:39:40.963Z
Ok and what about discarding this PDF factor in actual calculations? Since as I said neither Shirley's book nor CGPP show this factor in their pseudocode listings.
gallickgunner
CC BY-SA 4.0
2018-08-22T03:29:33.413Z
You cannot discard it if you are doing Monte Carlo integration.
Hubble
CC BY-SA 4.0
2018-08-21T18:09:52.720Z
2018-08-21T18:09:52.720Z
Hubble
<p>So I was reading up on how to sample Rectangular Area lights, and the procedure is pretty straightforward. That is, I can get random points using the equation.</p>

<p><span class="math-container">$ p = X_o + \epsilon_1V_1 + \epsilon_2V_2$</span></p>

<p>Where <span class="math-container">$X_o$</span> is my corner point for the rectangle and <span class="math-container">$V_1$</span> and <span class="math-container">$V_2$</span> are the 2 vectors spanning it And the epsilons are the uniform random numbers.</p>

<p>The thing is almost every where I go, they talk about how the PDF of this sampling is <span class="math-container">$1/A$</span> (constant) with the exception of 1 place discussed below, and that when calculating the radiance coming from this area light when sampled by this way we should thus multiply the whole thing by the Area of the rectangle. </p>

<p>However when I check their algorithms, they leave out this Area factor.</p>

<p><strong>Compute Graphics Principles and Practice</strong> and <strong>Fundamental of Computer Graphics by Peter Shirley</strong> describes the calculation of the radiance returned by sampling a point on the area light, (Notice the black underlined factor describing Area of the jth light source)</p>

<p><a href="https://i.sstatic.net/jEkzn.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jEkzn.png" alt="enter image description here"></a></p>

<p>However both of these books when describing their pseudocode, leave out this <span class="math-container">$Area$</span> factor.</p>

<p>However when I read Peter Shirley's research paper regarding Direct illumination techniques, He gives the PDF for rectangular Area lights as</p>

<p><span class="math-container">$ 1/ \frac{||V_1 \times V_2||}{2}$</span></p>

<p>Which is the area of the triangle not a rectangle.</p>

<p>So ultimately I have 2 questions.</p>

<p><strong>1) What is the correct PDF term for rectangular area lights?</strong></p>

<p><strong>2) Do I need to multiply this term when calculating the radiance emitted from this light source.</strong></p>

<pathtracing><sampling>
PDF when sampling from Rectangular Area Lights
gallickgunner
# PDF when sampling from Rectangular Area Lights

(Asked by: username_0 on 2018-08-21)

So I was reading up on how to sample Rectangular Area lights, and the procedure is pretty straightforward. That is, I can get random points using the equation.

$ p = X\_o + \epsilon\_1V\_1 + \epsilon\_2V\_2$

Where $X\_o$ is my corner point for the rectangle and $V\_1$ and $V\_2$ are the 2 vectors spanning it And the epsilons are the uniform random numbers.

The thing is almost every where I go, they talk about how the PDF of this sampling is $1/A$ (constant) with the exception of 1 place discussed below, and that when calculating the radiance coming from this area light when sampled by this way we should thus multiply the whole thing by the Area of the rectangle.

However when I check their algorithms, they leave out this Area factor.

**Compute Graphics Principles and Practice** and **Fundamental of Computer Graphics by Peter Shirley** describes the calculation of the radiance returned by sampling a point on the area light, (Notice the black underlined factor describing Area of the jth light source)

[![enter image description here](https://i.sstatic.net/jEkzn.png)](https://i.sstatic.net/jEkzn.png)

However both of these books when describing their pseudocode, leave out this $Area$ factor.

However when I read Peter Shirley's research paper regarding Direct illumination techniques, He gives the PDF for rectangular Area lights as

$ 1/ \frac{||V\_1 \times V\_2||}{2}$

Which is the area of the triangle not a rectangle.

So ultimately I have 2 questions.

**1) What is the correct PDF term for rectangular area lights?**

**2) Do I need to multiply this term when calculating the radiance emitted from this light source.**

**Tags:** pathtracing, sampling


---

## 1 answers

### Answer by username_1 on 2018-08-21. Score: 2 | Accepted answer

The correct PDF for an area light is indeed $1/A$. The reason why you see the area term at the top is because you are importance sampling the light, meaning you need to divide by its PDF. This is a Monte Carlo estimator with one sample. Shirley simplifies this by simply writing $1/(1/A) = A$.

I am not sure how he got the $1 / \frac{\|V\_1 \times V\_2\|}{2}$.

> **Comments:**
> **username_0**: Ok and what about discarding this PDF factor in actual calculations? Since as I said neither Shirley's book nor CGPP show this factor in their pseudocode listings.  
> **username_1**: You cannot discard it if you are doing Monte Carlo integration.  

---

