POV-Ray : Newsgroups : povray.binaries.images : Alpha Channel and Antialiasing Server Time
20 Aug 2024 02:18:14 EDT (-0400)
  Alpha Channel and Antialiasing (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Rune
Subject: Alpha Channel and Antialiasing
Date: 24 Sep 2000 07:37:38
Message: <39cde782@news.povray.org>
How should POV-Ray antialiase pixels when the alpha channel is used?
I think that it currently behave in an undesirable way.

Example:

(A) I render a white torus on a red background with AA on
    and alpha channel on too.

(B) In a paint program I want to put this background behind
    my POV-Ray image.

(C) Around my white torus there's a red halo - a leftover
    from the red background I originally used. I don't like that.

(D) Instead I think POV-Ray should produce images that works
    this way (like in image D). However, it won't be changed
    because the developers think it's better as it currently is
    (like in image C).

Now I've told you my opinion. What do *you* think? Should it be changed or
not?

Or even better: It could be optional. That should satisfy everyone. (Would
it affect the speed? I don't know.)

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


Attachments:
Download 'alpha.jpg' (14 KB)

Preview of image 'alpha.jpg'
alpha.jpg


 

From: Rune
Subject: Re: Alpha Channel and Antialiasing
Date: 24 Sep 2000 07:50:20
Message: <39cdea7c@news.povray.org>
I wrote:
> However, it won't be changed because the developers think
> it's better as it currently is

Sorry, I don't really know what the developers think. I *hope* they are
willing to change it or make it optional.

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

From: Kari Kivisalo
Subject: Re: Alpha Channel and Antialiasing
Date: 24 Sep 2000 08:06:48
Message: <39CDEE9C.A9E5E38C@kivisalo.net>
Rune wrote:

> (D) Instead I think POV-Ray should produce images that works
>     this way (like in image D). 

I agree. As a work around I render the image on grey bg and in Photoshop
do Select/Modify/Contract 1 pixel to the alpha channel. This eliminates
the bg from the edge of objects.


______________________________________________________________________
Kari Kivisalo                                  http://www.kivisalo.net


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Alpha Channel and Antialiasing
Date: 24 Sep 2000 13:17:22
Message: <39ce3722$1@news.povray.org>
In article <39cde782@news.povray.org> , "Rune" <run### [at] inamecom> 
wrote:

> How should POV-Ray antialiase pixels when the alpha channel is used?
> I think that it currently behave in an undesirable way.
>
> Example:
>
> (A) I render a white torus on a red background with AA on
>     and alpha channel on too.
>
> (B) In a paint program I want to put this background behind
>     my POV-Ray image.
>
> (C) Around my white torus there's a red halo - a leftover
>     from the red background I originally used. I don't like that.
>
> (D) Instead I think POV-Ray should produce images that works
>     this way (like in image D). However, it won't be changed
>     because the developers think it's better as it currently is
>     (like in image C).
>
> Now I've told you my opinion. What do *you* think? Should it be changed or
> not?
>
> Or even better: It could be optional. That should satisfy everyone. (Would
> it affect the speed? I don't know.)

What you are reporting looks like a bug, not a desired effect.  So you
should post it (only with a reference to this image) in povray.bugreports.


    Thorsten


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Simen Kvaal
Subject: Re: Alpha Channel and Antialiasing
Date: 25 Sep 2000 03:14:47
Message: <39cefb67$1@news.povray.org>
And when outputting to png: +fn the original background doesn't even show
up!

-Simen.

"Rune" <run### [at] inamecom> wrote in message
news:39cde782@news.povray.org...
> How should POV-Ray antialiase pixels when the alpha channel is used?
> I think that it currently behave in an undesirable way.
>
> Example:
>
> (A) I render a white torus on a red background with AA on
>     and alpha channel on too.
>
> (B) In a paint program I want to put this background behind
>     my POV-Ray image.
>
> (C) Around my white torus there's a red halo - a leftover
>     from the red background I originally used. I don't like that.
>
> (D) Instead I think POV-Ray should produce images that works
>     this way (like in image D). However, it won't be changed
>     because the developers think it's better as it currently is
>     (like in image C).
>
> Now I've told you my opinion. What do *you* think? Should it be changed or
> not?
>
> Or even better: It could be optional. That should satisfy everyone. (Would
> it affect the speed? I don't know.)
>
> 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

From: John VanSickle
Subject: Re: Alpha Channel and Antialiasing
Date: 25 Sep 2000 07:56:21
Message: <39CF3D65.AE1C05BA@erols.com>
Rune wrote:
> 
> How should POV-Ray antialiase pixels when the alpha channel is used?
> I think that it currently behave in an undesirable way.

How does POV-Ray determine the alpha channel setting to be output for
a given pixel?

I did some masking in my July IRTC entry.  To generate the masks I
textured all of the objects white with ambient=1, and set the background
to black.  I then converted the results of a GIF, and used that GIF as
the basis for a material_map.

Regards,
John


Post a reply to this message

From: Josh English
Subject: Re: Alpha Channel and Antialiasing
Date: 25 Sep 2000 16:08:25
Message: <39CFB0D9.EBB11692@spiritone.com>
I have a method for doing this, btw,on my site.

The demonstration is a bit dull:

http://www.spiritone.com/~english/cyclopedia/background.html

It at least gets rid of some of these steps

Josh

Rune wrote:

> How should POV-Ray antialiase pixels when the alpha channel is used?
> I think that it currently behave in an undesirable way.
>
> Example:
>
> (A) I render a white torus on a red background with AA on
>     and alpha channel on too.
>
> (B) In a paint program I want to put this background behind
>     my POV-Ray image.
>
> (C) Around my white torus there's a red halo - a leftover
>     from the red background I originally used. I don't like that.
>
> (D) Instead I think POV-Ray should produce images that works
>     this way (like in image D). However, it won't be changed
>     because the developers think it's better as it currently is
>     (like in image C).
>
> Now I've told you my opinion. What do *you* think? Should it be changed or
> not?
>
> Or even better: It could be optional. That should satisfy everyone. (Would
> it affect the speed? I don't know.)
>
> 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
>
>  [Image]

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

From: Rune
Subject: Re: Alpha Channel and Antialiasing
Date: 25 Sep 2000 16:51:58
Message: <39cfbaee@news.povray.org>
"Josh English" wrote:
> I have a method for doing this, btw,on my site.
>
> The demonstration is a bit dull:
>
> http://www.spiritone.com/~english/cyclopedia/background.html

It's a very nice technique, but not really related to the alpha channel.
Using the alpha channel lets you make a background for your POV-Ray image
*outside* POV-Ray, while your technique allows one to add a background image
*inside* POV-Ray. There's a big difference.

Greetings,

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 August 7)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Josh English
Subject: Re: Alpha Channel and Antialiasing
Date: 27 Sep 2000 11:05:34
Message: <39D20CBD.A7A57174@spiritone.com>
I know the difference, I was providing it as a grand work around to the general
problem. If you already have the image ready, you can add it to the scene with
my technique and not worry aobut the alpha channel. I'm not savvy enough in
programming to understand how POV-Ray does the Anti Aliasing and alpha channels,
so I fake it.

Josh

Rune wrote:

> "Josh English" wrote:
> > I have a method for doing this, btw,on my site.
> >
> > The demonstration is a bit dull:
> >
> > http://www.spiritone.com/~english/cyclopedia/background.html
>
> It's a very nice technique, but not really related to the alpha channel.
> Using the alpha channel lets you make a background for your POV-Ray image
> *outside* POV-Ray, while your technique allows one to add a background image
> *inside* POV-Ray. There's a big difference.
>
> Greetings,
>
> 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 August 7)
> / Also visit http://www.povrayusers.org

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

From: Alexander Enzmann
Subject: Re: Alpha Channel and Antialiasing
Date: 29 Sep 2000 08:22:46
Message: <39D48AD5.E86B5FC0@mitre.org>
Rune wrote:
> 
> How should POV-Ray antialiase pixels when the alpha channel is used?
> I think that it currently behave in an undesirable way.

It works the way it ought to.  When using alpha/opacity, you have four
channels in the image.  Three carry color, one carries alpha/opacity. 
Once you have collected together background color and object color into
a pixel (the three color channels), you can't (easily) separate them
back out.

The alpha channel only tells you the amount of contribution of the
background to the final pixel.  If you wanted to remove the background
color from the pixel, you would also need to know the color of the
background that got added in (three more channels in the image).

> 
> Example:
> 
> (A) I render a white torus on a red background with AA on
>     and alpha channel on too.

If you are going to do compositing, you should probably use a black
background.  That way there's no extraneous color contributions.

> 
> (B) In a paint program I want to put this background behind
>     my POV-Ray image.
> 
> (C) Around my white torus there's a red halo - a leftover
>     from the red background I originally used. I don't like that.

Then you shouldn't have used a red background.  However, since you know
the color you originally used for a background, you can remove it from
the image:
   - multiply the original background color by the alpha value
   - subtract from the pixel
   - hope there weren't any out of range values anywhere along the way.

> 
> (D) Instead I think POV-Ray should produce images that works
>     this way (like in image D). However, it won't be changed
>     because the developers think it's better as it currently is
>     (like in image C).

I disagree.  That would be different from almost every image processing
package in existence (besides not being possible without also storing
the entire background along with every image).

Xander


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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