POV-Ray : Newsgroups : povray.newusers : Seeing artifacts when too many translucent surfaces overlap : Seeing artifacts when too many translucent surfaces overlap Server Time
29 Jul 2024 14:16:47 EDT (-0400)
  Seeing artifacts when too many translucent surfaces overlap  
From: White Ryder
Date: 15 Sep 2005 22:30:01
Message: <web.432a2d2e64f03c89fc5d75160@news.povray.org>
Below is simple code that creates a 2D array of identical translucent boxes.
 When I look at the array from such an angle that I'm looking through
several surfaces, I see opaque artifacts.  Even stranger: The color of the
artifacts gets *darker* as I increase the transmit value (i.e. make the
objects more transparent).  If I decrease the transmit value, making the
objects more opaque, the dark artifacts go away.  However, I don't want
less translucent objects!

Is there any way to generate multiple translucent objects without producing
this problem?  I'm running POV-Ray 3.6.1a.icl8.win32 under Win XP Pro.

Thanks!
White Ryder

  #include "colors.inc"

  background { color 2*MidnightBlue }

  camera
  {
    location <0, 2, -6>
    look_at  <0, 1,  0>
  }

  light_source { < -2,   4, -6>  color 1.5*White }


  // Basic translucent box
  #declare TBox =
  box
  {
    <-1,-1,-1>, < 1, 1, 1>

    no_shadow
    pigment { color 2*White transmit 0.9}
  }

  // Create 2D array of TBoxes
  #declare X_spacing = 4;
  #declare Z_spacing = 3; // see artifact when spacing>2; when spacing=2
faces coincide, no artifact

  #declare Num_Xs=2;
  #declare Num_Zs=3;


  #declare TArray=
  union
  {
    #declare Z_index=0;
    #while (Z_index<Num_Zs)

      #declare X_index=0;
      #while (X_index<Num_Xs)

        object
        {
          TBox
          translate x*X_spacing*X_index
          translate z*Z_spacing*Z_index
        }

        #declare X_index = X_index + 1;
      #end

      #declare Z_index = Z_index + 1;
    #end
  }

  // Display result
  object
  {
    TArray
    translate x*-2
  }


Post a reply to this message

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