# NTU-CSIE Rendering Final Project

## -Soap Bubble Material-

ID : B97902080
Name : Ke-Wei Chen
Environment : 217 workstation

• About the "rainbow" color on the surface of soap bubble, it is because the interference of rays, which is brought by the thin thickness of the soap bubble's membrance. Besides, different thinckness will generate different color, the main reason is that when a ray go through the membrance and reflect from it, the wave will have phase difference, and the effect has something to do with wavelength of the mix ray. Some paper provide formula and algorithm [5] to compute the reflection intensity from soap bubble, which is the function of wavelength and thickness.

• After solving the rainbow color of bubble surface, I observe the realistic bubble , a soap bubble has both reflection and transmission, but we can ignore the refraction because the thickness of membrance is just 50nm ~ 1200nm. Therefore, we can simplify the transmission term.

• Finally, we have to produce the noise just like wood grain, and make it be thickness map. So, I use Perlin Noise to generate it.

### Implementation with PBRT

• First I create a new material, which is similar to glass, but I set the refraction index of specular transmission to be 1.0. Besides, I create a new BXDF called "SpecularInterference" to replace the specular reflection. In SpecularInterference, I set the thickness and implement the interference formula. In the formula, I use the function "Fresnel" and "Noise"(perlin noise) to modify the intensity.

• Actually, I have some trouble when implement the formula. Because it only record RGB spectrum in PBRT, it do not save the wavelength of mix ray. So, I use some naive method to avoid the problem, that is, I use wavelength (700.0, 546.1, 435.8) to estimate the (R, G, B) wavelength, and modify it by some tricky method.

• above is a spectrum distribution with blue light, and there is some paper transform RGB to spectrum distribution[2], but I did not implement it :(. Besides, I have no time to implement the geometry of bubble. It is a pitty!

### Some Result

• Glass without refraction

• My bubble with uniform interference

• My bubble with perlin noise

• Final image

• Some funny result with another model

### Reference

[1] https://graphics.stanford.edu/wikis/cs348b-08/David_Harju%27s_and_Simon_Que%27s_Final_Project_Writeup