|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |