|
![](/i/fill.gif) |
Matti Karnaattu wrote:
>No. What is max_ior? and what is min_ior? Is it infrared or what? POV-Ray
>dispersion draws colors between ~400nm to ~800nm, so we must know IOR
>values wavelengths to approximate dispersion and base ior values.
Hey, you brought up max_ior and min_ior:
>Formula to calculate material dispersion is different than (max_ior/min_ior).
I was assuming you meant the maximum and minimum ior values that POV-Ray
would use, since we are discussing POV-Ray settings. And as a matter of
fact, in POV-Ray, the value of the dispersion IS the maximum IOR used
divided by the minimum IOR used, and as we've discussed, those values range
from ior/sqrt(disp) to ior*sqrt(disp).
>Correct way to do this is set base ior to 555nm because human eye is most
>sensitive 555nm light. To approximate dispersion, we need two other known
>IOR values to approximate shape of light spectrum. IOR at red light (700nm)
>and IOR at blue light (435.8nm). Now we have to solve dispersion value
>where red and blue light are near as possible their real position when
>POV-Ray draws spectrum. The formula is:
>
> D = (3*I555^4 - 3*(IRed*I555)^2 + 4*(IBlue*IRed)^2) / (4*(IRed*I555)^2)
>
>Where
>
>D = Dispersion value
>I555 = Material IOR at 555nm light
>IRed = Material IOR at 700nm light
>IBlue = Material IOR at 435.8nm light
>
>This formula uses IOR 555nm as green light and this is approximation.
>Problem is that it's very difficult to transform rgb values to wavelengths.
>Green light (546nm) is very near 555nm so the formula is still usable.
>
>Matti
>
Okay, we agree to some extent here. The ior-wavelength relationship is not
linear, so we need to do a best fit. I did not take this into account.
But your value of 1.044 for the dispersion is WAY off. You might want to
throw in a square root, since you've effectively squared the IORs in that
formula. That would give you a more realistic dispersion of about 1.022
(although I calculated something closer to 1.036 using your formula, not
1.044, so that would reduce to about 1.018, which is pretty close to what I
suggested in the first place).
Using 2.418 as the ior, and 1.044 as dispersion, that would give an IOR of
2.418*sqrt(1.044), or 2.471, for violet, and an IOR of 2.418/sqrt(1.044),
or 2.366, for red. Both of those values aren't even close. If you want to
minimize the discrepancies, you would want to do a best linear fit of all
three points: red, gree, and blue. If you set green to its correct value,
and try to minimize the errors in red and blue, you will get a poorer
result than if you try to reduce the errors in all three. I won't bother
to figure out a precise answer, but a good shot from the hip would suggest
an ior of about 2.423, with 2.401 for red and 2.445 for violet, which gives
a dispersion of 2.445/2.401 = 1.0183. Let's compare those numbers to
Tolkowski's. I'll use your 2.418 for green instead of 2.417 for yellow,
and I added it to the chart for comparison:
Index of
Colour Refraction Source Line Wavelength
Red 2.407 Solar B-line 687 nm
Yellow 2.417 Sodium D-line 589.3 nm
Green 2.418 ??? 555 nm
Violet 2.452 Solar G-line 431 nm
Using these numbers, red is off by 2.407-2.401 = 0.006, yellow/green is off
by 2.418-2.423 = -0.005, and violet is off by 2.452-2.445 = 0.007. That's
about as good as you're going to get.
IOR = 2.423
Dispersion = 1.0183
Post a reply to this message
|
![](/i/fill.gif) |