POV-Ray : Newsgroups : povray.programming : Implementation of iridescence Server Time
29 Jul 2024 00:36:17 EDT (-0400)
  Implementation of iridescence (Message 1 to 1 of 1)  
From: Ralf Muschall
Subject: Implementation of iridescence
Date: 4 May 1999 21:25:00
Message: <372F8A05.B1D1F8FC@t-online.de>
Reading the source (lighting.c, both in 3.1e and uvpov4s), I found
the following expression for the returning light:

u += Finish->Irid  *  intensity * [1 - 0.5*cos(s/lambda)]

where lambda is the wavelength of the color being worked on,
s is the path length difference of the two strongest interfering
rays [1], u is the color component of the result,
and intensity is defined as

intensity = Cos_Angle_Of_Incidence * Finish->Irid

This leads to the following questions:

1. Why is Finish->Irid being squared?
2. Why is Cos_Angle_Of_Incidence present (the interference is
   physically a signed contribution to the ordinary reflection,
   which has no such factor)?
3. After doing the math (maximally simplified -- we don't
   IMHO need the awkward correct formula here), I came up with:

   u = u [+/-] { cos(s/lambda) 
                 * exp[-s^2*delta^2/(2*lambda^4)]
                 * Finish->Irid }

   where delta is the bandwidth of the color (probably a few dozen
   nanometers) and the [+/-] is a "-" for bubbles etc. and a
   "+" for layers on a medium with a higher IOR.
   This sign might be moved into Finish->Irid as well.
   The exp-term causes the iridescence to disappear for
   thicker layers (as it happens in real life).
   This result can be negative (I didn't check whether this is
   harmful in POV), but should give a positive total result if
   the reflectivity (i.e. keyword "reflection") is taken into
   account(and given a large enough value, of course).
   
   I guess that the authors had some ideas for using the
   more complicated formula, but I don't know.

4. The wavelengths which are supposed to be "correct" are
   given as 0.7,0.52,0.48 (which seems strange to me - 
   the spectra on www.isc.tamu.edu/~astro/color suggest
   values of 0.65,0.53,0.44 (i.e. the spots of the spectra
   shown there where only red, green, resp. blue pixels
   were active). Scaling the default values used in POV
   to red=0.65 gives 0.65,0.47,0.36 (which is
   red/cyanish blue/near UV).
   Did anybody experiment with various values triples
   and knows why the strange values look better?

[1] taking only these two is precise enough unless the
reflectivity of the top of the layer is close to 0.5 and
the one of its bottom is large, which is IMHO fulfilled
for most materials (including diamond).

Is anybody actively experimenting with this stuff whom I
might ask directly?

Ralf


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.