Project 06 - Refraction
Refraction implemented with Fresnel equation. Caustics is enabled by distributed ray tracing. Translucency effect is also added to make things more interesting.
The source code of this project is available here. It is a bit messy currently, but I will try to clean it up later.
Videos
Video 1: Varying index of refraction. Note the conversion from refraction to perfect reflection as IOR increases, as predicted by the Fresnel equation.
Video 2: Varying translucency.
Images
Click on the images to view full size version.
Image 3: Normal direction defined by a bump map and index of refraction defined by a texture map. As a comparison, the two green spheres are rendered using the same texture, with the left one for normal vector and the right one for index of refraction (ior = length of normal vector before normalization).