POV-Ray : Newsgroups : povray.advanced-users : How does POV-Ray handle IORs between two interfacing surfaces? : Re: How does POV-Ray handle IORs between two interfacing surfaces? Server Time
29 Jul 2024 02:19:46 EDT (-0400)
  Re: How does POV-Ray handle IORs between two interfacing surfaces?  
From: Gwen & Emory Stagmer
Date: 2 Apr 2003 22:10:41
Message: <3E8BA51F.B3457614@comcast.net>
You're absolutely right, that's the way it works.  It's a well known 
problem with all ray-tracers, not just POV.  One solution is to make
single-surface solids with meshs or triangles.  Since these have no
thickness, they have no second side for the ray to exit against and
transition from your 'glass' to 'air' before going to the 'water'.  
It's messy to create and still have all the solids you want, but
that's the best solution I know of...

Emory

Retsam wrote:
> 
> Maybe someone with more in-depth knowledge of the source code for POV-Ray
> can field this one.
> 
> I've been looking at the code, trying to figure out how POV-Ray handles a
> refracted ray as it passes from one object to another, such as from a glass
> bottle to the water in the bottle.
> 
> Assuming that I have a "water" object whose surface "exactly" matches the
> inside surface of the glass, I would expect the ray to transition from the
> IOR of the glass to the IOR of the water.
> 
> But from what I can tell from the source code, something bizarre will
> happen.
> 
> The ray will first enter the glass from the outside, going from ior 1 to ior
> 1.57, for example.  Then, in the Trace function, depending on whether
> Best_Intersection is the glass ending or the water starting, you will get
> one of two outcomes.  If it's the glass ending, the ray will go from ior
> 1.57 to 1.0.  Then the next Trace intersection will be with the water,
> going from ior 1.0 to ior 1.33.  Definitely wrong, as you will get TIR at
> angles as small as about 40 degrees, instead of the larger 57 degrees or so
> they should start at.
> 
> On the other hand, if the first intersection is with the water, it will go
> from ior 1.57 to 1.33 (the ior at the interface = 1.57/1.33), then as it
> leaves the glass, it will go from ior 1.57 to 1.33 again, sort of.  That
> is, it will refract twice using the same relative iors.
> 
> Am I reading something wrong here?  I've been looking for code that handles
> the coincident surfaces, but I cannot find it.
> 
> The only way I can see to get a realistic glass/water transition is to have
> the glass be solid and just put water inside it.  But what about at the
> surface of the water.  There would still be two transitions there.  When
> leaving the water, you would get either water-glass and glass-air, or
> glass-water and water-air, depending on whether it hit the end of the water
> first or the end of the glass first.  Vice-versa for entering the water
> from the surface.


Post a reply to this message

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