Wednesday, November 27, 2013

Spectral Rendering and Iridescence Through Thin Film Interference

I really wanted to include iridescence as a feature for FancyRay and so in order to do that I had to include spectral rendering, which is where instead of using the conventional RGB model, light is treated as a combination of electromagnetic radiation at various wavelengths and intensities. Each wavelength of light interacts with the iridescent surface and depending on the thickness of the surface and the angle of view, the outgoing wavelength differs due to interference with other wavelengths.  The outgoing wavelengths are then converted to their XYZ tri-stimulus values using the CIE color matching functions and then finally the XYZ tri-stimulus values are converted using a matrix transformation into their RGB values in order to be displayed on the screen. The result is a nice rainbow effect. However, to avoid banding, Perlin Noise is used to get varying widths for the surface.

Below is a completed example of my iridescent bubble shader.



The image below is a semi-finished prototype. You can see the iridescence in place but the Fresnel term and specular highlight and refraction have not yet been added.





Thursday, October 31, 2013

Backgammon


This photo is a macro shot of my backgammon board, with some post processing in Photoshop in order to make the colors more bold. 



Red Face


This is a portrait I took of a girl in front of a black background. Afterward I cranked up the gamma value to distort the color of her face. I then used the spot healing tool to eliminate the bright highlights in order to achieve a very "flat" look.




Gecko


This photo was taken in the cactus garden on Stanford campus. I took the photo using a sepia filter while in macro mode. The end result is a nicely balanced image with a gecko stealthily camouflaging itself on the right and a moderate bokeh effect on the left. 


Alien Tree

This is a photo of a dead tree located at the Stanford Foothills. In photoshop I decided to heavily manipulate the colors so that the end result looks like an eerie desolate wasteland.


Glimmering Pool



This is a photo I took of a fountain on the Stanford campus. By making the rest of the photo black and white, the rainbow effect in the pool really stands out. In the original color photo, this would have been overlooked by most observers.


More Flowers



I decided to take a macro shot of some flowers on the Stanford campus. In the background there is a nice bokeh effect noticeable mostly on the street lamps. Afterwards, I made most of the image black and white in photoshop in order to really bring out the flowers in the foreground.