|
|
I am working on a diamond cut. A while ago, in comparing ior.inc
dispersion with Lilysoft's SpectralRender ("Native dispersion v.
spectral render" in p.b.i), I noticed a discrepancy in the apparent
index of refraction of BK7 glass between the two renders. So, just to
make sure that wasn't a fluke, I tested both methods with a diamond prism.
The images are of a glowing rod viewed through the prism. I used black
body 6504 for the SpectralRender runs because the black body curve is
smoother in the violet area than D65; but I used rgb 1 (equivalent to
D65) for the native POV-Ray runs, because POV-Ray's dispersion algorithm
alters the hues of wavelengths for colored lights. The two whites are
very similar, but D65 has less violet. The SpectralRender output is
gamut-mapped to preserve hues. The environment for all renders was
centralized in an include file to guarantee consistency.
Image thru-pbi-diamond1.png shows my initial set of test runs. The
leftmost spectrum uses the dispersion value from consts.inc, and the
rightmost uses the dispersion value from ior.inc. I have not shown a
render of the IOR from consts.inc, because I've long considered that
value a typo, but if SpectralRender's detailed wavelength data are the
benchmark, it is clear that const.inc's dispersion value is not accurate
either.
But there is still a difference between ior.inc and SpectralRender in
the overall amount of refraction.
I took a look at their respective values for n. They are:
ior.inc SpectralRender
------- --------------
2.4170 2.4176
The SpectralRender value is that of spline S_IOR_Diamond at wavelength D.
That difference is too small to account for the discrepancy between the
renders. My next thought was, what if POV-Ray's dispersion algorithm
assumes that n is at a more central wavelength, say 550 mn? I tried ior
S_IOR_Diamond(550), and the result is the leftmost spectrum of image
thru-pbi-diamond2.png. But I had to take it down even further, to ior
S_IOR_Diamond(515), for a comparable match. That render is the
rightmost spectrum.
It didn't take long browsing ior.inc to find in the notes that n is
assumed to be at wavelength D. I am no expert at any of this, and my
ability to concentrate on *anything* (e.g., math, physics, SDL code) has
waned sharply since my days as a young tech nerd, so I was at a loss as
to what was going on.
But then I belatedly got the idea to render an image with no dispersion.
The result is the center panel of image thru-pbi-diamond3.png. The rod
does indeed match the center of the ior.inc spectrum (to the left) and
the D wavelength of the SpectralRender spectrum (to the right). It
appears the dispersion algorithm does assume that the IOR is for a
central wavelength, rather than for D. As for why I needed to go
shorter than 550 for a good visual match, my guess is the non-linear
correlation between refraction and wavelength.
Post a reply to this message
Attachments:
Download 'thru-pbi-diamond1.png' (47 KB)
Download 'thru-pbi-diamond2.png' (42 KB)
Download 'thru-pbi-diamond3.png' (32 KB)
Preview of image 'thru-pbi-diamond1.png'
Preview of image 'thru-pbi-diamond2.png'
Preview of image 'thru-pbi-diamond3.png'
|
|