POV-Ray : Newsgroups : povray.unix : Confusion about the index of refraction : Re: Confusion about the index of refraction Server Time
29 Apr 2024 23:22:48 EDT (-0400)
  Re: Confusion about the index of refraction  
From: Chaanakya
Date: 17 Jul 2012 12:20:00
Message: <web.5005900d3f1594627f523b7e0@news.povray.org>
"Chaanakya" <nomail@nomail> wrote:
> clipka <ano### [at] anonymousorg> wrote:
> > Am 17.07.2012 14:54, schrieb Chaanakya:
> > > I've been trying to figure this out for a while.  Let's say one specifies an ior
> > > of 1.5 (in the interior {} block).  Can't POV-Ray automatically calculate the
> > > reflectance and transmittance?  It knows the angle of the incident light and the
> > > index of refraction of the two media.  Even with the fresnel keyword, however,
> > > POV-Ray still requires me to manually calculate and plug in the reflectance and
> > > transmittance.  Am I missing something?
> >
> > (1) Historical reasons; early versions didn't have the fresnel keyword,
> > and instead required you to tweak various parameters until the result
> > looked reasonably ok. The parameters are still there.
> >
> > (2) The fresnel formulae for reflectance and transmittance are correct
> > for ideal, perfectly smooth surfaces, but real surfaces aren't that way;
> > a surface with plenty of microscopic scratches, for instance, will
> > exhibit a mix of specular reflection (from light rays that hit undamaged
> > areas) and lamtertian diffuse reflection (from rays that hit a scratch).
> > Lambertian law would also imply that in order to reduce the specular
> > reflections on LCD displays you'd have to blur them, but researchers
> > recently developed a surface microstructure (at below-wavelength scale)
> > that will actually /suppress/ reflections.
> >
> > (3) The fresnel formulae are correct for single interfaces, but real
> > surfaces frequently involve some coating, making it a stack of multiple
> > interfaces; it is much easier (in terms of geometric modelling and/or
> > computational effort) to handle such surfaces with a tweaked
> > single-interface model, rather than simulate the interactions between
> > the material layers.
> >
> > (4) Manually calculating reflectance and transmittance for an ideal
> > surface shouldn't be necessary if you use both fresnel and conserve_energy.
> >
> >
> > (BTW, is there any reason you ask this in the unix-specific newsgroup?)
>
> 1) Okay. I understand
>
> 2) For my application, I'm assuming that the surface is perfectly smooth, so as
> long as POV-Ray uses the fresnel equations, that's fine by me.
>
> 3) I am again assuming that there is no coating on those interfaces and am
> layering slabs in order to force computation of interactions between the layers,
> so this is also fine.
>
> 4) I have found that if I only specify the IOR, conserve_energy, and fresnel
> (with no pigment { transmit N.N } block), the object looks black.  This is the
> one thing I don't understand.
>
> Also, no, there is no specific reason - I just have gotten pretty good responses
> from the folks over here, so I decided to post here :)
>
> Sincerely,
>
> Chaanakya

For example, take this block of code:

#version 3.6;
#include "colors.inc"

global_settings {
  max_trace_level 256
  ambient_light White
  assumed_gamma 1.0
}

camera {
  location <0,5,0>
  look_at <0,0,0>
}

light_source {
  <0,1000,0>
  color Red
}

plane {
  y, -10
  pigment { hexagon Green, White, Blue }
}

box {
  <-1,-1,-1>,<1,1,1>
  finish {
    ambient 0
    diffuse 0
    conserve_energy
    reflection { fresnel on }
    specular 0
    roughness 0.001
  }
  interior {
    ior 1.5
  }
}

This should render as (essentially) a glass cube.  However, it comes out black.

- Chaanakya


Post a reply to this message

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