POV-Ray : Newsgroups : povray.advanced-users : Alpha-transparent scattering media overlay problem. : Re: Alpha-transparent scattering media overlay problem. Server Time
5 Jul 2024 15:07:07 EDT (-0400)
  Re: Alpha-transparent scattering media overlay problem.  
From: Tim Attwood
Date: 26 Oct 2007 17:45:19
Message: <47225fef@news.povray.org>
> I know.  The problem is that when it renders, the whole image is 
> transparent
> (checker) except for the region where the media box is.  It is mostly
> transparent (e.g. the lit areas look normal), but the parts that arent lit
> are a dark grey color, instead of being completely transparent.   So you
> end up with a box-shaped grey artifact instead of just the lit areas (e.g.
> name 'halo').
>
> If you run the example code I posted without the plane, and alpha on, 
> you'll
> see what I mean.

Yes, that's the way it's supposed to be, the media interacts with the
camera rays, scattering some of them. I can see what you want though.
You want an emission media in a text container...

// Haze material
#declare haze2_Mat = material {
   texture {
      pigment {rgbt <1,1,1,1>}
   }
   interior {
      media {
         emission rgb <0.235,0.596,1>
         density {
            gradient y
            color_map {
               [0.0 rgb 1]
               [0.25 rgb 0.3]
               [0.40 rgb 0.0]
               [1.0 rgb 0.0]
            }
            scale 2
         }
      }
   }
};

// Haze container
#declare ghost2 = text {
   ttf "arial.ttf" "Ghost2" 2.5, 0
   scale 1.14 // fudge to size of text on ground
   rotate <90,-90,0>
   translate <0.25,0.5,0.6>
   rotate <0,-10,0>
   translate <0,2,0.2>
};

// Haze
object {
   ghost2
   hollow
   material {haze2_Mat}
}


Post a reply to this message

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