POV-Ray : Newsgroups : povray.advanced-users : Raytracing theory in Povray : Re: Raytracing theory in Povray Server Time
23 Jun 2024 22:54:51 EDT (-0400)
  Re: Raytracing theory in Povray  
From: clipka
Date: 10 Mar 2018 04:52:19
Message: <5aa3aad3$1@news.povray.org>
Am 09.03.2018 um 15:45 schrieb muyu:
> Hi,
> In Povray, the optical properties of each surface can be set by ambient, diffuse
> and specular. This is very flexible but only single value is allowed over
> color-channels. As a matter of fact, the optical properties of object often
> differs over wavelength or colors. I am wondering what's the assumption in
> Povary to deal with this. It will be great if you could recommend a reference to
> describe the raytracing theory used in Povray. Thanks a lot in advance.

Actually, in real life the wavelength-dependent effects are pretty few:

(1) Different absorption and scattering coefficients in the material itself:

In most materials (specifically dielectrics), light actually penetrates
a tiny distance into the bulk of the object, scatters around a bit in
there, and either exits again nearby or gets absorbed along the way.
Three things can be wavelength-dependent here: (a) the distance a light
ray travels on average before being absorbed, (b) The distance a light
ray travels on average between scattering events, and (c) the
directionality of those scattering events.

At a large scale however, you'll only see the combination of all these
effects at work, most dominantly the ratio between (a) and (b), which
gives the material its apparent colour. This is modeled in POV-Ray via
the pigment.

For a more precise model suitable for realistic close-ups, POV-Ray
provides SSLT, where besides the ratio (again via pigment) you also
specify the effects' absolute values on a per-colour-channel basis. (c)
is currently not modeled.

(2) Different refractive indices:

In transparent materials, the refractive indices can vary slightly
between wavelengths, causing a change in the refraction angle. This is
modeled in POV-Ray via the "dispersion" setting.

Besides that, technically wavelength-dependent refractive indices also
affect how much light enters the material vs. how much light is
reflected (see Fresnel's law); however, this effect is miniscule for all
real-life materials.

(3) Interference in thin-film coatings:

Some materials are coated with a thin layer of another material; if the
thickness of the coating is reasonably uniform and close to the
wavelength of visible light, destructive interference occurs for some
wavelengths but constructive interference for others, affecting (a) how
much light traverses the coating to reaches the bulk of the material,
and (b) how much is reflected back.

For single-layer coatings with slight variations in thickness, you'll
get a rainbow effect (example: oil on water); in such cases, POV-Ray can
approximately model (a) using the `irid` (iridescence) feature. (b) is
currently not modeled.

Some objects are coated with a series of extremely uniform layers, such
as anti-reflex coating on camera lenses; in such cases, POV-Ray can
approximately model (b) using a colour instead of a scalar as the
reflection parameter. The effect on (a) is usually quite miniscule, but
could be approximated by slightly tweaking the pigment colour.

(4) Metals:

Metals behave entirely differently: Here, light does not enter the bulk
of the material, but rather some wavelengths are absorbed at the surface
while all others are reflected.

This can be modeled pretty well using the `metallic` setting for both
highlights and reflections, and choosing a suitable pigment.

(5) Diffraction:

When a surface has a regular structure and the size of the structure is
near the wavelength of visible light, this causes interference patterns,
messing up the directions at which light is reflected or refracted. This
effect also varies with wavelength, causing rainbow-like effects. (Think

Currently, this effect can not be modeled at all in POV-Ray.

To my knowledge, that about wraps it up as far as wavelength-dependent
effects on light are concerned. If you can think of any other, let me
know and I can tell you if and how they can be modeled in POV-Ray.

Post a reply to this message

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