POV-Ray : Newsgroups : povray.beta-test : AA issue with transparent PNGs : AA issue with transparent PNGs Server Time
30 Jul 2024 18:12:43 EDT (-0400)
  AA issue with transparent PNGs  
From: Slime
Date: 9 Oct 2001 12:32:44
Message: <3bc326ac$1@news.povray.org>
Render this file as a PNG with +A0.1, and *don't* output transparency:

camera {
 location <0,0,-5>
 look_at 0
}

light_source {
 9999*<1,1,-1> // far, far away
 rgb 1
}

sphere {
 0,1
 pigment {rgbt <1,0,0,.7>}
 interior {
  media {
   emission 1
   density {spherical}
   density {bozo color_map {[0 rgb 0][1 rgb 1]} scale .2}
  }
 }
 hollow
}

background {rgb 0}

Notice that the upper left of the partially transparent sphere is mostly
black, and therefore blends into the background. Now rerender the image with
Output_Alpha=on. You'll notice that there is no antialiasing in the
upper-left of the sphere, if you look real closely. I think what's happening
here is that it recognizes that the color of the sphere at that point is
braely any different from the color of the background, less than .1, so it
doesn't anti-alias. I think it should take transparency into account, and
since the transparency of the background is zero, while it's .7 for the
sphere, and the difference is > .1, it should be anti-aliased to produce a
smooth edge.

Or perhaps I'm misdiagnosing the problem?

If anyone's too lazy to render the file for themselves, I'd be happy to post
it in binaries.images.

BTW, it'd be nice to have the ability to set the colors of the background
checker pattern when a transparent image is being rendered - sometimes it
could help fix contrast problems, help one see the image better as it's
being rendered. Oh, and thanks for fixing the problem with outputting the
background color in transparent images that happened in v3.1. =)

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

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