![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3C39cde782%40news.povray.org%3E/alpha.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <39cde782@news.povray.org> , "Rune" <run### [at] iname com>
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] povray org
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
And when outputting to png: +fn the original background doesn't even show
up!
-Simen.
"Rune" <run### [at] iname com> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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] spiritone com
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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] spiritone com
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |