recently, I had to work on a project for my lecture on global illumination. My partner and I decided to implement a variant of the progressive photon mapping technique, described by Hachisuka et al.: instead of assigning each photon a certain color, we choose to map each photon to a certain wavelength. This allowed us to simulate caustics more accurately and achieve effects splitting a beam of white light into its spectrum of colors:
2] to calculate the correct*, individual refraction index for each photon:
(*Actually, the correct refraction index is given by the Sellmeier equation, but for light in the visible spectrum the presented formula gives a reasonable approximation.)
There were a number of other problems we had to solve and I will probably create another post about this. So if you are interested in more technical details, let me know.
But now, I want to show you some results.
The first scene is the standard cornell box with two spheres in it:
This looks pretty nice, but the interesting question was: does our implementation really produce the rainbow effect caused by a prism? So I created a scene with a narrow light source, which emits a beam of light at a prism and it turned out...