|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'd like to do some compositing with images from POV-Ray using the
alpha channel in the TGA file. Unfortunately (and I can't believe
I'm the first to notice this, so I assume it's something I'm either
not understanding or doing wrong), it seems that the alpha channel
in the rendered image file is "reversed" from what it should be
(i.e. 0 instead of 255 and vice versa). I rendered a simple test
sphere, no specified background, one light, very simple. When I
call the image up, I find that there is a hole in the middle of the
image right where the sphere ought to be... but I can see the black
background with no problem.
I thought perhaps it was something about TGAs, so I converted the
file to a GIF. Same thing... a black background with a hole in the
image where the sphere should be, exactly backwards from what I
expected.
(BTW, I'm using ImageMagick and POV3.1g on a RH6 Linux system do
do all this.)
Can someone tell me what I'm doing wrong?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Steve Martin <sma### [at] usitnet> wrote:
>
> I'd like to do some compositing with images from POV-Ray using the
> alpha channel in the TGA file. Unfortunately (and I can't believe
> I'm the first to notice this, so I assume it's something I'm either
> not understanding or doing wrong), it seems that the alpha channel
> in the rendered image file is "reversed" from what it should be
> (i.e. 0 instead of 255 and vice versa).
The alpha value should be 0 if the pixel is fully transparent, 255 if
fully opaque, and the values in between for partial transparency -- is
this what you're getting?
(In other words, it's the opposite of the transparency component in an
rgbt colour specification.)
--
Jeff Lee shi### [at] gatenet http://www.gate.net/~shipbrk/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I had the same issue. Reverse the alpha channel and it will work just
fine.
Steve Martin wrote:
> I'd like to do some compositing with images from POV-Ray using the
> alpha channel in the TGA file. Unfortunately (and I can't believe
> I'm the first to notice this, so I assume it's something I'm either
> not understanding or doing wrong), it seems that the alpha channel
> in the rendered image file is "reversed" from what it should be
> (i.e. 0 instead of 255 and vice versa). I rendered a simple test
> sphere, no specified background, one light, very simple. When I
> call the image up, I find that there is a hole in the middle of the
> image right where the sphere ought to be... but I can see the black
> background with no problem.
>
> I thought perhaps it was something about TGAs, so I converted the
> file to a GIF. Same thing... a black background with a hole in the
> image where the sphere should be, exactly backwards from what I
> expected.
>
> (BTW, I'm using ImageMagick and POV3.1g on a RH6 Linux system do
> do all this.)
>
> Can someone tell me what I'm doing wrong?
--
Josh English
eng### [at] spiritonecom
ICQ: 1946299
"Stress is when you wake up screaming and realize you haven't fallen
asleep yet."
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 09 Dec 1999 09:22:47 -0500, Steve Martin <sma### [at] usitnet>
wrote:
>Can someone tell me what I'm doing wrong?
Nothing. POV treats alpha channels in the exact opposite manner to
what paint programs do. A POV generated image with an alpha channel
will work perfectly in POV but to use it properly in a paint program
you'll have to invert the alpha channel.
Peter Popov
pet### [at] usanet
ICQ: 15002700
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Nothing. POV treats alpha channels in the exact opposite manner to
> what paint programs do. A POV generated image with an alpha channel
> will work perfectly in POV but to use it properly in a paint program
> you'll have to invert the alpha channel.
Okay. Thanks. I'm glad it wasn't me. Is inverting the alpha channel
something I can do in POV-Ray, or am I going to have to figure out
how to do that in ImageMagick?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 09 Dec 1999 22:12:56 -0500, Steve Martin <sma### [at] usitnet>
wrote:
>> Nothing. POV treats alpha channels in the exact opposite manner to
>> what paint programs do. A POV generated image with an alpha channel
>> will work perfectly in POV but to use it properly in a paint program
>> you'll have to invert the alpha channel.
>
>Okay. Thanks. I'm glad it wasn't me. Is inverting the alpha channel
>something I can do in POV-Ray, or am I going to have to figure out
>how to do that in ImageMagick?
You can do it in POV but it will be a hack. Get all your scene in one
big union and give it a black pigment. Then render the scene. You'll
get... nothing :) Well, black is black, but at least the alpha channel
will be intact. Next thing to do is put this image on a plane of
ambient 1 and make it face an orthographic camera positioned so that
the transformed image_map fits perfectly. Put a white plane of ambient
1 behind this plane and render this scene in the resolution of the
original scene. This will make all "transparent" objects white.
If what you need is exactly the opposite (I don't remember by heart...
no, please people no, ok, I'll re-read jut leave me alooooone...
OUCH!), then the union I mentioned in the beginning should be of
pigment { White } and finish { ambient 1 } , and there should be no
need of the plane behind the image (because the default background is
black anyway).
Of course, if you're uing Linux, why not use the GIMP to do this? :)
Peter Popov
pet### [at] usanet
ICQ: 15002700
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> You can do it in POV but it will be a hack.
Yeah, that's pretty much a hack, all right. Guess I'll have to
get my lazy carcass in gear and learn Gimp. <grin>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3850F42D.4F6004B8@usit.net>, sma### [at] usitnet wrote:
> Yeah, that's pretty much a hack, all right. Guess I'll have to
> get my lazy carcass in gear and learn Gimp. <grin>
Maybe an invert_alpha command would be useful. I rarely use image_maps,
though, and have never used the alpha channel.
I will have to look at the source to see how hard it would be.
--
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Josh English wrote:
>
> I had the same issue. Reverse the alpha channel and it will work just
> fine.
>
> Steve Martin wrote:
>
> > I'd like to do some compositing with images from POV-Ray using the
> > alpha channel in the TGA file. Unfortunately (and I can't believe
> > I'm the first to notice this, so I assume it's something I'm either
> > not understanding or doing wrong), it seems that the alpha channel
> > in the rendered image file is "reversed" from what it should be
> > (i.e. 0 instead of 255 and vice versa). I rendered a simple test
> > sphere, no specified background, one light, very simple. When I
> > call the image up, I find that there is a hole in the middle of the
> > image right where the sphere ought to be... but I can see the black
> > background with no problem.
> >
> > I thought perhaps it was something about TGAs, so I converted the
> > file to a GIF. Same thing... a black background with a hole in the
> > image where the sphere should be, exactly backwards from what I
> > expected.
> >
> > (BTW, I'm using ImageMagick and POV3.1g on a RH6 Linux system do
> > do all this.)
> >
> > Can someone tell me what I'm doing wrong?
>
> --
>
> Josh English
> eng### [at] spiritonecom
> ICQ: 1946299
> "Stress is when you wake up screaming and realize you haven't fallen
> asleep yet."
I've used the alpha channel with PNG output and it worked fine.
The PNG file format allows for the alpha channel to represent
either transparency or opacity.
Cheers, PoD.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> > > not understanding or doing wrong), it seems that the alpha channel
> > > in the rendered image file is "reversed" from what it should be
> I've used the alpha channel with PNG output and it worked fine.
> The PNG file format allows for the alpha channel to represent
> either transparency or opacity.
Well, how 'bout that! I rendered out to a PNG file (no other
changes), and it worked like a charm. That solves my problem!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |