POV-Ray : Newsgroups : povray.general : Media + Output_Alpha = ? Server Time
5 Nov 2024 07:20:05 EST (-0500)
  Media + Output_Alpha = ? (Message 1 to 10 of 10)  
From: Ole Laursen
Subject: Media + Output_Alpha = ?
Date: 28 Jun 1999 14:47:55
Message: <3777c35b@news.povray.org>
Hi!

Have anyone here succeded in producing a TGA with alpha channel of a scene
with a media object?

I can't get it to work; if I place the media inside a sphere with the
pigment "rgbt 1", nothing show up in the alpha channel. If I use the
pigment "rgbf 1", a totally solid circle show up.

// test scene; produces nothing in the alpha channel
#include "colors.inc"

camera {
  location <0,0,2.4>
  up y
  right x
  look_at 0
}

light_source {<10,10,10>, 0.65}

sphere { 0, 1
  hollow on
  pigment {rgbt 1} // change this to rgbf 1
  interior {       // and a solid circle occurs
    media {
      emission 1
      density {
        spherical
        turbulence 0.8 omega 0.75
        color_map {
          [0 Black filter 1]
          [1 Green filter 0]
        }
      }
    }
  }
}

sphere { 0, 0.5 pigment{Red transmit 0.5}}

// .ini file settings
Width=100
Height=100
Antialias=Off

Output_Alpha = on
Output_File_Type = T


Is it my head or is it POV-Ray that is broken? I need the alpha channel for
an explosion in a game.

Ole Laursen - http://sunsite.auc.dk/olau/
ARRGGH! IT'S ALIVE!


Post a reply to this message

From: Peter Popov
Subject: Re: Media + Output_Alpha = ?
Date: 28 Jun 1999 16:55:39
Message: <3777e084.21375080@204.213.191.228>
On Mon, 28 Jun 1999 20:46:27 +0200, "Ole Laursen"
<98z### [at] aalborghusdk> wrote:

>Hi!
>
>Have anyone here succeded in producing a TGA with alpha channel of a scene
>with a media object?
>
>I can't get it to work; if I place the media inside a sphere with the
>pigment "rgbt 1", nothing show up in the alpha channel. If I use the
>pigment "rgbf 1", a totally solid circle show up.

>Is it my head or is it POV-Ray that is broken? I need the alpha channel for
>an explosion in a game.
>
>Ole Laursen - http://sunsite.auc.dk/olau/
>ARRGGH! IT'S ALIVE!

Sorry, POV's alpha is not affected by media, fog, radiosity, focal
blur, reflection, refraction, interior fade_distance... In fact it
only shows if an object has been hit or not plus any anti-aliasing.
Maybe filter works, too, but I am not sure.

To solve your problem cut'n'paste your scene in a new file and make it
black and white, i.e. design the alpha channel yourself. Since you're
using media it should be quite easy. If this will help you, the
formula used to convert rgb to grayscale is:

gray = 0.30*r + 0.59*g + 0.11*b

HTH


Peter Popov
ICQ: 15002700


Post a reply to this message

From: Tony Vigil
Subject: Re: Media + Output_Alpha = ?
Date: 28 Jun 1999 17:36:35
Message: <3777EAD9.D23A5D93@emc-inc.com>
Try changing the green part of your media to white & render using the
hf_gray_16 option.

Ole Laursen wrote:

> Hi!
>
> Have anyone here succeded in producing a TGA with alpha channel of a scene
> with a media object?
>
> I can't get it to work; if I place the media inside a sphere with the
> pigment "rgbt 1", nothing show up in the alpha channel. If I use the
> pigment "rgbf 1", a totally solid circle show up.
>
> // test scene; produces nothing in the alpha channel
> #include "colors.inc"
>
> camera {
>   location <0,0,2.4>
>   up y
>   right x
>   look_at 0
> }
>
> light_source {<10,10,10>, 0.65}
>
> sphere { 0, 1
>   hollow on
>   pigment {rgbt 1} // change this to rgbf 1
>   interior {       // and a solid circle occurs
>     media {
>       emission 1
>       density {
>         spherical
>         turbulence 0.8 omega 0.75
>         color_map {
>           [0 Black filter 1]
>           [1 Green filter 0]
>         }
>       }
>     }
>   }
> }
>
> sphere { 0, 0.5 pigment{Red transmit 0.5}}
>
> // .ini file settings
> Width=100
> Height=100
> Antialias=Off
>
> Output_Alpha = on
> Output_File_Type = T
>
> Is it my head or is it POV-Ray that is broken? I need the alpha channel for
> an explosion in a game.
>
> Ole Laursen - http://sunsite.auc.dk/olau/
> ARRGGH! IT'S ALIVE!


