POV-Ray : Newsgroups : povray.advanced-users : alpha channel (+ua) makes media invisible? Server Time
29 Jun 2024 02:18:51 EDT (-0400)
  alpha channel (+ua) makes media invisible? (Message 1 to 7 of 7)  
From: CShake
Subject: alpha channel (+ua) makes media invisible?
Date: 24 Jan 2010 12:13:41
Message: <4b5c7fc5$1@news.povray.org>
Maybe I'm missing something obvious, but whenever I try to render an 
image with a transparent background, any emissive media that does not 
have a solid object between it and the background just becomes 
invisible, instead of partially transparent which is the intent.

Essentially, I'm trying to render an engine glow via emission, and it 
works fine when I have a backdrop, but it disappears when I remove the 
background.

minimal scene:
sphere{0,1
   texture{pigment{color rgbt 1}}
   hollow
   interior{
     media{
       emission <1,0,0>
       method 3
       intervals 1
       density{color rgb 0.5}
     }
   }
}
camera{location <0,2,-2> look_at <0,0,0>}

Setting -UA in the command line shows a red sphere, +UA is completely 
transparent. Upon opening in photoshop, it shows that the red channel is 
in fact correct, but the alpha channel is at 100% for the entire image.

Is there a way to get around this?


Post a reply to this message

From: Alain
Subject: Re: alpha channel (+ua) makes media invisible?
Date: 24 Jan 2010 12:53:41
Message: <4b5c8925$1@news.povray.org>

> Maybe I'm missing something obvious, but whenever I try to render an
> image with a transparent background, any emissive media that does not
> have a solid object between it and the background just becomes
> invisible, instead of partially transparent which is the intent.
>
> Essentially, I'm trying to render an engine glow via emission, and it
> works fine when I have a backdrop, but it disappears when I remove the
> background.
>
> minimal scene:
> sphere{0,1
> texture{pigment{color rgbt 1}}
> hollow
> interior{
> media{
> emission <1,0,0>
> method 3
> intervals 1
> density{color rgb 0.5}
> }
> }
> }
> camera{location <0,2,-2> look_at <0,0,0>}
>
> Setting -UA in the command line shows a red sphere, +UA is completely
> transparent. Upon opening in photoshop, it shows that the red channel is
> in fact correct, but the alpha channel is at 100% for the entire image.
>
> Is there a way to get around this?

Fact is that any emissive media IS totaly transparent by design. It adds 
to whatever is behind, wighout filtering anything out.

What you can do:
Add some absorbing media with absorbtion<0,1,1>. Removes the blue and 
green, leaving the red.
Add some scattering media and a light_source.
Change the pigment to rgbt<1,1,1,0.9> or rgbf<1,1,1,0.9>


Alain


Post a reply to this message

From: Warp
Subject: Re: alpha channel (+ua) makes media invisible?
Date: 24 Jan 2010 13:04:54
Message: <4b5c8bc6@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:
> Fact is that any emissive media IS totaly transparent by design. It adds 
> to whatever is behind, wighout filtering anything out.

  That's also the reason why emissive media is invisible against a white
background. Emissive media only adds to the passing rays, and adding something
to white results in white (after color clamping).

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: alpha channel (+ua) makes media invisible?
Date: 24 Jan 2010 13:11:28
Message: <4b5c8d50@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   That's also the reason why emissive media is invisible against a white
> background. Emissive media only adds to the passing rays, and adding something
> to white results in white (after color clamping).

  I wonder if it makes a difference when outputting to HDRI. (After all,
HDRI pixels are non-clamped.)

-- 
                                                          - Warp


Post a reply to this message

From: CShake
Subject: Re: alpha channel (+ua) makes media invisible?
Date: 24 Jan 2010 13:31:15
Message: <4b5c91f3$1@news.povray.org>
Alain wrote:
> Fact is that any emissive media IS totaly transparent by design. It adds 
> to whatever is behind, wighout filtering anything out.
> 
> What you can do:
> Add some absorbing media with absorbtion<0,1,1>. Removes the blue and 
> green, leaving the red.
> Add some scattering media and a light_source.
> Change the pigment to rgbt<1,1,1,0.9> or rgbf<1,1,1,0.9>
> 
> 
> Alain

Ahh, I see.
If I use what you said with the absorption media, it gives a bit of a 
black halo around it, but I found that only using scattering seems to 
produce comparable results to what I intended, though at a considerable 
time cost. Oh well.

Thanks!


Post a reply to this message

From: Alain
Subject: Re: alpha channel (+ua) makes media invisible?
Date: 25 Jan 2010 20:24:17
Message: <4b5e4441$1@news.povray.org>

> Warp<war### [at] tagpovrayorg>  wrote:
>>    That's also the reason why emissive media is invisible against a white
>> background. Emissive media only adds to the passing rays, and adding something
>> to white results in white (after color clamping).
>
>    I wonder if it makes a difference when outputting to HDRI. (After all,
> HDRI pixels are non-clamped.)
>

I think that it will show in that case. Have to try it.


Alain


Post a reply to this message

From: Alain
Subject: Re: alpha channel (+ua) makes media invisible?
Date: 26 Jan 2010 16:32:48
Message: <4b5f5f80$1@news.povray.org>


>> Warp<war### [at] tagpovrayorg> wrote:
>>> That's also the reason why emissive media is invisible against a white
>>> background. Emissive media only adds to the passing rays, and adding
>>> something
>>> to white results in white (after color clamping).
>>
>> I wonder if it makes a difference when outputting to HDRI. (After all,
>> HDRI pixels are non-clamped.)
>>
>
> I think that it will show in that case. Have to try it.
>
>
> Alain

It does show, after you reduce the exposure, in programms made to handle 
high dynamic range.

Minimal sample scene (render with +fh on the command line):
plane{-z,-10 pigment{checker rgb 1 rgb 0.1} finish{ambient 1}}

sphere{5*z,1.5 pigment{rgbt 1}
	interior{media{emission rgb x}}
	hollow}

It will also show on the surrounding objects whenever you use radiosity.

Alain


Post a reply to this message

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