POV-Ray : Newsgroups : povray.newusers : Transparent background Server Time
12 Apr 2025 17:13:26 EDT (-0400)
  Transparent background (Message 1 to 7 of 7)  
From: William
Subject: Transparent background
Date: 13 Sep 2019 16:20:03
Message: <web.5d7bf943925a598d9fc45d470@news.povray.org>
Hello all,
I am a newbie in POV-ray and I am trying to generate a image with transparent
background.

I used:
background{colour rgbt <0.0, 0.0, 0.0>}

and I got a black background. Can anybody please provide your support to get a
black background?

Thanks.

William


Post a reply to this message

From: William F Pokorny
Subject: Re: Transparent background
Date: 13 Sep 2019 17:11:52
Message: <5d7c0618$1@news.povray.org>
On 9/13/19 4:17 PM, William wrote:
> Hello all,
> I am a newbie in POV-ray and I am trying to generate a image with transparent
> background.
> 
> I used:
> background{colour rgbt <0.0, 0.0, 0.0>}
> 
> and I got a black background. Can anybody please provide your support to get a
> black background?
> 
> Thanks.
> 
> William
> 

Taking you not to be asking exactly what you asked, try:

background { colour rgbt <0,0,0,1> }

Your three values get promoted to 4 and the 't' values becomes 0 - or no 
transparency. Remember to use +ua and the default png type output(1).

Bill P.

(1) I think openexr is the other which supports the transparency, but I 
don't much use the feature myself so maybe not... Most image formats 
don't support it.


Post a reply to this message

From: William
Subject: Re: Transparent background
Date: 13 Sep 2019 17:55:01
Message: <web.5d7c0ff0330653d59fc45d470@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 9/13/19 4:17 PM, William wrote:
> > Hello all,
> > I am a newbie in POV-ray and I am trying to generate a image with transparent
> > background.
> >
> > I used:
> > background{colour rgbt <0.0, 0.0, 0.0>}
> >
> > and I got a black background. Can anybody please provide your support to get a
> > black background?
> >
> > Thanks.
> >
> > William
> >
>
> Taking you not to be asking exactly what you asked, try:
>
> background { colour rgbt <0,0,0,1> }
>
> Your three values get promoted to 4 and the 't' values becomes 0 - or no
> transparency. Remember to use +ua and the default png type output(1).
>
> Bill P.
>
> (1) I think openexr is the other which supports the transparency, but I
> don't much use the feature myself so maybe not... Most image formats
> don't support it.


Hi Bill,

Thank you for your reply. My initial settings are like this below:
#include "colors.inc"
background {color rgbt <0, 0, 0, 1> }

#declare MainColor = rgb<1.0,0.0,0.0>;;
  camera {
    angle 45
    location <150.92993637586693,30.07787677021389,97.7056826656392>
    look_at <25,25,25>
  }
  light_source { <101.28273227706191,100.10083875733939,98.7618381976087> color
White shadowless}


I don't know how to intiate the UA setting. Can you please elaborate this?

William


Post a reply to this message

From: William
Subject: Re: Transparent background
Date: 13 Sep 2019 18:30:01
Message: <web.5d7c1780330653d59fc45d470@news.povray.org>
"William" <wil### [at] gmailcom> wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
> > On 9/13/19 4:17 PM, William wrote:
> > > Hello all,
> > > I am a newbie in POV-ray and I am trying to generate a image with transparent
> > > background.
> > >
> > > I used:
> > > background{colour rgbt <0.0, 0.0, 0.0>}
> > >
> > > and I got a black background. Can anybody please provide your support to get a
> > > black background?
> > >
> > > Thanks.
> > >
> > > William
> > >
> >
> > Taking you not to be asking exactly what you asked, try:
> >
> > background { colour rgbt <0,0,0,1> }
> >
> > Your three values get promoted to 4 and the 't' values becomes 0 - or no
> > transparency. Remember to use +ua and the default png type output(1).
> >
> > Bill P.
> >
> > (1) I think openexr is the other which supports the transparency, but I
> > don't much use the feature myself so maybe not... Most image formats
> > don't support it.
>
>
> Hi Bill,
>
> Thank you for your reply. My initial settings are like this below:
> #include "colors.inc"
> background {color rgbt <0, 0, 0, 1> }
>
> #declare MainColor = rgb<1.0,0.0,0.0>;;
>   camera {
>     angle 45
>     location <150.92993637586693,30.07787677021389,97.7056826656392>
>     look_at <25,25,25>
>   }
>   light_source { <101.28273227706191,100.10083875733939,98.7618381976087> color
> White shadowless}
>
>
> I don't know how to intiate the UA setting. Can you please elaborate this?
>
> William



