| 
  | 
I probably wouldn't call this a bug, but this behaviour is kinda wierd. Just
wanted to throw this one out to the community to prevent other people from
running into the same issue.
I was trying to simulate multi layer glass like used for large aquariums or for
bullet proof glass.
Problem:
When Creating two transparent boxes that are 100% adjacent to each other the
refraction gets calculated wrong. I don't know exactly what is going on, the
light gets somehow refracted permanently into a really wierd direction.
Solution:
A small gap between the two sheets of glass solves the problem.
Does anyone have a explaination or a better solution for this?
Thanks!
Andi
Here a short example script for illustration:
#CODE##########################################################################
global_settings {max_trace_level 256}
camera {right x*image_width/image_height location  <0,1.6,-3> look_at   <0,0,0>}
light_source { <500,500,150> color rgb 1.3 }
plane { y, -1.1 texture { pigment { checker color rgb 1 color rgb <0,0,0> scale
0.5} finish{ diffuse 0.8ambient 0.1 }}}
#declare frame=
difference {
box {
  <-.65, -1.05, 0> < .65,  1.05,  .2>
    material { texture {pigment {rgb 0.2}}}
    }
box {
  <-.6, -1., -.1> < .6,  1.,  .4>
    material { texture {pigment {rgb 0.2}}}
    }
}
#declare sheet=
box {
  <-.6, -1, 0> < .6,  1,  .1>
    material {
       texture {pigment {rgbt 1} finish { ambient 0.0 diffuse 0.05 specular 0.6
roughness 0.005
       reflection { 0.001, .1 fresnel on } conserve_energy}}
       interior { ior 1.5 fade_power 1001 fade_distance 0.9 fade_color
<0.5,0.8,0.6>}
             }
}
// 0 distance between two glass sheets of double layer window
union{
object {frame}
object {sheet}
object {sheet translate <0,0,.1>}
rotate <0,-30,0>
translate <-.8,0,0>
}
// with tiny gap of 0.0001 in between
union{
object {frame}
object {sheet}
object {sheet translate <0,0,.1001>}
rotate <0,30,0>
translate <0.8,0,0>
}
 Post a reply to this message 
 | 
  |