On Tue, Jul 18, 2000 at 09:41:49PM -0400, Garry R. Osgood wrote:
> David Hodson wrote:
> > Example: render an rgba image. (I was using some PovRay output; I
> > presume it does a reasonable job.) Now create a flat colour
> > background in the Gimp, lay the rgba image on top, and try to get
> > a clean composite without black fringing. I don't think it can be
> > done,
> 
> It can't be done, in my opinion. What we surmise to be [R*A, G*A,
> B*A, A] Gimp assumes to be [R, G, B, A] and reads the color
> components as near black for near transparent regions.  That makes
> black fringing unavoidable.

The way I got around this was to regenerate my own "Alpha" channel by
re-rendering my PovRay scene in black-on-white. That is, white
background with all objects solid black. If I recall correctly, it was
just a matter of setting the "colour" of each object to black and
rendering with a very low quality setting. (erm, or maybe I did it in
white-on-black and inverted it ... in any case the same result)

This process gave me a white mask (b) for the background which could
then be multiplied with whatever image (i) I wanted "behind" the
PovRay scene. Adding this (b*i) to the premultiplied alpha image from
PovRay gave the correct visual result. Actually, come to think of it,
I didn't render the high-quality scene with any alpha at all. The
addition did it.

Cheers,

Tom

-- 
--   Tom Rathborne     [EMAIL PROTECTED]     http://www.aceldama.com/~tomr/
--  "We promise according to our hopes, and perform according to our fears."
--                                     -- Francois, Duc de la Rochefoucauld

Reply via email to