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 1: Transparent spheres.

Image 2: Spheres, cube and triangle mesh.

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).

Image 4: Glass bunny, 69451 triangles, rendered in 8 minutes and 7 seconds.

Image 5: Three dragons with different color.

Image 6: Transparent Lamborghini aventador.

Image 7: Translucent bunny, 69451 triangles, rendered in about 17 minutes. Translucency values are 0.005, 0.1, and 0.5 from left to right.

Image 8: Translucent bunny and transparent dragons.