|
|
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
|
|
|
|
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
|
|
|
|
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
|
|