POV-Ray : Newsgroups : povray.newusers : Problem with nested transparent objects : Re: Problem with nested transparent objects Server Time
18 Apr 2024 12:00:12 EDT (-0400)
  Re: Problem with nested transparent objects  
From: Kenneth
Date: 30 Mar 2018 21:25:00
Message: <web.5abee29733249f96a47873e10@news.povray.org>
There are some things in your test scene that are causing some visual confusion.

Your background(White} is the same color as your first sphere, so I changed the
background color to rgb .5. Then, when I render the scene with both spheres in
it, I see ONLY the 2nd (red) sphere; I don't see BOTH spheres.

Your light source is at the center of both spheres; did you mean to do that?

Max_trace_level can be left at its default of 5; that is not a problem when
there are only two translucent spheres in the scene.

I think that the use of  finish{Glass_Finish}  might be confusing the expected
result as well. That finish has  specular 1.0   in it (as well as 0.0 for both
ambient and diffuse.) Specular (and phong) highlights DO show up even on
'invisible' object surfaces. Also, I *think* that the srgbft color of your 2nd
sphere might be causing a problem:
                 srgbft <  0.9, 0.1, 0.2, 0.7, 1.0 >

The filter and transmit values *add up* to more than 1.0 here. My own test shows
that a supposedly 'invisible' sphere starts to become visible again, past that
1.0 threshold.

I reworked your scene to simplify it (and eliminated the 'filter' transparency
altogether.) Try animating this code; maybe 100 frames. The result I see is that
both spheres fade-in/fade-out the correct way.
-----------
#version 3.7;

#include "colors.inc"

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

light_source { <20,20,-40> color White }

background{rgb .4}

sphere {  // GREEN
    <0, 0, 0>, 1
    texture {
      pigment { srgbt < .5, 1.0, .5, clock > }
      finish{ambient .05 diffuse .95}
    }
  }

  sphere {  // RED
    <0, 0, 0>, 0.75
    texture {
      pigment { srgbt <  0.9, 0.1, 0.2, 1 - clock > }
      finish{ambient .05 diffuse .95}
    }
  }


Post a reply to this message

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