POV-Ray : Newsgroups : povray.beta-test : Output Alpha problem when exporting from blender : Re: Output Alpha problem when exporting from blender Server Time
6 Jul 2024 06:02:53 EDT (-0400)
  Re: Output Alpha problem when exporting from blender  
From: clipka
Date: 23 Mar 2010 21:54:20
Message: <4ba970cc$1@news.povray.org>
Warp schrieb:
> clipka <ano### [at] anonymousorg> wrote:
>> That means POV-Ray 3.7 /is/ actually doin' it plain wrong, as this 
>> behavior effectively constitutes writing premultiplied alpha. I don't 
>> know about TGA, but the PNG file format is explicitly specified to use 
>> /non/-premultiplied alpha. Which, when viewed with some piece of 
>> software that totally ignores the alpha channel, may look like crap for 
>> some scenes (e.g. a glass sphere on an opaque plane), but that's how the 
>> file format is specified.
> 
>   It's specified like that for a good reason. When you take a PNG with an
> alpha channel and overlay it on top of something else (eg. on an image
> manipulation program or on a web page), you get the proper behavior with
> respect to the alpha blending.

That's actually nonsense; for the purpose of overlaying it over 
something else, you'll have to multiply the colors with alpha anyway, 
then add it to the background multiplied by 1-alpha; no difference in 
suitability here, you can do that with premultiplied alpha just as well. 
Actually premultiplied alpha saves you a computational step here.

The reason why PNG is specified like this is instead that 
non-premultiplied alpha allows for retrieving the original color of a 
semi-transparent image without loss of precision, in case someone wants 
to reduce its transparency.

However, while this is generally a good idea, it only works when the 
object to be "opaquified" does not overlap any other objects.

Or, in other words: The benefit of non-premultiplied alpha over 
premultiplied alpha is that the former retains some more information. No 
more and no less.

>   POV-Ray 3.6 did this right.

I'm not saying anything else by now.


Post a reply to this message

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