The radiosity algorithm is based on radiosity techniques, which are used in thermal engineering to maintain light energy in a closed environment. The radiosity of a surface is defined as the energy per area left over per unit time. In a discrete environment, all surfaces are divided into small polygon meshes, the specified number of times is calculated, and shading information is stored for each node of the meshes. A disadvantage of this method is that the computing time is proportional to the geometric complexity of a scene. Thus, radiosity cannot be used to quickly approximate the lighting conditions of a geometrically complex scene. Since radiosity is diffuse reflection but not reflective reflection, radiosity and ray tracing can be combined to form photorealistic images.
Photon Mapping is a two-pass rendering algorithm that handles both diffuse and specular reflections. In the first pass, photons are shot from the light into the scene. They are hurled around and interact with all the surfaces you encounter. The photons are stored in a special data structure called a photon map for later use, where the resolution of the photon map is independent of the resolution of the geometry. Only a few thousand to one million photons are stored sparsely and the rest is statistically estimated from the density of the stored photons. After all photons have been stored in the map, an estimate of the illumination of each photon is statistically calculated.
In the second pass, the direct illumination is calculated like a beam tracking and the indirect illumination from the query of the stored photons in the photon map. In short, photon mapping shoots photons out of the light and tracks their distribution in the scene. It is fast, but not as accurate as the final acquisition.