Using Photon Maps and Irradiance Cache in Photorealistic Image Synthesis

Jaroslav Křivánek Departement of Computer Science and Engineering, Karlovo nám. 13, 121 35 Prague, tel.: +420 2 2435 7268 email: xkrivanj@fel.cvut.cz

Photorealistic image synthesis involves simulating the transport of light energy in the scene. At every visible point x⃗ in the scene, the value of radiance L reflected to the camera must be evaluated. The equation describing how reflected radiance depends on the incident radiance is called the rendering equation and has the following form:

L(x⃗, ω⃗_{r}) = L_{e}(x⃗, ω⃗_{r}) + ∫_{Ω} L(x⃗, ω⃗) f_{r}(ω⃗_{r}, x⃗, ω⃗) cosθ dω⃗.

It says that the radince L reflected from the point x⃗ to the direction ω⃗_{r} is equal to the self emitted radiance L_{e} plus the sum (or integral) of contributions of radiance incoming to the point x⃗ from any direction. The interaction of the incoming radiance with the material is modeled by multiplying its value with the value of the bidirectional reflectance distribution function, denoted f_{r} in our formula.

Shortly, the reflected radiance at a point is expressed by means of the incoming radiance and material characteristics of the surface being hit by the light ray. The incoming radiance can be regarded as the radiance reflected from some other point in the scene. To compute radiance at the other point, the same method as for the point directly visible by the camera is used. The same method is used even for higher order reflections of light. The recurrence of the rendering equation is apparent and it causes that the complexity of its solution is very high.

There is a lot of techniques for solving the rendering equation, but the majority of them is not able to simulate the light interaction with any kind of surface material (diffuse/glossy/specular/refractive). Nowadays, the most popular techniques solve the rendering equation using the Monte Carlo integration. Application of pure Monte Carlo to solve the integral in the rendering equation is very general — it can handle any material, but the problem is the speed of convergence, which is proportional to the square root of the number of used samples. Therefore, special techniques are used to simulate particular kinds of light–material interactions.

The most successful method for photorealistic image synthesis is undoubtfully the ray tracing, but it ignores multiple diffuse reflections of light and so called caustics, which are the patterns of light specularly reflected or refracted and then seen on the diffuse surface (for example the light focused by the lens).

In our work, we extended existing raytracer with capability of simulating both effects missed in classical ray tracing. We used Irradiance Cache [3] to simulate multiple diffuse reflections and Photon Maps [1] to simulate caustics and full global illumination of the scene. We combined Photon Maps and Irradiance Cache as advised in [1]. The details on what Irradince cache and Photon Maps are and how are they used can be found in our work [2]. The main advantages of Photon Maps are:

- They can handle scenes with objects with all combinations of material properties.

- Photon Maps are independent from the scene geometry and do not put any restrictions on the models of the objects.

- Compared to other methods, they are relatively fast.

- The implementation of the Photon Maps does not require any changes of crucial importance in the architecture of existing raytracer.

- They are easy to parallelize.

Photon Maps have of course some drawbacks:

- A lot of memory (tens of MB) is used in scenes with complex illumination.

- The algorithm behaviour depends on many parameters which has to be tuned for every scene by user.

In our work we solved some problems not addressed byt author of [1]. It was the problem of estimating the number of ligh samples needed to fill the Photon Map with user specified number of photons. We also presented a novel method for reconstructing the value of radiance from the photon map which preserves better the real shape of the caustics than the method used in [1].

To test our algorithms, we also implemented new types of point light sources (two types of spot lights) and area light sources, that are not easy to simulate using ray tracing.

Reference

[1] Henrik Wann Jensen. Global illumination using photon maps. In Rendering Techniques ’96 (Proceedings of the Seventh Eurographics Workshop on Rendering, pages 21–30. Springer Verlag, 1996.

[2] Jaroslav Křivánek. Modern algorithms for image synthesis. Master’s thesis, Czech Technical University, Prague, February 2001. In Czech.

[3] Gregory J. Ward, Francis M. Rubinstein, and Robert D. Clear. A ray tracing solution for diffuse interreflection. Computer Graphics, 22(4):85–92, 1988.