Download Documentation - Mahmoud Zeidan
Transcript
rendering. Many photons are needed to get good image quality, typically 100.000 – 1.000.000 photons depending on the specific scene. The collections of photons are called a photon map. Normal ray tracing methods are combined with the photon map during rendering. The density of photons in the neighborhood of a specific query point is used to get an irradiance estimate during rendering, and this value is used as an approximation instead of performing a costly Monte Carlo integration. Photon Mapping can be divided into three consecutive steps, each of which is described in the subsequent subsections. • Photon Tracing • Photon Map Sorting • Rendering B) Photon Tracing Each light source emits photons which are traced through the scene. A photon hitting a surface can be reflected, transmitted or absorbed. Russian roulette is used to determine which of these three events should occur, with probabilities based on the material properties. A photon path is terminated when it is absorbed. Photons hitting diffuse surfaces are stored for later use, each photon emitted from a light source can therefore be stored many times during its path through the scene (hitting several diffuse surfaces). The collection of stored photons is the global photon map. An additional caustics photon map may also be created. This photon map only stores photons hitting diffuse surfaces if they have been reflected or transmitted from a specular surface. The following information is stored for each photon. • Photon position • Photon flux • Incident direction C) Photon Map Sorting All photons created during photon tracing are in this step sorted to allow fast lookups during the rendering step. Jensen [JEN96] uses a balanced kd-tree since it is a compact representation which allows a non-uniform distribution of photons in the scene. The global photons and the caustics photons are stored into separate photon maps. D) Rendering Four terms are evaluated and added together to get the color of each pixel in the image. • Direct light