Post a reply to this message

From: Ole Laursen
Subject: Re: Media + Output_Alpha = ?
Date: 29 Jun 1999 06:08:20
Message: <37789b14@news.povray.org>
>Sorry, POV's alpha is not affected by media, [snip]

Is it going to be affected someday? I mean, surely the the alpha channel is
coolest with transparent things like media.

>To solve your problem [snip]

Thanks, I'll try that then...

Ole Laursen - http://sunsite.auc.dk/olau/
ARRGGH! IT'S ALIVE!


Post a reply to this message

From: Nieminen Mika
Subject: Re: Media + Output_Alpha = ?
Date: 29 Jun 1999 10:48:03
Message: <3778dca3@news.povray.org>
Ole Laursen <98z### [at] aalborghusdk> wrote:
: Is it going to be affected someday? I mean, surely the the alpha channel is
: coolest with transparent things like media.

  Absolutely. The alpha channel should be the amount of background visible.
It shouldn't be very hard to code.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Margus Ramst
Subject: Re: Media + Output_Alpha = ?
Date: 29 Jun 1999 13:01:45
Message: <3778FC0F.8BA2009F@peak.edu.ee>
Peter Popov wrote:
> 
> 
> Sorry, POV's alpha is not affected by media, fog, radiosity, focal
> blur, reflection, refraction, interior fade_distance... In fact it
> only shows if an object has been hit or not plus any anti-aliasing.
> Maybe filter works, too, but I am not sure.
> 

AFAIK only transmit affects the alpha channel. Also, the transmittance value is
automatically stored in the alpha channel and any objects behind the
transmitting object do not affect the channel.
Using an interior (of any kind, I believe) also has adverse effects, i.e. the
alpha channel will always be solid white, regardless of the transmit value.
I believe much of this should be quite easy to fix.

Margus


Post a reply to this message

From: Ole Laursen
Subject: Re: Media + Output_Alpha = ?
Date: 29 Jun 1999 15:16:27
Message: <37791b8b@news.povray.org>
>I believe much of this should be quite easy to fix.


I certainly hope so :-). Are any official POV-Ray coders aware of these
problems or should I make up a bugreport?

Ole Laursen - http://sunsite.auc.dk/olau/
ARRGGH! IT'S ALIVE!


Post a reply to this message

From: Ken
Subject: Re: Media + Output_Alpha = ?
Date: 29 Jun 1999 15:25:15
Message: <37791D57.65475078@pacbell.net>
Ole Laursen wrote:
> 
> >I believe much of this should be quite easy to fix.
> 
> I certainly hope so :-). Are any official POV-Ray coders aware of these
> problems or should I make up a bugreport?
> 
> Ole Laursen - http://sunsite.auc.dk/olau/
> ARRGGH! IT'S ALIVE!

  Question to ask is if it is a feature or if it really is a bug.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Media + Output_Alpha = ?
Date: 29 Jun 1999 16:52:10
Message: <377931fa@news.povray.org>
In article <37791D57.65475078@pacbell.net> , Ken <tyl### [at] pacbellnet>  
wrote:

>
>
> Ole Laursen wrote:
>>
>> >I believe much of this should be quite easy to fix.
>>
>> I certainly hope so :-). Are any official POV-Ray coders aware of these
>> problems or should I make up a bugreport?
>>
>> Ole Laursen - http://sunsite.auc.dk/olau/
>> ARRGGH! IT'S ALIVE!
>
>   Question to ask is if it is a feature or if it really is a bug.

Yes, we know the limits of the current implementation.


    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: Ole Laursen
Subject: Re: Media + Output_Alpha = ?
Date: 30 Jun 1999 15:13:58
Message: <377a6c76@news.povray.org>
>>> >I believe much of this should be quite easy to fix.
>>>
>>> I certainly hope so :-). Are any official POV-Ray coders aware of these
>>> problems or should I make up a bugreport?
>>>
>>   Question to ask is if it is a feature or if it really is a bug.

If it is a feature, it is certainly a strange one...

>
>Yes, we know the limits of the current implementation.

Okay.

I hope the limits will change someday, then. :-)


Ole Laursen - http://sunsite.auc.dk/olau/
ARRGGH! IT'S ALIVE!


Post a reply to this message

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