A photon, as utilized in our system, will be described by:
For efficiency reasons the photons are stored in a KD-tree taking into account the positions (photons which are close in the scene will also be close in the data structure). This data structure, very popular in computational geometry algorithms, is a good choice because:
However, some issues have to be taken into account. For example, when querying for the photons stored on a surface, only photons on that same surface should be considered. This is not generally a problem in scenes with enough separation between surfaces, where a bounding sphere will naturally be also a bounding disk on the surface. But even in this constrained set of scenes, objects will have corners, and the photons on neighbor walls will cause noise in the power estimation. In order to avoid this problem, the query's bounding sphere is compressed over the normal of the sampled point.
Giving a set of photons in a disk of radio
we can compute the
radiance as:
is a photon
is its incoming direction
is its power
is the BRDF
is the outgoing direction.