Previous:Using Reflection and Metallic   Main Index   Next:Working With Pigment Maps



Using Iridescence

Iridescence is what we see on the surface of an oil slick when the sun shines on it. The rainbow effect is created by something called thin-film interference (read section "Iridescence" for details). For now let's just try using it. Iridescence is specified by the irid statement and three values: amount, thickness and turbulence. The amount is the contribution to the overall surface color. Usually 0.1 to 0.5 is sufficient here. The thickness affects the "busyness" of the effect. Keep this between 0.25 and 1 for best results. The turbulence is a little different from pigment or normal turbulence. We cannot set octaves, lambda or omega but we can specify an amount which will affect the thickness in a slightly different way from the thickness value. Values between 0.25 and 1 work best here too. Finally, iridescence will respond to the surface normal since it depends on the angle of incidence of the light rays striking the surface. With all of this in mind, let's add some iridescence to our glass sphere.

sphere { <0,0,0>, 1

     pigment { White filter 1 }

     finish {

        ambient .1

        diffuse .1

        reflection .2

        specular 1

        roughness .001

        irid {

          0.35

          thickness .5

          turbulence .5

        }

     }

     interior{

        ior 1.5

        fade_distance 5

        fade_power 1

        caustics 1

     }

}

We try to vary the values for amount, thickness and turbulence to see what changes they make. We also try to add a normal block to see what happens.



Previous:Using Reflection and Metallic   Main Index   Next:Working With Pigment Maps