Megan Stifter - Renderman II Portfolio
project1 project2 project3

Photographic References

These are reference images that I used as a guide to develop a shader that will recreated the complex phenomenon of iridescence.

Understanding Iridescence

Iridescence, which comes from the Latin word, "iris," meaning rainbow, is a beautiful optical phenomenon that is caused by the interference of light waves on either the surface or interior of an object. This interference produces a series of colors that differ based on the viewing angle or angle of incidence.

This basic graph shows how the angle of the incident ray relative to the normal will be equal to the angle of the reflected ray. If the surface is uneven, then this will cause diffraction, splitting the light waves into the full spectrum of colors.

Iridescence in Nature

For this project I will focus on how iridescence is seen in nature specifically as it concerns the Rainbow Stag Beetle. The source of iridescence on the body of the Stag Beetle comes from light interfering with microscopic scales that overlap across their outermost surface. As the viewing angle changes, the irregular surface causes different wavelengths to be reflected back thus creating the shift in color that is seen. The size of the scales and the thickness of the layers are the two main factors in causing iridescence, and is the reason why no two species of beetle have the same colors.

Why are beetles iridescent anyway? It may seem that these highly reflective and colorful shells would actually be a hinderance to beetles by alerting predators to their prescence, but it actually has the opposite effect. This iridescent quality actually acts as great camouflage for the beetles because their environment is illuminated by intermittent flashes of light caused by the sunlight filtering through the ever moving leaves and trees.

Getting Started

Because iridescence is a very complex optical phenomenon that relies on the interference of light reflecting from the microscopic scales of the beetle, this is going to be a very difficult surface quality to recreate with complete physical accuracy. Instead, I will create a simplified version of iridescence that is based on the viewing angle and the incidence of the light(s) in the scene.

This shader is based off of the dot product to calculate the viewing angle which is the foundation of this effect. I mapped a color gradient that changes based off of the viewing angle creating a simplified iridescent effect.

vector i = normalize(-I);
float dot = 1.0 - nf.i;

The viewing vector is reversed and then used to calculate the inverse dot product.

To enhance the glossy surface of the beetle shell, I used an environment map for the reflections:

                                     No Environment Map                                                              With Environment Map


The difference is slight, but it lightens the surface and gives the shell the necessary glossy effect.


To achieve the bump effect that is seen on the shell of the beetle, different types of displacement need to be layered.


In order to recreate the randomized pock-mark effect on the back of the beetle's shell, I used a python script that generates a grid of spotlights uniformly placed. I randomized these lights and the resulting image was converted to a texture to be used for displacement.

I also layered another custom 'scratch' texture map along with a procedural noise that created long striped ridges down the length of the shell. In order to layer the displacement as I did, the normals must be recalculated after each displacement so that the correct effect is achieved.


I imported my shader into Maya in order to test the functionality and range of the shader in a real world situation.

*Bug model by Ibtisam Ahmed

The shader can be applied to a wide variety of surfaces and the colors can be altered in a varitey of ways. When the iridescence shader is combined with the displacement shader I wrote, the object gains a textured look that breaks up the surface and adds to the realism.

The final version of my Iridescence Shader can be found here, and the final version of my Displacement Shader can be found here.

Final Thoughts

Overall I had a lot of fun working on this project and I am generally happy with the results. There are a few parts of my shader that need to be rewritten so that they are more efficient, and I need to build in controls so that the spread of the colors can be adjusted per the user's wishes. I would also like to finish the model of the Rainbow Stag Beetle that I had started but never completed due to time constraits so that my shader can be viewed on the beetle that it was originally intended for, and then incorporate it into a photorealistic environment.


Below is a list of the sources that I utilized for look development and research:

Encyclopedia Britannica - Source that gives a basic definition of iridescence.
Causes of Color - Explores how light creates the colors we see in dynamic and interesting ways.
Science Magazine - Documents the structural origin of circularly polarized iridescence in Jeweled Beetles.
Softpedia - Describes the science behind how and why beetles shells are iridescent.

Copyright © 2011 Megan Stifter | Contact: