Photon mapping vs. Path Tracing

Post your tutorials and help questions in this forum
Locked
User avatar
Josamoto
Posts: 51
Joined: Sun Mar 19, 2006 9:01 pm
Location: Carletonville - South Africa
Contact:

Photon mapping vs. Path Tracing

Post by Josamoto »

:?: I'm curious, what is the difference between photon mapping and path tracing.

:?: I notice they share the same settings, but which one is better, which one is faster?

:?: Also what is the difference between lightmap and photonmap under the Photons tab?

:?: And lastly, which is best for better renders, Emitted / Received?

Bye now!
The cool strawberry man!!!
silverlw
Posts: 453
Joined: Thu Jun 02, 2005 7:05 pm
Location: Sweden
Contact:

Post by silverlw »

Pathtracing is a "bruteforce" approach to radiosity comparable to montecarlo algorithm or like fprime/lw works. Photonmapping is a simpler/faster way to shoot bursts of photons and approximate the global illumination comparable to lw's own interpolated radiosity mode. On top on this interpolation we add FinalGathering to further improve the solution and accuracy.

Bruteforce pathtracing can be very easy to setup and effective in both time vs quality as long as there aint to many bounces. As a thumbrule i would advice to use photonmapping if you need more than 8 bounces or recursions.

The difference between pmapping/lmapping is that pmapping is light's or objects emitting photons in all directions. Some photons will eventually hit something and get stored in the irradiancemap.
With lmapping we reverse the process by tracing photons from the camera to the objects instead and store that in the irradiancemap. Lmapping is almost always faster (since we need to shoot less to hit anything) but there is situations wich makes photonmapping more efficient than lmapping. One example that work's truly bad with lmapping is when you put a lightsource inside a sphere wich have translucensy/refractions/transparency applied to it. Then it will be very hard to trace from the camera through that material and try to hit/find the lightsource. In the above example lightmapping will produce heavy artifacts almost nomatter how high values you use. Switching to pmapping will easily solve the situation.

Emitted/received is just a switch to measure different things.
If you dont want Kray to shoot more than 200.000 photons in total, from all lightsources, because otherwise it would take to long time, use "emitted"
If you instead want's to be sure that no matter how you set up the scene, you should always get minimum 200.000 hit's before it continues, use received.

Happy Kray'ing :)
User avatar
Josamoto
Posts: 51
Joined: Sun Mar 19, 2006 9:01 pm
Location: Carletonville - South Africa
Contact:

Post by Josamoto »

Thanks silverlw!!! I now have absolute clarity on the subject(s) thanks to you!

:D :D :D
The cool strawberry man!!!
Captain Obvious
Posts: 165
Joined: Mon Oct 10, 2005 6:15 pm
Location: London, UK

Post by Captain Obvious »

Pathtracing is a "bruteforce" approach to radiosity comparable to montecarlo algorithm or like fprime/lw works. Photonmapping is a simpler/faster way to shoot bursts of photons and approximate the global illumination comparable to lw's own interpolated radiosity mode. On top on this interpolation we add FinalGathering to further improve the solution and accuracy.
Actually, this isn't entirely correct. The path tracing mode with "cache irradiance" turned on is more or less exactly the same thing as LW's "interpolated" mode. A better way of explaining the difference is that in photon mapping mode, you have a final pass called "final gathering" to smooth out the errors produced by the photon map. In path tracing mode, you do just the final gathering and none of the photon mapping.

Essentially, it works like this:

If you use eight recursions and render in photon mapping mode, the camera or lights will fire photons that bounce eight times and produce an irradiance map. This map is then used by the final gathering rays that are fired, meaning a total of nine bounces.

If you use eight recursions and render in path tracing mode, you will fire final gather rays that bounce eight times.





Generally, I suggest using photon mapping. It's usually faster than just path tracing.
Locked