POV-Ray : Newsgroups : povray.advanced-users : Diamond material : Re: Diamond material Server Time
29 Jul 2024 02:34:32 EDT (-0400)
  Re: Diamond material  
From: Retsam
Date: 10 Apr 2003 15:05:07
Message: <web.3e95c02987eb1c752a3ff2e70@news.povray.org>
Matti Karnaattu wrote:
>Formula to calculate
>material dispersion is different than (max_ior/min_ior). I don't remember
>correct formula now.

Actually, if I read the source code for POV-Ray correctly, (max_ior/min_ior)
is the dispersion.  When POV-Ray calculates the dispersion, it starts with:
        ior = ior /sqrt(disp);
        ior_mult = pow(disp, 1.0/(disp_nelems-1));

Then, in the dispersion loop, it does this:

          ior *= ior_mult;

The net result is that the IOR will range from ior/sqrt(disp) to
ior*sqrt(disp).

Assuming max_ior = ior*sqrt(disp), min_ior = ior/sqrt(disp), then
max_ior/min_ior = ior*sqrt(disp) / (ior/sqrt(disp)) = sqrt(disp)*sqrt(disp)
= disp

It's not the most realistic, because dispersion for many substances tends to
be lower in the red-yellow range, then increase significantly in the
green-violet range.  I liked the MegaPov patch, because you could specify a
dispersion palette.  This way, you could keep the red-yellow range narrow
and bright, and the green-violet range wide and dimmer, for more realism.


Post a reply to this message

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