POV-Ray : Newsgroups : povray.newusers : Fresnel reflection from multi-layers Server Time
31 Oct 2024 22:19:16 EDT (-0400)
  Fresnel reflection from multi-layers (Message 1 to 6 of 6)  
From: Crippso
Subject: Fresnel reflection from multi-layers
Date: 10 Apr 2012 11:10:01
Message: <web.4f844cf1d1d24e6b60b91f590@news.povray.org>
Hi all

thanks for the help so far with Fresnel reflection and Photons. I have got some
accurate results for some simple tests.

I am trying now to get Povray to calculate the reflectance from a stack of two
materials stuck together with no air gap between them. One material has ior =
3.2, the other ior=1.5. Using Fresnel equations I estimate reflectance of this
structure to be ~36%.

Can povray handle fresnel reflection from this sort of structure, and if so, how
is it best to describe the two layers (I have tried union & merge but both do
not seem to give the results I expected).

Thanks
Stu


Post a reply to this message

From: Alain
Subject: Re: Fresnel reflection from multi-layers
Date: 10 Apr 2012 13:16:58
Message: <4f846b0a@news.povray.org>

> Hi all
>
> thanks for the help so far with Fresnel reflection and Photons. I have got some
> accurate results for some simple tests.
>
> I am trying now to get Povray to calculate the reflectance from a stack of two
> materials stuck together with no air gap between them. One material has ior =
> 3.2, the other ior=1.5. Using Fresnel equations I estimate reflectance of this
> structure to be ~36%.
>
> Can povray handle fresnel reflection from this sort of structure, and if so, how
> is it best to describe the two layers (I have tried union&  merge but both do
> not seem to give the results I expected).
>
> Thanks
> Stu
>
>

You have a coincident surface problem. Whenever 1 surfaces are at the 
same location, you can't reliably estimate the order in whitch they must 
be evaluated.
The end result is that for a given ray, you may evaluate the surface of 
the first object then of the second, but, for the next one, you may find 
yourself evaluating the surfaces in the oposite order. It's prety random 
and depends on floating point precision and rounding errors.

There are some attempt at finding a workable solution for that case, but 
it's not yet done.

The usual solution is to have a very thin gap between the surfaces. In 
this case, the finish of both surfaces need to be adjusted to have a 
lower reflection to compensate for having two reflecting surfaces.
Some will instead mage the two objects overlap by a very small amount.
The gap or overlaping is usualy set to less than 0.00001 unit.

Another possibility is to have only one surface from one object having 
an ior set to the difference between the two materials.

In your case, you can use ior = 1.7 for the high index material and 
remove the low index object. It may not be suitable as your ray may need 
to travel from the air, the low index material, the high index material 
then finaly back to the air.



Alain


Post a reply to this message

From: clipka
Subject: Re: Fresnel reflection from multi-layers
Date: 10 Apr 2012 14:32:45
Message: <4f847ccd$1@news.povray.org>
Am 10.04.2012 19:16, schrieb Alain:

> The usual solution is to have a very thin gap between the surfaces. In
> this case, the finish of both surfaces need to be adjusted to have a
> lower reflection to compensate for having two reflecting surfaces.
> Some will instead mage the two objects overlap by a very small amount.
> The gap or overlaping is usualy set to less than 0.00001 unit.

Both solutions will add surplus interfaces between materials, leading to 
extra reflections that don't occur in reality when the distance is small 
enough.

It might be possible to work around this problem by using a small 
overlapping area, and use a texture mapping approach for one of the 
objects, using a fesnel reflective finish at the air interface side but 
a non-reflective (and non-fresnel) finish at the side interfacing to the 
other object.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Fresnel reflection from multi-layers
Date: 10 Apr 2012 14:33:52
Message: <4f847d10$1@news.povray.org>
Crippso wrote:

> I am trying now to get Povray to calculate the reflectance from a stack of two
> materials stuck together with no air gap between them.

as Alain said, the usual recommendation is to just have a tiny gap
to avoid the coincident surface problem. I've wondered earlier about
the artefacts this might introduce, in particular, it should cause
total internal reflection when going from low ior material to air
that would not occur for the low ior to high ior transition.

Also see this thread

http://news.povray.org/povray.binaries.images/thread/%3C45cf36f7%40news.povray.org%3E

 From the total internal reflecion point of view you could
try to embed the high ior material inside the low ior material
(with only a very thin layer of low ior material on the side
that is supposedly the high ior to air transition).

But I have no idea if the fresnel reflections will add up
in a meaningful way.


Post a reply to this message

From: Crippso
Subject: Re: Fresnel reflection from multi-layers
Date: 10 Apr 2012 17:25:00
Message: <web.4f84a48af65d8fe3130037650@news.povray.org>
thanks guys, that was very helpful. I have taken on board your points and now
have a structure that avoids coincident interfaces by overlapping layers. I dont
need to start in air but I do need to end in it. I get around that problem by
adding strong absorption to a final air layer which stops the unwanted final
reflection.

My code is below and I think it is giving me reasonable results. However it is a
bit 'noisy'. Any ideas which settings could improve the uniformity of my result?

#default {finish {ambient 0 diffuse 0}}

global_settings
{
   assumed_gamma 1

   photons{count 9000000 max_trace_level 15 adc_bailout 0}

}

#macro PhotonTarget(Reflect, Refract, IgnorePhotons)
 photons {
  target
  reflection Reflect
  refraction Refract
  #if(IgnorePhotons) collect off #end
 }
#end

camera
{
   orthographic
   location <0,0,1>
   look_at  <0,0,-1>
   angle 90
}

light_source{<0,0,2.5>, 1 cylinder radius 10 falloff 10 tightness 0 point_at
<0,0,4> parallel}

object{

box
{
   <-100,-100,-2> <100,100,50>
   pigment{rgbt 1}
   finish
   {
     reflection{0,1 fresnel}
     conserve_energy
   }
   interior{ior 3.2 fade_distance 1000 fade_power 1000}
   PhotonTarget(yes, yes, no)
}

}

object{

box
{
   <-100,-100,8> <100,100,10.5>
   pigment{rgbt 1}
   finish
   {
     reflection{0,1 fresnel}
     conserve_energy
   }
   interior{ior 3.2 fade_distance 25 fade_power 1000}
   PhotonTarget(yes, yes, no)
}

}

object{
box
{
   <-100,-100,13> <100,100,14.5>
   pigment{rgbt 1}
   finish
   {
     reflection{0,1 fresnel}
     conserve_energy
   }
   interior{ior 2.68 fade_distance 1000 fade_power 1000}
   PhotonTarget(yes, yes, no)
}
}

object{
box
{
   <-100,-100,14> <100,100,15>
   pigment{rgbt 1}
   finish
   {
     reflection{0,1 fresnel}
     conserve_energy
   }
   interior{ior 1 fade_distance .01000 fade_power 1000}
   PhotonTarget(yes, yes, no)
}
}

disc
{
   <0,0,-1> <0,0,1> 100
   pigment{rgb 1}
   finish{diffuse 1.0}
}


Post a reply to this message

From: Crippso
Subject: Re: Fresnel reflection from multi-layers
Date: 10 Apr 2012 18:00:01
Message: <web.4f84acf6f65d8fe3130037650@news.povray.org>
ah, so it seems setting gather to something like

gather 2000,2000

helps to get a nice uniform result


Post a reply to this message

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