POV-Ray : Newsgroups : povray.beta-test : Alpha output with AA problems? : Alpha output with AA problems? Server Time
30 Jul 2024 00:23:33 EDT (-0400)
  Alpha output with AA problems?  
From: Slime
Date: 8 Feb 2002 17:36:23
Message: <3c6452e7$1@news.povray.org>
Consider the following code, rendered with +A0.99:

camera {
 location 0
 look_at z
}
light_source {
 0 rgb 1
}

plane {
 -z,-1
 pigment {
  bozo scale .1
  color_map {
   #declare col = 0;
   [0 rgbt <col,col,col,0>]
   [1 rgbt <col,col,col,1>]
  }
 }
}
background {rgb .5}

When rendered with or without alpha output (to PNG), the statistics say
there was one sample per pixel (no pixels were AA'ed, as can be expected).

However, if you change #declare col = 0; to #declare col = 1;, and render
with alpha_output, many pixels are AA'ed, which you can see since there is
much more than one sample per pixel on average.

There should be no difference in the number of pixels anti-aliased, since
the RGB values of each pixel all have a difference of zero, regardless of
the value of col, and the difference in transparency between pixels doesn't
vary when you change col.

It's not a problem in this image, but it was sure a problem when I was
trying to output a 6000x2250 image of clouds on a transparent background
with a spherical camera, for use in my sky_spheres.


Confirmation?


While we're on the topic, perhaps section "5.2.6.4  Anti-Aliasing Options"
of the docs should have the line

diff = abs(r1-r2) + abs(g1-g2) + abs(b1-b2)

changed to

diff = abs(r1-r2) + abs(g1-g2) + abs(b1-b2) + abs(alpha1-alpha2)

- 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.