Discussion about photon mapping. back

Board: Home Board index Raytracing General Development

(L) [2012/07/05] [ost by shiqiu1105] [Discussion about photon mapping.] Wayback!

Lately I have been trying to add photon mapper to my own ray tracer.

I have been taking pbrt and Jensen's book <Realistic Image Synthesis using Photon Mapping> as my primary references.
In the progress of reading, I have generated a few questions.

1. I have noticed that pbrt's PM implementation differs very much from that of Jensen's. For example, in Jensen's implementation, 2 photon maps (caustic and global illumination) were built, and in pbrt's version, 3 photon maps (caustic, indirect lighting and radiance) were built. They also differ in the way they partition the light transport equation, and the way to approximate lighting.

2. The way photons were shot is also different, in pbrt, photons were shot was a uniform distribution in the hemisphere along the normal, while in jensen's version, a cosine-weighted distribution was used. I understand that in this case jensen's method wins, (importance sampling issue) I just don't understand why pbrt sample light source with a uniform distribution.

3. The way photons are scattered are also very different. Jensen used russian roulette to decide whether particles are diffusely reflected, specularly reflected or terminated, whose probability depends on surface's reflectance(which I don't know how to compute, somebody pls help). And pbrt uses a total different technique.

4. pbrt doesn't use techniques like  "projection map".

So I want to discuss with your folks before I start coding, which are the best strategies to choose when implementing my own PM.
(L) [2012/07/07] [ost by graphicsMan] [Discussion about photon mapping.] Wayback!

Whether you are better off shooting photons based on uniform or diffuse depends on your emission distribution.  Choose what is right for your light sources.

I don't know about PBRT's implementation, as I haven't read that chapter, but when I implemented photon mapping a (long) while back, I used Jensen's book as a reference, and it worked fine.  How is the radiance map used?   Choosing Russian roulette probabilities is somewhat of an art form.  I don't know if anyone has developed a really good heuristic for choosing these probabilities.  Just don't choose the probability too low, as you'll get sparkles [SMILEY :)]

What is the projection map?  I don't remember this.
(L) [2012/07/08] [ost by shiqiu1105] [Discussion about photon mapping.] Wayback!

>> graphicsMan wrote:Whether you are better off shooting photons based on uniform or diffuse depends on your emission distribution.  Choose what is right for your light sources.

I don't know about PBRT's implementation, as I haven't read that chapter, but when I implemented photon mapping a (long) while back, I used Jensen's book as a reference, and it worked fine.  How is the radiance map used?   Choosing Russian roulette probabilities is somewhat of an art form.  I don't know if anyone has developed a really good heuristic for choosing these probabilities.  Just don't choose the probability too low, as you'll get sparkles

What is the projection map?  I don't remember this.
Radiance map is basically to precompute the out going radiance for a small fraction of photons stored, and use the closest radiance photon's out-going radiance during the final gathering pass.
Projection map is a technique to rule the directions in which photons are shot from the light source, so to help the situation where objects in the scene are sparse and a lot of photons shot will hit nothing.

What do you mean by saying " depends on my emission distribution"? What's the correct distribution for a regular diffuse area light then?
(L) [2012/07/08] [ost by graphicsMan] [Discussion about photon mapping.] Wayback!

A regular diffuse area light will have a uniform distribution.  However, due to the projected solid angle calculation, there is a cosine term, which means that you'll converge faster if you draw samples on a cosine distribution.
(L) [2012/07/08] [ost by shiqiu1105] [Discussion about photon mapping.] Wayback!

>> graphicsMan wrote:A regular diffuse area light will have a uniform distribution.  However, due to the projected solid angle calculation, there is a cosine term, which means that you'll converge faster if you draw samples on a cosine distribution.
Okay, I guess I will modify that.
I wonder why pbrt doesn't do this though [SMILEY :)]
(L) [2012/07/08] [ost by ingenious] [Discussion about photon mapping.] Wayback!

>> shiqiu1105 wrote:I wonder why pbrt doesn't do this though
This actually has been a bug in PBRT since version 1, which I have reported but hasn't been fixed yet. PBRT's area light source does not account for the cosine neither when illuminating a shading point, nor for emission. I haven't tested personally, but due to this bug a path tracer with and without explicit direct lighting should output different results. The one without explicit direct lighting would be the correct one.

back