Alana Li 3036912864
Jianzhong He 3036960615
Jie Chen 3036845283
Beatriz Muniz de Castro e Silva 3038745686
In this project, we implemented iridescence, which is a result of the wave nature of light. When light rays hit a surface, they can interfere with each other, creating colorful patterns that change as the angle of incidence or viewing angle changes. To simulate this effect, we approximated the interaction of light rays with the surface by considering the angles of incidence and reflection, the wavelengths of the light, and the phases of the waves. Specifically, we used the thin-film interference model to simulate the behavior of light interacting with a thin layer of material, such as oil on water or a soap bubble. By modeling the physical properties of these thin films, we were able to generate visually realistic images that exhibit the colorful and dynamic patterns of iridescence.
Iridescent Effects on a Humming Bird
Since no one in our team picked the mirror and glass BSDFs when working on Project 3-2, we implemented that from scratch, before modifying it to implement iridescence. We first modified the mirror BSDF sample-f function to implement thin film interference by taking into account the film thickness, refractive index of the film, wavelengths of light (R, G, B), and the angle of incidence.
How Light Waves Behave with Thin Film Interference
The project takes into account thin film interference by calculating the phase shift caused by the reflection and transmission of light at the interface between the glass and air layers. The thickness of the thin film layer and the refractive index of the glass material are used to compute the phase shift. The code also computes the Fresnel coefficients, which describe the reflection and transmission of light at the glass-air interface, and uses them to calculate the reflectance and transmittance of the glass material. Finally, the code samples a new direction for the scattered light and returns the BSDF value for that direction.
We also modified the glass BSDF class to render soap bubble like effects using a similar approach. We were able to render the images as transparent but there wasn't an iridescent effect as we discovered that that would require rewriting a majority of the renderer code. Previous groups that worked on similar projects also commented on this.
Rendered Bubbles Missing Iridescent Effect
When modifying glass BSDF didn't give the right effect, we turned to modifying the .dae files. Many approaches were used, including Blender, AutoCAD, and online websites for modifying collada files. However, none of these options worked as the rendering program wasn't able to properly render the modified .dae file.
Collada File Render Issue
We asked staff what could be causing this issue and they said there could be multiple causes for it, possibly stemming from the fact that we were using a newer version of Blender that the renderer didn't support.
We then tried a different approach by rendering the soap bubbles in Blender itself. This required learning a new software but the results were very life-like. This was done by making a custom material for a sphere. The material was a mix of the Transparent and Glossy BSDFs, with some noise added in to vary the color of the film to simulate the variance of the thickness of the bubbles in real life.
Custom Blender Material
Lessons learned, when something doesn't work, try and try again until you find a way that does.
Below are some of results of our project, modeled after the iridescence sheen of oil:
Here is the render we made of soap bubbles made in Blender:
Blender Render of Soap Bubbles
Chapter 8. simulating diffraction. NVIDIA Developer. (n.d.). Retrieved May 4, 2023, from https://developer.nvidia.com/gpugems/gpugems/part-i-natural-effects/chapter-8-simulating-diffraction
Beautypi. (n.d.). Shadertoy. https://www.shadertoy.com/view/llcXWM
The Art of Code. (2021, June 4). Live Coding:Bending Light [Video]. YouTube. https://www.youtube.com/watch?v=NCpaaLkmXI8
Zucconi, A. (2020). CD-ROM Shader: Diffraction Grating – Part 1. Alan Zucconi. https://www.alanzucconi.com/2017/07/15/cd-rom-shader-1/
Zucconi, A. (2020b). CD-ROM Shader: Diffraction Grating – Part 2. Alan Zucconi. https://www.alanzucconi.com/2017/07/15/cd-rom-shader-2
Thin Film Shader - OSL Shaders - Chaos Help. (n.d.). https://docs.chaos.com/display/OSLShaders/Thin+Film+Shader
CS 184/284A Final Project. (n.d.). https://kwsong.github.io/cs184_final/final.html
CS184 Project Proposal. (n.d.). https://dangeng.github.io/184-final-project/proposal.html
Alana Li: Contributed to code, final presentation, final report
Jianzhong He: Contributed to project proposal, code, final presentation
Jie Chen: Contributed to code, milestone presentation
Beatriz Muniz de Castro e Silva: Contributed to code, milestone report, final presentation