POV-Ray : Newsgroups : povray.beta-test : background alpha and anti aliasing : Re: background alpha and anti aliasing Server Time
30 Jun 2024 17:16:07 EDT (-0400)
  Re: background alpha and anti aliasing  
From: clipka
Date: 4 Jul 2010 06:24:18
Message: <4c306152$1@news.povray.org>
Am 04.07.2010 11:19, schrieb Mr:
> Hi, I am using a background with transmit to 1 in PNG format and it behaves
> exactly like I want it to (it's colored, and it's removable). I just didn't find
> how to remove the white outline I get when using anti aliasing?

In short: You can't. Not with beta 38.

The PNG file format is specified to use what is called straight - or 
non-premultiplied - alpha. In effect, this means that if you try to 
remove the alpha channel by simply ignoring it, all semi-transparent 
areas get overly bright. Instead, the software post-processing the image 
would have to properly compose it against a black background (= multiply 
color by alpha) to get what you probably expect.

Some other image file formats, such as OpenEXR and TIFF, officially use 
associated - or premultiplied - alpha, which means that the data is 
stored in the file already pre-composed against a black background, so 
simply ignoring alpha would indeed give what you'd expect. 
Unfortunately, POV-Ray doesn't do TIFF output, and OpenEXR isn't 
widespread yet (and it is allegedly typically used in straight alpha 
mode in violation of the specs).

POV-Ray 3.6 got that alpha thing pretty messed up, always writing 
associated alpha no matter what the file format (effectively getting 
semi-transparency too dark with PNG and TGA format), while at the same 
time always expecting straight alpha for all image input files 
(effectively getting semi-transparency too dark with TIFF format). This 
has been changed with beta 38.


Post a reply to this message

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