Posts tagged “Photon Map

Russian Roulette for Photon Scattering

On a surface, Russian Roulette determines whether a photon is absorbed or reflected.

The photon power is not scaled.

Reflection or Absorption:

a: [0, 1] is a random variable

p: probability of reflection

phi: the power of incoming photon

if( a < p ) reflect photon at power phi

else photon is absorbed

Specular or Diffuse Reflection:

a: [0, 1] is a random variable

p_d: probability of diffuse reflection

p_s: probability of specular reflection

where ( p_d + p_s < 1 )

Diffuse Reflection: a: [0, p_d]

Specular Reflection: a: [p_d, p_d + p_s]

Absorption: a: [p_d + p_s, 1]

In participating media, Russian Roulette determines whether a photon is absorbed or scattered.

The probability of a photon being scattered is given by the scattering albedo ( rho / (rho + alpha) ) [Jensen 1998], where rho and alpha are the scatter and absorption coefficients.

Scattering or Absorption:

a: [0, 1] is a random variable

p: probability of scattering

phi: the power of incoming photon

if( a < p ) scatter photon at power phi

else photon is absorbed 

New direction of a photon being scattered from diffuse reflection or participating media:

Sampling techniques. Importance sampling is usually applied.

Build Photon Maps of Surface and Volume for Indirect Illumination

As described in Volume Photon Map[Jensen 1998], three types of photon maps are presented to compute indirect illumination in scenes with participating media: global, caustic and volume. Volume photon map contains photons interacting with particles in the participating media, regular photon map stores photons bounced by diffuse surface, and caustic photon maps stores photons bounced specular and transmissive surfaces.

This scratch describes steps to build these photon maps. But global and caustic photon maps are not separately built, while combined together, i.e. photons bounced by any kind of surfaces are stored in the same photon map.

When tracing photons, photons are stored from the 2nd bounce, because the first bounce is the direct illumination on surfaces or volumes.

The photon’s power does not need be scaled when using Russian Roulette.

Photon Map:

For each photon, when it’s not traced to the maximum bounce (user defined number):

Store: only when it hits a diffuse surface.

Scatter: use Russian Roulette to determine whether the photon is absorbed or scattered.

Increase the bounce: every time it hits a surface.

Volume Photon Map:

For each photon, when it’s not traced to the maximum bounce:

Store: when it hits somewhere within the participating media.

Scatter: use Russian Roulette to determine whether the photon is absorbed or scattered.

Increase the bounce: every time it hits a surface or somewhere within the participating media.