POV-Ray : Newsgroups : povray.newusers : Help with alpha channel Server Time
1 Nov 2024 06:17:55 EDT (-0400)
  Help with alpha channel (Message 1 to 4 of 4)  
From: Gobnat
Subject: Help with alpha channel
Date: 15 Feb 2010 08:00:01
Message: <web.4b794483fdaaa12e6ed880d60@news.povray.org>
I am getting v. confused.

When I render this file (ss.pov):

camera {
  location <.2,0,2.4>
  look_at <0,0,0>
  angle 36

}


sphere{<0,0,0>,.5
    texture {pigment {color rgb<118,23,255>}}
    }


With this command:
povray ss.pov

I get a white circle on a black background

When I do it with this command:
povray ss.pov Output_Alpha=True

I get a magenta circle on an alpha channel background.

I assumed that, in each case, since there was no light source, the whole scene
should be black.  Can someone tell me where the light comes from?
.... and why rendering with an alpha channel produces different results (outside
the alpha area)?

Thanks


Gobnat


Post a reply to this message

From: StephenS
Subject: Re: Help with alpha channel
Date: 15 Feb 2010 08:25:01
Message: <web.4b794a3a98bb24e241b1cefe0@news.povray.org>
"Gobnat" <nomail@nomail> wrote:
....
>     texture {pigment {color rgb<118,23,255>}}
....
Color in POV-Ray is from 0 to 1, you may want 255/255 for example.
Color outside of this range is clipped at some point to this range(not shure
when).

> I get a white circle on a black background
....
There is a default background color of black.

Does this help?

Stephen S


Post a reply to this message

From: Alain
Subject: Re: Help with alpha channel
Date: 15 Feb 2010 11:10:45
Message: <4b797205$1@news.povray.org>

> I am getting v. confused.
>
> When I render this file (ss.pov):
>
> camera {
>    location<.2,0,2.4>
>    look_at<0,0,0>
>    angle 36
>
> }
>
>
> sphere{<0,0,0>,.5
>      texture {pigment {color rgb<118,23,255>}}
>      }
>
>
> With this command:
> povray ss.pov
>
> I get a white circle on a black background
>
> When I do it with this command:
> povray ss.pov Output_Alpha=True
>
> I get a magenta circle on an alpha channel background.
>
> I assumed that, in each case, since there was no light source, the whole scene
> should be black.  Can someone tell me where the light comes from?
> .... and why rendering with an alpha channel produces different results (outside
> the alpha area)?
>
> Thanks
>
>
> Gobnat
>
>
>

There is no light_source, but there is the default ambient finish of 0.1 
that make that overly bright pigment visible.

color rgb<118,23,255> gives rgb<11.8, 2.3, 25.5> after the ambient is 
applied, and gets clipped to rgb<1,1,1> whitch is white.
POV-Ray use the 0..1 range for the colours.
0 means nothing for that channel, 1 means full intensity for the channel.

Change it to:
texture {pigment {color rgb<118,23,255>/255 } finish{ ambient 0 }}

This turns the ambient off and bring the pigment back in the correct range.

Take note that values larger than 1 are acceptable, but can have 
unexpected results. There are cases where large values are needed, such 
as fading lights.


Alain


Post a reply to this message

From: Gobnat
Subject: Re: Help with alpha channel
Date: 15 Feb 2010 18:20:00
Message: <web.4b79d5df98bb24e26ed880d60@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> > I am getting v. confused.
> >
[]

> > I get a magenta circle on an alpha channel background.
> >
> > I assumed that, in each case, since there was no light source, the whole scene
> > should be black.  Can someone tell me where the light comes from?
> > .... and why rendering with an alpha channel produces different results (outside
> > the alpha area)?
> >
[]

> There is no light_source, but there is the default ambient finish of 0.1
> that make that overly bright pigment visible.
>
> color rgb<118,23,255> gives rgb<11.8, 2.3, 25.5> after the ambient is
> applied, and gets clipped to rgb<1,1,1> whitch is white.
> POV-Ray use the 0..1 range for the colours.
> 0 means nothing for that channel, 1 means full intensity for the channel.
>
> Change it to:
> texture {pigment {color rgb<118,23,255>/255 } finish{ ambient 0 }}

[]

Dear Alain and Stephen

Thank you so much for this explanation.  You have done a great service for my
sanity - I was going batty trying to work it out. (Still not quite sure why the
alpha channel version rendered a non-white circle, but happy enough am still
sane.)

Regards

G


Post a reply to this message

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