POV-Ray : Newsgroups : povray.advanced-users : Diamond material Server Time
29 Jul 2024 06:21:02 EDT (-0400)
  Diamond material (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Retsam
Subject: Re: Diamond material
Date: 26 Apr 2003 00:45:04
Message: <web.3eaa0e4a87eb1c7534dff4bb0@news.povray.org>
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

From: Matti Karnaattu
Subject: Re: Diamond material
Date: 29 Apr 2003 16:20:04
Message: <web.3eaeddea87eb1c75bef0bd7d0@news.povray.org>
>But your value of 1.044 for the dispersion is WAY off.

I know. I pick that from charts because I create formula after you wrote how
POV-Ray calculate dispersion.

>          Index of
>  Colour  Refraction   Source Line    Wavelength
>
>  Red       2.407      Solar  B-line   687   nm
>  Yellow    2.417      Sodium D-line   589.3 nm
>  Violet    2.452      Solar  G-line   431   nm

Great chart! Is this full chart of diamond IORs? I really like to know all
values if you have to get more accurate values.

Using spline I can approximate IORs to formula from chart:

700nm   = ~2.407000000000000
555nm   = ~2.422824598862933
435.8nm = ~2.450762660918041

Using these values in my formula I get dispersion 1.03308938613443. At base
IOR 555nm approximated reflection is 0.401889.

Can you write all material IORs from the source you get those diamond IORs?
At least all gemstones?

I'm now working with material library with physically accurate materials and
I like to get more values to get perfect approximation. My aim is to get
the material library to part of POV-Ray distribution because large part of
POV-Ray original textures are outdated and useless in radiosity and HDR
scenes. Please help me to make POV-Ray better :)

Matti


Post a reply to this message

From: Ken
Subject: Re: Diamond material
Date: 29 Apr 2003 21:02:54
Message: <3EAF208B.65CB33DE@pacbell.net>
Matti Karnaattu wrote:

> Can you write all material IORs from the source you get those diamond IORs?
> At least all gemstones?

See - http://news.povray.org/povray.text.scene-files/16348/

-- 
Ken Tyler


Post a reply to this message

From: Ken
Subject: Re: Diamond material
Date: 29 Apr 2003 21:05:10
Message: <3EAF2113.67BE0DCF@pacbell.net>
Ken wrote:
> 
> Matti Karnaattu wrote:
> 
> > Can you write all material IORs from the source you get those diamond IORs?
> > At least all gemstones?
> 
> See - http://news.povray.org/povray.text.scene-files/16348/

Ooops, try this instead - http://news.povray.org/povray.binaries.utilities/15709/

-- 
Ken Tyler


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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