POV-Ray : Newsgroups : povray.general : How does POV handle IORs? : Re: How does POV handle IORs? Server Time
6 Aug 2024 19:28:59 EDT (-0400)
  Re: How does POV handle IORs?  
From: Ron Parker
Date: 29 Jan 2002 19:38:51
Message: <slrna5eg4v.l4n.ron.parker@fwi.com>
On Tue, 29 Jan 2002 23:46:26 +0100, Rune wrote:
> "Warp" wrote:
>>   AFAIK povray always remembers what is the current
>> ior of the space the current ray is travelling.
> 
> But how is the ior of the current space defined?
> 
> If object A has ior 1.3 and object B ior 1.5 and a ray goes like this:
> 
> enter A
> enter B
> *
> leave A
> leave B
> 
> ...then what is the ior in the space marked by * ?

1.5.  The important question, believe it or not, is what is the IOR 
between "leave A" and "leave B".  I actually had to look this one up, 
and I think the behaviour changed between 3.1 and 3.5.

Here's the map of how it works:

IOR
  
1.0  
    enter A
1.3  
    enter B
1.5  
    leave A
1.5  (the IOR of the remaining "innermost" object)
    leave B
1.0  

Here's what happens when the water is scaled slightly larger than the inside
profile of the glass:

1.0   air (inside: air)
     enter glass
1.5   glass (inside: air glass)
     enter water
1.3   water (inside: air glass water)
     exit glass
1.3   water (inside: air water)
     enter glass
1.5   glass (inside: air water glass)
     exit water
1.5   glass (inside: air glass)
     exit glass
1.0   air (inside: air)

As you can see, this is preferable to the case where the water is slightly
smaller than the inside of the glass:

1.0   air (inside: air)
     enter glass
1.5   glass (inside: air glass)
     exit glass
1.0   air (inside: air)
     enter water
1.3   water (inside: air water)
     exit water
1.0   air (inside: air)
     enter glass
1.5   glass (inside: air glass)
     exit glass
1.0   air (inside: air)

This gives extra opportunities for TIR to occur, at the first glass->air 
transition and at the water->air transition.  This gives your glass a
silvery sheen like it would have if - surprise! - you had an air bubble 
between the glass and the water.

The way it's done means you only have one IOR transition at each interface,
even though you intersect two surfaces.

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

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