|
When light passes through a surface either into or out of a dense medium
the path of the ray of light is bent. Such bending is called
refraction. The amount of bending or refracting of light depends upon
the density of the material. Air, water, crystal and diamonds all have
different densities and thus refract differently. The index of
refraction or ior value is used by scientists to describe the
relative density of substances. The ior
keyword is used in
POV-Ray in the interior
to turn on refraction and to specify the
ior value. For example:
object { MyObject pigment {Clear } interior { ior 1.5 } }
The default ior value of 1.0 will give no refraction. The index of refraction for air is 1.0, water is 1.33, glass is 1.5 and diamond is 2.4.
Normally transparent or semi-transparent surfaces in POV-Ray do not refract
light. Earlier versions of POV-Ray required you to use the
refraction
keyword in the finish
statement to turn on
refraction. This is no longer necessary. Any non-zero ior
value
now turns refraction on.
In addition to turning refraction on or off, the old refraction
keyword was followed by a float value from 0.0 to 1.0. Values in between 0.0
and 1.0 would darken the refracted light in ways that do not correspond to
any physical property. Many POV-Ray scenes were created with intermediate
refraction values before this bug was discovered so the feature has been
maintained. A more appropriate way to reduce the brightness of refracted
light is to change the filter
or
transmit
value in the colors
specified in the pigment statement or to use the fade_power
and fade_distance
keywords.
See "Attenuation".
Note: neither the ior
nor refraction
keywords cause the
object to be transparent. Transparency only occurs if there is a non-zero
filter
or transmit
value in the color.
The refraction
and ior
keywords were originally
specified in finish
but are now properly specified in
interior
. They are accepted in finish
for backward compatibility and generate a warning message.
|