You get a bonus - 1 coin for daily activity. Now you have 1 coin

The Photon Mapping Algorithm for Image Synthesis

Lecture



Photon mapping – one of the most versatile and realistic algorithms for solving the problem of computing the illumination integral in the most general case. Photon mapping is complex both to implement and computationally. The algorithm consists of three parts: photon tracing, photon map construction, and radiance estimation.

Photons in this method – are particles carrying a small portion of light energy. At the initial stage, photons are emitted from the light source in accordance with the distribution of light energy at that source. For example, it is known that a point or spherical light source (such as the sun) emits light uniformly in all directions. Area light sources have a cosine distribution, having a maximum along the direction coinciding with the normal to the source plane and zero along directions lying in that plane (Figure 9).

The Photon Mapping Algorithm for Image Synthesis

Figure 9 – Diagram of the photon tracing process

During tracing, photons strike various surfaces. Depending on the material's properties, different events can occur with them: a photon may be reflected diffusely (that is, in a random direction), reflected specularly, pass through the surface, or be fully absorbed. In the case of diffuse reflection and absorption, a record of the photon is stored (simply in a list or array), and the decision as to which of these events occurs with the photon is made based on “Russian roulette”.

After photon tracing is complete, the photon map is constructed in the form of some spatial partitioning structure. This stage is auxiliary and serves to allow, at the next step, the k nearest photons to be found at any arbitrary point in space. If photons were simply stored in an array, the k nearest photons would have to be computed by brute-force search each time, which is very slow.

Once the photon map has been built and we are able to perform fast searches within it, the radiance estimation stage begins. Several approaches are possible here. The question is at which points to gather illumination. The most realistic method is to use distributed ray tracing, with the difference that each time a ray strikes a surface, illumination must be gathered at that point by finding the k nearest photons, summing their energy (in the simplest case), and dividing the resulting energy by the surface area of the sphere whose radius equals the distance to the farthest photon. The algorithm thus dynamically selects the gathering radius: where there are many photons, the gathering radius is small; where there are few, it is large. As a result, the noise level is uniform across the entire image.

It is possible to use a constant gathering radius and, instead of searching for the k nearest photons, gather illumination from all photons falling within a sphere of a given radius. However, this method produces more noise. In practice, photon maps are used to compute caustics and secondary illumination using an irradiance cache and final gathering.

When using the final gathering method, the photon maps themselves are used only to compute indirect illumination. Shadows, reflections, and other effects (except, of course, caustics, for which final gathering is not needed) are computed using distributed ray tracing or some other method. Instead of gathering illumination directly from the photons, in the final gathering method a certain number of rays are emitted from a given point over the hemisphere, and illumination is then gathered at the points where these rays land. This makes it possible to significantly reduce noise. As a rule, fewer rays need to be traced than in Monte Carlo ray tracing.

See also

  • [[b12721]]
  • [[b12722]]
  • [[b12723]]
  • [[b12724]]
  • [[b12725]]
  • [[b12726]]
  • [[b12727]]
  • [[b8362]]
  • [[b12017]]
created: 2024-11-13
updated: 2026-03-09
100



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "computer graphics"

Terms: computer graphics