POV-Ray : Newsgroups : povray.newusers : Seeing artifacts when too many translucent surfaces overlap Server Time
29 Jul 2024 12:15:33 EDT (-0400)
  Seeing artifacts when too many translucent surfaces overlap (Message 1 to 4 of 4)  
From: White Ryder
Subject: Seeing artifacts when too many translucent surfaces overlap
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

From: nomail
Subject: Re: Seeing artifacts when too many translucent surfaces overlap
Date: 15 Sep 2005 22:40:00
Message: <web.432a2fe17848af12dc13759e0@news.povray.org>
"White Ryder" <nomail@nomail> wrote:
> 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.

http://www.povray.org/documentation/view/3.6.1/264/


Post a reply to this message

From: Alain
Subject: Re: Seeing artifacts when too many translucent surfaces overlap
Date: 16 Sep 2005 17:40:27
Message: <432b3bcb$1@news.povray.org>
White Ryder nous apporta ses lumieres en ce 2005-09-15 22:25:
> 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
> 
You are reaching the max_trace_level. When the boxes are more opaque, the adc_bailout
kiks in giving 
you a color.
Add this line:
#global_settings{max_trace_level 15}
Adjust the value up until you have no more black spots. You can calculate the required
value easily. 
Count the number of boxes you have, multiply by 2 (each box have 2 surfaces) then add
1 for the 
backbround or whatever is behind all the boxes.
Read section 2.3.3.7 Max_Trace_Level in the documentation (or read it again).

Alain


Post a reply to this message

From: White Ryder
Subject: Re: Seeing artifacts when too many translucent surfaces overlap
Date: 17 Sep 2005 20:45:01
Message: <web.432cb7a77848af12fc5d75160@news.povray.org>
Thank you very much for your help!  That fixed the problem.


Post a reply to this message

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