CS 184: Spring 2022
Sam Ellgass and Nima Rezaeian
In this project, we expanded on our work from 3-1, and chose to implement parts 1 and 2. These parts led us to better understand how reflection differs from a scattering (BSDF), and how to use more advanced BSDFs to create glossy and metallic effects to mimic real world elements.
In this task, we extended our ray-tracing to accurately depict mirroring and glass materials. Below, CBspheres is rendered with 0, 1, 2, 3, 4, 5, and 100 as the maximum number of bounces per ray.
In the 0 bounce image, only direct light hits the camera, and only the light source is visible.
In the 1 bounce image, light that bounces directly off of the objects and hits the camera appears - and this includes the direct reflection of the light in the left sphere.
At 2 bounces, now some of the light has reflected off of the sphere and the walls to hit the camera, and the left sphere can be seen to appear glassy.
At 3 bounces, light is able to bounce off of the scene, off of an object, and then finally off of the right sphere to make the right-most sphere appear glassy.
For 4 bounces, the scene gets lighter, and the only new effects are the light illuminating the right wall as a result of reflection directly from above through the right sphere, and the reflection of the right sphere being visibly glassy in the left sphere.
For 5 bounces and 100 (and all values in between) the scene simply gets the benefit of more global illumination, and appears lighter.
In this task, we implemented more advanced BSDFs to emulate metallic and glossy surfaces. Below, we rendered the CBDragon as if it were made of gold, with alpha values of 0.005, 0.05, 0.25, and 0.5.
Alpha of 0.005 is rather dark, with some shine to the directly illuminated parts, but otherwise a generally glossy look.Alpha of 0.05 adds a lot more brightness to the directly illuminated parts, and retains the glossy look from 0.005.
Alpha of 0.25 is very bright, probably more so than would be realistic, but still retains enough glossiness as to appear metallic.
Alpha of 0.5 is almost matte in how uniform and smooth it is, and no longer looks like gold, instead like a not very glossy gold paint.
Below, CBbunny is rendered with hemisphere sampling and importance sampling. The hemisphere sampled bunny is obviously much noisier - and this is due largely to the fact that hemisphere sampling works poorly with the Beckmann function, and is accentuated by the fact that microfacet bsdf's require continuity to appear glossy. In contrast, the importance sampling, adjusted for microfacet bsdf's, is able to create this natural, glossy effect.
Below, we rendered the CBDragon as if it were made of both iron and sodium by changing the index of refraction through eta and k parameters at specific key wavelengths. On the right, our sodium dragon can be seen, reflecting light differently.
This project was a good extension of the techniques of 3-1 and led to a deeper understanding of BSDF's and microfacet properties.
Hosted at https://cal-cs184-student.github.io/sp22-project-webpages-nimarez/proj3-2/index