POV-Ray : Newsgroups : povray.newusers : refraction with multiple transparent objects behind eachother : Re: refraction with multiple transparent objects behind eachother Server Time
29 Jul 2024 00:34:54 EDT (-0400)
  Re: refraction with multiple transparent objects behind eachother  
From: Alain
Date: 17 Apr 2007 18:53:55
Message: <46255003$1@news.povray.org>
Shai nous apporta ses lumieres en ce 17-04-2007 15:35:
> Hi,

> I've got 2 transparent objects (one behind the other) standing inside a
> Cornell cube. Now when POVray shoots a ray through the scene, the ray hits
> the first object and is refracted. The ray then seems to hit the back wall
> of the Cornell cube without being refracted by the second object.

> So far I've tried setting max_trace_level to 20 (which should definitely be
> enough). I also tried putting both transparent objects very close to
> eachother, hoping that somehow the ray would get refracted by the second
> object too, but to no avail.

> Here's what my "code" looks like:

> //draw Cornell box

> //draw first transparent object
> mesh
> {
>   smooth_triangle
>   {
>     ...
>   }

>   scale -0.3*x
>   scale 0.3*y
>   scale 0.3*z
it's beter to use: scale<-0.3, 0.3, 0.3>. It also have the side effect of 
removing 6 warnings about scaling by zero.
>   translate -1*z
>   rotate 180*y
>   no_shadow

>   interior { ior 1.2}
>   pigment {color rgb <1, 1, 1, 1>}
It should be rgbt<1,1,1,1> (or rgbt 1) or rgbf<1,1,1,1> (or rgbf 1)
> }
(part removed)

> Does anyone know what could be wrong?


Are your meshes forming closed shapes? If a mesh forms a shaped surface without 
any back, any ray entering it get refracted and is considered traveling inside 
something with an ior of 1.2. Now, it encounter the second mesh, also having an 
ior of 1.2. So, the ior before and after the surface is the same resulting in no 
further refraction.

-- 
Alain
-------------------------------------------------
Remember, half the people you know are below average.


Post a reply to this message

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