Tuesday, August 23, 2011

Photon Map Generation


Here’s a general idea of how photon map generation works in computer graphics:

  • A light fires a photon out into the scene within the light's cone angle (I assume along a ray of some sort -- depending on the render engine. The caustic photon distribution is pretty random)
  • That photon will either encounter a diffuse object or a reflected/refracted object and then a diffuse object
  • Once the photon encounters the diffuse object, the photon then records its position and the intensity of the refracted/reflected light that is hitting that photon/point in space
  • Lather, Rinse, Repeat until the number of photons is reached in the Photon Count parameter (in Houdini)
  • Come render time, the created photon map then contributes to the light intensity to which that map belongs (ex:  the light averages all of the points in the photon map that are within a certain distance of that point in space, then adds the results to the light intensity at that point on the object). Since photons do not hit every point on the object, the point that's getting rendered may not have a photon sample at that exact point, but if there are hits very close by, the renderer assumes their average will appropriately approximate the current location's caustic.

No comments:

Post a Comment