Graphics Reference
In-Depth Information
Incoming
direction
“Photon”
Exit
radiance L
Radiant
flux
BRDF
“Photon”
Direction
Radiant
flux
(b)
Figure 2.11 Photon mapping. (a) In the simulation (photon tracing) phase each “photon” has a flux
value and a direction. (b) Both are recorded at a surface collision; the photon is reflected
according the BRDF.
(a)
for multiple bounces. Also, BRDF-based importance sampling in MCRT tacitly
assumes incoming light is constant in all directions, or at least in the stratified
sections described above. But the incoming light can vary significantly with di-
rection. The photon map can be used to guide the sampling based on directions
where the light is strongest. Combining this information with the BRDF leads to
better sampling and therefore improves MCRT efficiency.
The photon simulation is done differently depending on whether the goal is to
render or to do a GI computation. For example, it is normally better to concen-
trate photons toward the refractive surfaces in caustic rendering, and there may
not be any need to represent general diffuse interreflection. On the other hand,
nonuniform photon distribution can bias the GI solution.
2.4.2 Photon Map Creation
In the first phase of photon mapping, photons are shot from light sources in ran-
dom directions and then scattered at object surfaces. The position, incoming di-
rection, and radiant power are stored at each surface intersection. After that, a
probability test is performed to decide whether this photon is scattered or ab-
sorbed. If it is scattered, the photon is reflected in a random direction and the
tracing continues. Otherwise the photon is terminated.
The difference between caustic photon mapping and global photon mapping
in this first stage is that in caustic photon mapping, only photons that can con-
tribute to the caustic are stored. Caustics come from reflected or refracted light,
so a photon cannot contribute to a caustic unless it has been reflected or refracted
at least once ( Figure 2.12(a) ) . In global photon mapping, the goal is to get an
approximation of the light density in order to guide subsequent MCRT, so all
photons are traced and stored ( Figure 2.12(b) ) .
 
Search WWH ::




Custom Search