This project simulates an Ultraviolet light source and a Phosphorescent material which emits visible light in all directions. This causes the phosphorescent surface to act like an area light source with an intensity which is proportional to the ultraviolet light hitting it.
In order to model ultraviolet light I added a uv member to the Spectrum class which represents the ultraviolet intensity. I then I modified the operators in the Spectrum class so that the ultraviolet light was modified exactly like visible light.
The new point light source which I named blackpoint, initializes its spectrum with a UV intensity passed in from the rib file. I also created a blackarea light source which is based on the normal area light source which adds ultraviolet intensity to the Power member. Both light sources have the ability to emit visible light along with the ultraviolet light.
For a material to be recognized as being phosphorescent I had to add a boolean variable to the Material class which is initialized to false by default for all other materials. I copied the matte surface as a phosphorescent surface since it's diffuse reflection accurately models the scattering of light by phosphorescent materials.
My system models the blacklight effect as indirect illumination that is created when UV light hits a phosphorescent material. To capture this effect I modified the irradiancecache integrator since it does a good job of direct illumination (this proved to be a bad idea in lrt). In the integrator I detect when a UV ray hits a phosphorescent material and adds in radiance which is proportional to the intensity of the UV light.
I tried using the whitted integrator for UV illumination. In this image the mountains are phosphorescent and the flat parts are matte. As you can see there isn't much in the way of indirect illumination.
This is the most interesting image I generated but it revealed some memory problems with the irradiancecache integrator. I could only render the image at 50x50 pixels and had to remove the top and left walls to keep my computer from running out of memory. The only light source in this image is emitting no visible light but instead there is a large phosphorescent patch on the far wall which casts all of the visible light onto the scene.
I was able to render this image because it is so simple. The curved object is a sphere area light source which only emits UV radiation. The bottom polygon is phosphorescent and casts all of the visible light on the scene. You can see two other polygons being illuminated from the first surface. Also the original light source is being illuminated.