Until now our materials reflected the light in all directions. Polished materials don’t behave like that, the light is mostly reflected in a single direction. Today we implemented more parameters that controlled this behavior.
We decided not to do refractions because we lacked time. The reflection were fairly easy to implement. We used a recursive function that represented a ray bouncing from triangle to triangle until it reached a maximum number of iterations or did not intersect with anything. Given a normalized ray and a normal vector , the reflected ray may be obtained using the following relation:
We also implemented a specularity feature for shiny surfaces. The simulated light source will appear to be reflected on the surface towards the observer.