POV-Ray : Newsgroups : povray.general : Weird artifacts from two superposed boxes perspective view : Weird artifacts from two superposed boxes perspective view Server Time
30 Jul 2024 12:30:35 EDT (-0400)
  Weird artifacts from two superposed boxes perspective view  
From: Mike
Date: 14 Jan 2009 16:55:01
Message: <web.496e5e11b6ff9551c9b9f9f00@news.povray.org>
I have been trying to model an experiment with two different liquids with
different indicies of refraction with one on top of the other.  With help from
this forum I am nearly able to get it modeled nicely.  However, It still does
not look correct when looking from a perspective view.  I have made a very
simple approximation.  Two objects with different refractive indices on top of
each other. Looking at it from a perspective view has some weird artifacts and
does not look correct.  I have been scratching my head for a while on this one.
 I tried merging, shifting up and down, etc.  I have posted my code below,
please take a look.

Thanks,
Mike

#include "colors.inc"
#include "textures.inc"

global_settings{max_trace_level 255}
camera {
     location  <0, 3, 160>
    look_at   <0, 3, 0>
    angle 2.5
      rotate <-30*1,-30*1,0>
   }
#declare MaterialAlcohol =
material {
  texture {
     pigment {
        color rgbf<1, 1, 1,1>
      }
 finish {
        ambient 0.0
        diffuse 0.0
         reflection {
          0.0, 1.0
          fresnel on
        }
        conserve_energy
        specular  0
        roughness 0
 }
  }
  }

  #declare HeavyLiquid =
material {
  texture {
     pigment {
        color rgbf<0.6, 0.5, 0,1>
      }
 finish {
        ambient 0.0
        diffuse 0.0
         reflection {
          0.0, 1.0
          fresnel on
        }
      conserve_energy
       specular 0
     roughness 0
 }
  }
  }


#declare AlcoholRegion=
box { <-1.899, 0.2, -1.899>, <1.899, 3, 1.899>
material { MaterialAlcohol }
  interior {
  ior 1.3800
}
 }

#declare HeavyLiquidRegion=
box { <-1.899, 3, -1.899>, <1.899, 5, 1.899>
material { HeavyLiquid }
 interior {
    ior 1.4
}
}

//merge{
object{AlcoholRegion}
object{HeavyLiquidRegion}
//}
light_source {
    <4, 8, 10>
    color White
  }
plane{y,0 texture{pigment{White}finish{ambient 0 diffuse 1}}}


Post a reply to this message

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