Got it.. I added these two lines in the .ini file. Then it worked well.

Output_File_Type=N
Output_Alpha=on

Best, William


Post a reply to this message

From: Alain Martel
Subject: Re: Transparent background
Date: 14 Sep 2019 11:33:35
Message: <5d7d084f$1@news.povray.org>
Le 2019-09-13 à 18:26, William a écrit :
> "William" <wil### [at] gmailcom> wrote:
>> William F Pokorny <ano### [at] anonymousorg> wrote:
>>> On 9/13/19 4:17 PM, William wrote:
>>>> Hello all,
>>>> I am a newbie in POV-ray and I am trying to generate a image with transparent
>>>> background.
>>>>
>>>> I used:
>>>> background{colour rgbt <0.0, 0.0, 0.0>}
>>>>
>>>> and I got a black background. Can anybody please provide your support to get a
>>>> black background?
>>>>
>>>> Thanks.
>>>>
>>>> William
>>>>
>>>
>>> Taking you not to be asking exactly what you asked, try:
>>>
>>> background { colour rgbt <0,0,0,1> }
>>>
>>> Your three values get promoted to 4 and the 't' values becomes 0 - or no
>>> transparency. Remember to use +ua and the default png type output(1).
>>>
>>> Bill P.
>>>
>>> (1) I think openexr is the other which supports the transparency, but I
>>> don't much use the feature myself so maybe not... Most image formats
>>> don't support it.
>>
>>
>> Hi Bill,
>>
>> Thank you for your reply. My initial settings are like this below:
>> #include "colors.inc"
>> background {color rgbt <0, 0, 0, 1> }
>>
>> #declare MainColor = rgb<1.0,0.0,0.0>;;
>>    camera {
>>      angle 45
>>      location <150.92993637586693,30.07787677021389,97.7056826656392>
>>      look_at <25,25,25>
>>    }
>>    light_source { <101.28273227706191,100.10083875733939,98.7618381976087> color
>> White shadowless}
>>
>>
>> I don't know how to intiate the UA setting. Can you please elaborate this?
>>
>> William
> 
> 
> 
> Got it.. I added these two lines in the .ini file. Then it worked well.
> 
> Output_File_Type=N
> Output_Alpha=on
> 
> Best, William
> 
> 
You can add «+ua» on the command line. In the Windows version, it's the 
box just right of the resolution drop list.

Alain


Post a reply to this message

From: Wilfree
Subject: Re: Transparent background
Date: 7 Apr 2025 14:40:00
Message: <web.67f41b50330653d51674d884a49ffc83@news.povray.org>
Bill P. wrote
try:
>
> background { colour rgbt <0,0,0,1> }
>
> Your three values get promoted to 4 and the 't' values becomes 0 - or no
> transparency. Remember to use +ua and the default png type output(1).
>
>

Wilfrieds reply

this line does not work for me

my .ini file contains

Output_Alpha=+UA                ;
Output_File_Type=N              ;

I want to use this image overlappimg with others to create a 3D game

Please send ma a simple COMPLETE code


Post a reply to this message


Attachments:
Download 'pic_0[1].jpg' (417 KB)

Preview of image 'pic_0[1].jpg'
pic_0[1].jpg


 

From: William F Pokorny
Subject: Re: Transparent background
Date: 7 Apr 2025 15:07:20
Message: <67f42268$1@news.povray.org>
On 4/7/25 14:37, Wilfree wrote:
> this line does not work for me
> 
> my .ini file contains
> 
> Output_Alpha=+UA

Hi,

Some of the error reporting for the options and ini settings could be 
better (Or work at all in this case. My yuqk fork misses the error 
too...). That last line above should have been:

Output_Alpha=on

   or

+ua

Here is a complete scene (use the default camera) showing the command 
line invocation to run it. It's set up for v3.7, but will work with v3.8 
releases too.

//--- this.pov
// Run with:
//      povray this.pov +ua +fn
// If running using an ini file the two key in options are:
//      Output_Alpha=on
//      Output_File_Type=N
#version 3.7;
background { rgbt <0,0,0,1> }
sphere {
     <0,0,2>, 0.2
     pigment { rgb <1,0,0> }
     finish { emission 1 }
}
//---


Bill P.

Aside: The options whether flag or ini formats can be used on either the 
command line or in ini files. Though, mostly, people stick to one method 
of specifying options.


Post a reply to this message

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