|
Photon Mapping This is a two pass algorithm developed by Jensen as an alternative to pure Monte Carlo ray tracing. Here L(S|D)*D covers the paths represented by the photon map, while (LS*E)|(DS*E) covers the paths traced by a ray tracing step. This method uses the Irradiance Caching idea proposed by Ward, and uses a map data structure that is decoupled from geometry. In the first view independent pass, photons are shot from the light sources and traced through the scene. When a photon hits a surface, Russian roulette decides what type of reflection (diffuse/glossy/specular) should be used (this is an input to the BRDF class). Each time a photon hits a diffuse surface, Russian roulette is used to decide if the photon should get reflected or terminate. If the photon terminates, it is stored in a balanced kd tree data structure called the photon map. We do not store photons at specular surfaces because lighting at these points is view dependent. A second photon map is used for caustics. Objects in the scene must be labelled as "caustic targets". Photons are shot from light sources till the specified number of 'caustic paths' have been traced. If the photon does not hit a caustic target first, it is retraced. A photon that hits a caustic target first and then hits a diffuse surface is stored in the caustic photon map. At rendering time, an eye ray hitting a specular surface is still traced recursively. If the eye ray hits a diffuse surface, final gather rays are shot from that point into the scene to estimate the indirect light contribution.. Contributions of these final gather rays is calculated by using the Global Photon Map. Thus each final gather hitting the scene at some point X leads us to query the photon map for the radiance at X. Total radiance for a diffuse surface is given by : Indirect contribution (final gather rays) +direct light at that point + Caustics calculated using the caustic photon map Photon mapping is a biased technique; the density estimation process is a biased one. Thus it creates images which are smooth, but not necessarily accurate. For my renderer the configuration settings for photon mapping are specified in the format shown below: #shader
|
||||||||||||||||||