Photon Mapping : I still Believe I'm Right

Started by
95 comments, last by playmesumch00ns 18 years, 10 months ago
Some quick definitions, to be sure we're on the same page:

Irradiance - light energy coming to a point on a surface (as you described)
Radiance - the light energy that leaves that point due to reflection/transmission and (maybe) reaches the camera

Radiance - the energy you talk about getting to the camera/eye - is conserved in a scene. The total radiance contributed by a single photon is never greater than the photon's energy when emitted (although it may be less due to absorption).

Radiance, by definition, is always <= irradiance. Therefore, by simple properties of addition, total contributed radiance <= total contributed irradiance. The maximum total irradiance of a photon is the emission energy of the photon; therefore, the maximum total radiance contributed by a single photon <= emission energy.


Supporting sources: (All I had to do was search Google for "radiance conserve." All of these were on the first page of results.)
http://snowball.millersville.edu/~adecaria/ESCI340/esci340_ra_lesson04_radiative_transfer.html
http://graphics.stanford.edu/courses/cs348b-95/lectures/Radiometry_I.ps
http://www.jobinyvon.com/usadivisions/OOS/oos3.htm
http://www.gi.alaska.edu/~rherrick/GEOS692/Fundamentals_3-22-05.pdf


I don't have a copy of the photon mapping book handy at the moment, but I'm fairly certain this point is discussed there as well.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Advertisement
I see what you mean now. ATM have no time to write longer reply, but some analogy:
Let we render plane. Photon A landed close to camera, photon B landed far away. Contribution to brightness of final image is bigger in first case, as it contributed to more pixels. In case of these bounces, there's similarly contribution to more pixels corresponding to locations of other bounces. Just that.

sources: you again simply confuse "conservation of energy"(in case of light) with sum-of-what-wattmeters-show in wattmeters example.

Again, let photon bounces off 0.5 white walls. Irradiance on first bounce will be 1 (one "photon"), right? . Irradiance on second bounce will be 0.5 ,right?. Irradiance on third bounce will be 0.25 , right? . And so-on.
Yes, if you just sum 'em, you get value that is >1 But it is as meaningfull operation as summing readings of that wattmeters.
I think I also see what you're saying now [smile]

When I think of contribution I think only of the photon's effect on the surfaces it touches, in a view-independent manner. For example, if I have a photon that puts 1.0 irradiance on a surface, and the camera sees this photon, it still put 1.0 irradiance on the surface. If I turn the camera the other direction and do not see the photon, or put the camera far away so the surface is just one pixel in size, the photon still put 1.0 irradiance on the surface.

Of course if we look at it the opposite way, in how many pixels a single photon affects, then of course the apparent affect can be more than 1.0 - because photon mapping is just an estimate, and the power of photons is "spread out" over a surface to estimate irradiance. In this sense I agree that the visible energy for the camera can be >1. But if we think about just the scene with no camera, the photon can only have 1 unit of energy that it spreads around the scene.

For example, consider this case:

|------  <- Mirror walls|| X photon||     \ Camera


If the camera is set up so it can "see" the photon, and also see its reflection multiple times in the mirrors, then the photon can appear to contribute much more than 1.0 energy to the rendered scene, because it is reflected many times. But again if we only think of the photon by itself, and not the way the scene is visualized, then the photon only has 1.0 energy.


Another potential point of confusion is that photon mappers ignore time. In a fully realistic simulation, the amount of energy emitted per time is what a "photon" should carry, and the camera should "expose" the rendered frame for a certain amount of time. Usually, we just make a hack and say dTime = 1, so that we can make the calculations much simpler. In this case, a photon that contributes a total of 1.0 irradiance in 1 unit of time will clearly contribute 2.0 irradiance in 2 units of time. However again we generally ignore time in a renderer for simplicity, so we can consider that everything we simulate happens in a finitely short period of time.


So anyways I think we both probably agree, we're just talking about different things [wink]

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Hmm. I don't think there still are full understanding...

Let's first deal with something that is simpler to mentally visualize and understand.
Let there are 2 sheets of thin almost transparent film (say, 0.9 is passed, 0.1 is scattered) parallel one above other. Each have area of 1m^2. Let there are parallel light beam from top passing through both. Let this light have power of 1W/m^2 , and size equal to size of sheets.
We get that irradiance on first sheet is around 1 and on second is around 0.9 . (In fact, somewhat more because of scattered light, but for now we don't care, or we can assume sheets are far away from eachother and scattered light is essentially lost) It is absolutely cleanly physically correct, isn't it?

Now, if we are going to simulate that thing with N photons each with "power" 1/N , we need each photon to "contribute" about 1.9* 1/N to irradiance in the scene.

edit: More complex example:
Let you have sheet of paper (again, suspended in infinite black space of nothingness[grin]) lit by some light source directed that it lits this paper only.
Let irradiance on paper is 1 everywhere.

Now, take another piece of paper and put it at some distance to first. Second piece is not directly lit by lightsource*.
What we will see? Second piece of paper will be lit by light that bounced from first piece. And first piece of paper will get a bit brighter. That's because of light bounced from first paper, coming to second paper, and being bounced back. That's exactly because of this contribution in several places that seems wrong to you.
(also, with your concept, instead of getting brighter, it'll get darker, which is definately wrong in sense contradicts observations.)

(*for more significant effect, you can use mirror instead of second piece)

[Edited by - Dmytry on June 19, 2005 12:18:12 PM]
Quote:Original post by ApochPiQ
Some quick definitions, to be sure we're on the same page:

Irradiance - light energy coming to a point on a surface (as you described)
Radiance - the light energy that leaves that point due to reflection/transmission and (maybe) reaches the camera

Radiance - the energy you talk about getting to the camera/eye - is conserved in a scene. The total radiance contributed by a single photon is never greater than the photon's energy when emitted (although it may be less due to absorption).


Those definitions are almost, but not quite right.

Irradiance is area flux density. i.e. it is the total light energy reaching a differential surface patch per unit time from the whole sphere of directions.

Radiance is the area flux density per unit solid angle. When we're talking about radiance, we're talking about the light energy reaching a differential surface patch from a particular direction.

You can use incident irradiance and exitant radiance together, however when we're dealing with global illumination renderers, the brdf is normally formulated in terms of incident and exitant radiance. i.e. we consider light energy incident on the surface from the entire sphere of directions (irradiance), but only one direction at a time, so we compute irradiance as a sum of radiance samples, and we're only concerened with the light energy leaving a surface in a particular direction (radiance): toward the camera for instance.

So for photon mapping, irradiance is effectively ignored again. The photons represent flux. The photon's exitant radiance contribution is its energy multiplied by the brdf, divided by the surface area. The density estimate allows us to treat a bunch of photons together, so we simply divide by the total surface area of the region covered by the density estimate (a disk).

So when you're bouncing photons around, you're again dealing with incident and extitant radiance. You encode the cosine term in the direction-choosing algorithm and shoot the photon off again. You should not have to normalize the photon energy over their paths.
Hmm, sounds logical... I must admit I have a tendency to get confused between all the combinations of incidence/reflectance and irradiance/radiance [wink] I wish my code was still in a working condition so I could check where my calculations went wrong.

Anyways, thanks for the clarification - if I ever get the time I'll try and figure out where I was introducing the mistake that required (or seemed to require) the normalization.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

I get this stuff mixed up in my head as well. I'm not sure that description is 100% accurate either, but it's pretty close to the mark. :)

This topic is closed to new replies.

Advertisement