POV-Ray : Newsgroups : povray.newusers : Problem with nested transparent objects : Problem with nested transparent objects Server Time
25 Apr 2024 19:24:49 EDT (-0400)
  Problem with nested transparent objects  
From: kai
Date: 30 Mar 2018 18:50:01
Message: <web.5abebe5d73e4ad374d9b10120@news.povray.org>
I want to create an animation where I fade an object out and another is faded in
in order to take the place of the first one.  I thought I could do this by
keying the t field to the clock, but it turns out that the inner object, which
is supposed to start out invisible, becomes visible as soon as it is inside the
other object.  Here is a still image sample demonstrating what happens:

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

global_settings {
  max_trace_level 16
  assumed_gamma 1.0
}
camera {
  location <0, 4, 4>
  look_at <0, 0, 0>
  right     x*image_width/image_height
  angle 45
}

light_source { <0, 0, 0> color White }

background { White }

sphere {
    <0, 0, 0>, 1
    texture {
      pigment { srgbft <  1.0, 1.0, 1.0, 0.7, 0.0 > }
      finish  { Glass_Finish }
    }
    interior { Glass_Interior }
  }

  sphere {
    <0, 0, 0>, 0.75
    texture {
      pigment { srgbft <  0.9, 0.1, 0.2, 0.7, 1.0 > }
      finish  { Glass_Finish }
    }
    interior { Glass_Interior }
  }



Now, if I comment out the first sphere, then the second one is invisible, as it
should be.  If I comment out the second sphere, the first is visible, as it
should be.  BUT, if *both* spheres are rendered, the second, red one, becomes
visible inside the first one.  This happens even if I change the interior to
hollow.  Increasing the max_trace_level does not seem to make a difference
either.

So, what should I properly do to get a fade-in/fade-out of nested translucent
objects?


Post a reply to this message

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