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

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.


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}$.

  • $\begingroup$ 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. $\endgroup$ – gallickgunner Aug 21 '18 at 21:39
  • $\begingroup$ You cannot discard it if you are doing Monte Carlo integration. $\endgroup$ – Hubble Aug 22 '18 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.