POV-Ray : Newsgroups : povray.newusers : Transparent text Server Time
29 Jul 2024 04:20:34 EDT (-0400)
  Transparent text (Message 1 to 6 of 6)  
From: Espen
Subject: Transparent text
Date: 16 Jan 2007 10:10:00
Message: <web.45ace9bbfe7718bfca24f7610@news.povray.org>
Hi!

I want to to make a text string semi transparent.  Tried to use pigment with
rgbf but it does not work as I thought it would.  Any help appreciated.  The
code I thought would work below.

TIA
, Espen

text {

   ttf "impact.ttf" "Text String" 0, 0

   pigment { rgbf < 1.0, 1.0, 1.0, 0.5 > }
   finish { ambient 1 diffuse 0 }

   .
   .
   .

}


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Transparent text
Date: 16 Jan 2007 11:05:00
Message: <web.45acf737182cb103c150d4c10@news.povray.org>
"Espen" <nomail@nomail> wrote:
> Hi!
>
> I want to to make a text string semi transparent.  Tried to use pigment with
> rgbf but it does not work as I thought it would.  Any help appreciated.  The
> code I thought would work below.
>
> TIA
> , Espen
>
> text {
>
>    ttf "impact.ttf" "Text String" 0, 0
>
>    pigment { rgbf < 1.0, 1.0, 1.0, 0.5 > }
>    finish { ambient 1 diffuse 0 }
>
>    .
>    .
>    .
>
> }

Works fine for me.  Perhaps, you expect something different?

//START
camera{
  up y
  right x*image_width/image_height
  angle 30
  location <0,0,-10>
  look_at  0
}

text {
  ttf "impact.ttf" "Text String" 0, 0
  pigment { rgbf < 1.0, 1.0, 1.0, 0.5 > }
  finish { ambient 1 diffuse 0 }
  translate -x*2
}

cylinder{-x*3,x*3,0.1 pigment{rgb <1,0,0>}finish { ambient 1 diffuse 0 }
translate <0,0.3,1>}
//END

-tgq


Post a reply to this message

From: Espen
Subject: Re: Transparent text
Date: 16 Jan 2007 16:50:00
Message: <web.45ad477f182cb103ca24f7610@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
>
> Works fine for me.  Perhaps, you expect something different?
>

Ah.  I found out what was wrong.  Though now it puzzles me more.

This line works:

   pigment { rgbf < 1.0, 1.0, 1.0, 0.5 > }

This is white colored text.  But in my scene the text is not white but dark
grey.  I use this line:

   pigment { rgbf < 0.2, 0.2, 0.2, 0.5 > }

And now there is hardly any translucency.  How do I fix this?  It seems like
a bug or something.  Can't see why black or dark colored text shouldn't be
transparent.

Sorry for not correctly giving the actual problem the first time.

, Espen


Post a reply to this message

From: Sabrina Kilian
Subject: Re: Transparent text
Date: 16 Jan 2007 18:20:43
Message: <45ad5dcb$1@news.povray.org>
Espen wrote:
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
>> Works fine for me.  Perhaps, you expect something different?
>>
> 
> Ah.  I found out what was wrong.  Though now it puzzles me more.
> 
> This line works:
> 
>    pigment { rgbf < 1.0, 1.0, 1.0, 0.5 > }
> 
> This is white colored text.  But in my scene the text is not white but dark
> grey.  I use this line:
> 
>    pigment { rgbf < 0.2, 0.2, 0.2, 0.5 > }
> 
> And now there is hardly any translucency.  How do I fix this?  It seems like
> a bug or something.  Can't see why black or dark colored text shouldn't be
> transparent.
> 
> Sorry for not correctly giving the actual problem the first time.
> 
> , Espen
> 
> 
> 

Try rgbt instead of rgbf. Section 3.2.1.5 in the documentation explains
the difference between filter and transmit better then I could.


Post a reply to this message

From: Espen
Subject: Re: Transparent text
Date: 17 Jan 2007 05:10:00
Message: <web.45adf59a182cb103ca24f7610@news.povray.org>
Sabrina Kilian <ykg### [at] vtedu> wrote:
>
> Try rgbt instead of rgbf. Section 3.2.1.5 in the documentation explains
> the difference between filter and transmit better then I could.
>

Thanx!  Putting in rgbt instead of rgbf worked right away.

, Espen


Post a reply to this message

From: Warp
Subject: Re: Transparent text
Date: 17 Jan 2007 06:06:38
Message: <45ae033d@news.povray.org>
Espen <nomail@nomail> wrote:
> Thanx!  Putting in rgbt instead of rgbf worked right away.

  I'm actually not 100% sure about the functions used for the filter
and transmit channels, but as far as I can tell, the filter channel
is a substractive channel while the transmit channel is a kind of
"alpha" channel (in the same way as eg. in a png).

  Substractive means in practice that the color of the surface will
block any light going through it which is not of the color of the
surface. In other words, it will *filter* the light.
  So for example, if the color of the surface is rgbf <1, 1, 0, 1>
then it will let all red and green components pass, but will block
any blue component, and thus no blue light will pass through.
  The values of the filter between 0 and 1 means, AFAIK, how much
of the filtered light is shown and how much of the surface's own color.
In other words, if you had rgbf <1, 1, 0, 0.5> then half of the color
will be from the surface's own color (ie. <1, 1, 0>) and half of it
will be of the light going through (which is filtered by <1, 1, 0>).

  The transmit is basically the same, but it doesn't block anything.
It thus works like an alpha channel. If transmit is 0 then only the
surface color is shown. If transmit is 1, then only the light passing
through is shown. If it's eg. 0.5 then half and half are shown (or in
other words, their average).

-- 
                                                          - Warp


Post a reply to this message

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