POV-Ray : Newsgroups : povray.general : Making Background transparent... : Re: Making Background transparent... Server Time
9 Aug 2024 09:07:44 EDT (-0400)
  Re: Making Background transparent...  
From: Rune
Date: 24 Sep 2000 07:37:23
Message: <39cde773@news.povray.org>
"Warp" wrote:
>   What is the correct behaviour?
>
>   For example, let's suppose that we are calculating a pixel
> which is located at the crossing of the edges of two objects.
>   One object is red (<1,0,0>) and takes 50% of the pixel area.
> The other object is green (<0,1,0>) and takes 25% of the pixel
> area. The last 25% of the pixel is background.
>   What should be the RGBA values for that pixel?

After the method *I* think is correct:

Colour: 0.67*red + 0.33*green => <0.67,0.33,0.00>

Alpha: 0.50*1 + 0.25*1 + 0.25*0 => 0.75

When you in a paint program put a background colour behind the image layer
the final colour value of the pixel will be like this:

image_colour*0.75 + background_colour*0.25

If the bg_colour is black the final colour will be: <0.50,0.25,0.00>
But if the background colour is white the colour will be: <0.75,0.50,0.25>

So no matter what colour you put behind your image the antialiasing will
work nicely without leaving any hint of what background colour you
originally used in POV-Ray. That is what I think is correct behaviour.

I'll make some images that shows what I mean and post them to
povray.binaries.images...

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated July 23)
/ Also visit http://www.povrayusers.org


Post a reply to this message

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