POV-Ray : Newsgroups : povray.advanced-users : Diamond material : Re: Diamond material Server Time
29 Jul 2024 02:25:59 EDT (-0400)
  Re: Diamond material  
From: Matti Karnaattu
Date: 22 Apr 2003 11:35:11
Message: <web.3ea560dd87eb1c75bef0bd7d0@news.povray.org>
>>To calculate correct dispersion value we need several ior values and the
>>light wavelenghts used to measure ior values to approximate dispersion value.

>One problem.  POV-Ray 3.5 doesn't support that.

I know. But that doesn't take out wavelengths from Dispersion approximation.
Only calculation is more complex.

>You simply specify an IOR and a dispersion. And as I said, and as you
>conceded, ior will range from ior/sqrt(disp) to ior*sqrt(disp), which means
>disp = max_ior/min_ior.

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.

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


Post a reply to this message

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