POV-Ray : Newsgroups : povray.general : Alpha channel problem with Media's Server Time
15 Nov 2024 05:19:19 EST (-0500)
  Alpha channel problem with Media's (Message 1 to 3 of 3)  
From: Mathias Broxvall
Subject: Alpha channel problem with Media's
Date: 8 Mar 1999 04:28:42
Message: <36E3984A.5D01165F@ida.liu.se>
Hello!

I recently tried to render a few explostions for a friend of mine
who is making a (small) freeware computer game. I thought it would be 
possible to make a standard media object (sphere with some flames in it) 
and render it with the +FN +UA flags. Ie saving an alpha channel so that
the explostion can be overlapped on the games other graphics.

However it seems like povray either makes the complete picture
transparent (ignoring the flames) or makes nothing transparnt.
In the first case i used:
sphere { <0,0,0>,5 pigment {color rgbt <1,1,1,1>} hollow interior{....}}
and in the second case:
sphere { <0,0,0>,5 pigment {color rgbf <1,1,1,1>} hollow interior{....}}
My explanation of this is that povray (in the first case) sees the 
sphere as a completly transparent object (it is!) and therefore sets the
alpha channel to transparent - ignoring whatever is in the interior.
And in the second case the sphere simply isn't transparent....

Question: How do I circumvent this? Is this a (un)wanted feature of
povray or a bug?

I have had some planes of calculating the alpha channel with a separate
program
I'll write - but would rather not have to do that. My somewhat tedious
way of
calculating a alpha channel would be to render the picture with two
different
backgrounds (rgb 0 / rgb 1) and see what pixels changed and record that
in the
alpha channel. I'd prefer not to have to do that....

/ Mathias Broxvall


Post a reply to this message

From: Margus Ramst
Subject: Re: Alpha channel problem with Media's
Date: 8 Mar 1999 05:44:11
Message: <36E3A9FC.1ECA23D1@peak.edu.ee>
I haven't done an alpha channel image of a media. But if it doesn't work, this
is what you can do: render the media on a black background, with a
black-and-white colour map. Where the media is denser, it is brighter. Less
dense - darker. Save this at 8 bpp and you've got your alpha image.
This is untested, but it should work just fine.

Margus

Mathias Broxvall wrote:
> 
> Question: How do I circumvent this? Is this a (un)wanted feature of
> povray or a bug?
> 
> I have had some planes of calculating the alpha channel with a separate
> program
> I'll write - but would rather not have to do that. My somewhat tedious
> way of
> calculating a alpha channel would be to render the picture with two
> different
> backgrounds (rgb 0 / rgb 1) and see what pixels changed and record that
> in the
> alpha channel. I'd prefer not to have to do that....
> 
> / Mathias Broxvall


Post a reply to this message

From: Mathias Broxvall
Subject: Re: Alpha channel problem with Media's
Date: 8 Mar 1999 05:54:24
Message: <36E3AC60.DB1FA5F4@ida.liu.se>
Margus Ramst wrote:
> 
> I haven't done an alpha channel image of a media. But if it doesn't work, this
> is what you can do: render the media on a black background, with a
> black-and-white colour map. Where the media is denser, it is brighter. Less
> dense - darker. Save this at 8 bpp and you've got your alpha image.
> This is untested, but it should work just fine.
>

Thanks, thats a simple solution. I fell silly not figuring that one
out... 

/ Mathias


Post a reply to this message

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