Project 4 - Reflections and Refractions


The Box Scene


scene

Some Buggy Images

bug1

The direction of the reflected ray was calculated incorrectly. It was in the opposite direction of the actual reflected ray. This is evident from the flipped reflection of the walls in the red sphere.

bug2

The direction of the refracted ray was calculated incorrectly. The vector parallel to the surface was not normalized. The shading on the left part of the blue sphere kind of gives the hint.

bug3

The details on the blue sphere were missing. The output with and without Schlick's approximation was exactly the same. The reflected color was calculated only for the reflective surfaces. But according to Fresnel reflections, even a non-reflective refractive surface can have a reflected component.

Rendering time was 0.03 sec (multi-threading)



Hardware Configuration

Processor : Intel(R) Core(TM) i5-5200U CPU @ 2.29GHz x 4
Graphics : Intel(R) HD Graphics 5500 (Broadwell GT2)
OS : Ubuntu 18.04.3 LTS
OS type : 64-bit
RAM : 4GB