POV-Ray : Newsgroups : povray.newusers : Making a plane transparent Server Time
23 Nov 2024 07:32:20 EST (-0500)
  Making a plane transparent (Message 1 to 7 of 7)  
From: schoeni
Subject: Making a plane transparent
Date: 29 Mar 2021 08:45:00
Message: <web.6061cacbc5d043ade47f5359fc7796ae@news.povray.org>
An easy problem here, I want this plane to be somewhat transparent to see the
sphere behind it. I thought 'rgbf' or 'rgbt' should do it but I cannot make it
work.

I use Povray 3.7 for Mac. My Code

"""

#include "colors.inc"

background { colour Black }

#declare phi = (1/2)*(1+sqrt(5));

plane {
 <0,phi,1>, 0
 texture {
  pigment {
        square color rgbt<0.5,0,0,0.5> color rgbt<0,0.5,0,0.5>  color
rgbt<0.5,0,0,0.5> color rgbt<0,0.5,0,0.5>

       }
       finish { diffuse 0.9 phong 0.5}
 }
 clipped_by { box {<-2.5,-2.5,-2.5>,<2.5,2.5,2.5>} }
}

sphere {
 <0,-1,-1>,1
 pigment { Blue }
}


camera {
   //orthographic
   location  <0, 0, 5>
   up        <0.0, 1.0,  0.0>
   right     <4/3, 0.0,  0.0>
   look_at   <0, 0,  0>
   rotate <0,0,0>
}

light_source { <200,500,-100> White
    spotlight
    radius  100
    falloff 200
    point_at <0,0,0>
}

"""


Post a reply to this message


Attachments:
Download 'plane.png' (95 KB)

Preview of image 'plane.png'
plane.png


 

From: jr
Subject: Re: Making a plane transparent
Date: 29 Mar 2021 09:30:00
Message: <web.6061d6357121601079819d986cde94f1@news.povray.org>
hi,

"schoeni" <nomail@nomail> wrote:
> An easy problem here, I want this plane to be somewhat transparent to see the
> sphere behind it. I thought 'rgbf' or 'rgbt' should do it but I cannot make it
> work.
>
> I use Povray 3.7 for Mac. My Code
> ...
>         square color rgbt<0.5,0,0,0.5> color rgbt<0,0.5,0,0.5>  color
> rgbt<0.5,0,0,0.5> color rgbt<0,0.5,0,0.5>
> ...

I replaced the colours with 'color rgbft <>' (inserting a zeros as values (in
3rd pos)), seems to do the trick.


regards, jr.


Post a reply to this message


Attachments:
Download 'schoeni.png' (91 KB)

Preview of image 'schoeni.png'
schoeni.png


 

From: schoeni
Subject: Re: Making a plane transparent
Date: 29 Mar 2021 10:15:00
Message: <web.6061e0ac71216010e47f5359fc7796ae@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
>
> I replaced the colours with 'color rgbft <>' (inserting a zeros as values (in
> 3rd pos)), seems to do the trick.
>

Thanks for the fast reply! Unfortunately, I still cannot make it work. I have
now

"""

square color rgbft <0.5,0,0,0,0.5> color rgbft <0,0.5,0,0,0.5>  color rgbft
<0.5,0,0,0,0.5> color rgbft <0,0.5,0,0,0.5>

"""
 and I still see now blue sphere. Also changing values in the f or t position of
rgbft didn't help.

May I ask what exact setting you used?

Cheers,
Oliver


Post a reply to this message

From: jr
Subject: Re: Making a plane transparent
Date: 29 Mar 2021 10:40:00
Message: <web.6061e6527121601079819d986cde94f1@news.povray.org>
hi,

"schoeni" <nomail@nomail> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> >
> > I replaced the colours with 'color rgbft <>' ...
>
> Thanks for the fast reply! Unfortunately, I still cannot make it work. I have
> now
> ...

no idea, have attached the scene used.


> May I ask what exact setting you used?

uh, from memory:
  $ povray schoeni.pov +am2 +a0.1 -j +q9

hth.


regards, jr.


Post a reply to this message


Attachments:
Download 'schoeni.txt' (1 KB)

From: William F Pokorny
Subject: Re: Making a plane transparent
Date: 29 Mar 2021 11:34:30
Message: <6061f386$1@news.povray.org>
On 3/29/21 10:14 AM, schoeni wrote:
> "jr" <cre### [at] gmailcom> wrote:
>>
>> I replaced the colours with 'color rgbft <>' (inserting a zeros as values (in
>> 3rd pos)), seems to do the trick.
>>
> 
> Thanks for the fast reply! Unfortunately, I still cannot make it work. I have
> now
> 
> """
> 
> square color rgbft <0.5,0,0,0,0.5> color rgbft <0,0.5,0,0,0.5>  color rgbft
> <0.5,0,0,0,0.5> color rgbft <0,0.5,0,0,0.5>
> 
> """
>   and I still see now blue sphere. Also changing values in the f or t position of
> rgbft didn't help.
> 
> May I ask what exact setting you used?
> 
> Cheers,
> Oliver
> 
> 

Hi Oliver,

Your original color encoding should work OK too - and does for me with 
v3.7 and v3.8 versions of POV-Ray on Ubuntu linux.

(jr, does his original scene not work for you?)

One thing happening here is I believe the sphere is partly, or wholly, 
lit through the plane. You could try adding finish { emission 0.3 }, 
say, to the sphere to make the transparency more obvious.

If still no sphere visible, try explicitly deleting the plane.png file 
ahead of running the next render to be sure you are really creating a 
new output file and not looking at an older one perhaps created with Red 
and Green out of colors.inc.

Oh, and I don't know how the mac version saves ahead of each render. I 
understand some versions have user interfaces with editors? I guess I'm 
saying, be sure your updates are being saved ahead of new renders.

Bill P.


Post a reply to this message

From: jr
Subject: Re: Making a plane transparent
Date: 29 Mar 2021 12:10:00
Message: <web.6061fad77121601079819d986cde94f1@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> ...
> (jr, does his original scene not work for you?)

tja..  </scratch-back-of-neck>  did not even try.  and yes, it works here too
(v3.7 on a Debian vm).  (sorry Oliver for potentially leading you on a merry
chase)


regards, jr.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Making a plane transparent
Date: 30 Mar 2021 12:16:12
Message: <60634ecc$1@news.povray.org>
On 29/03/2021 14:40, schoeni wrote:
> An easy problem here, I want this plane to be somewhat transparent to see the
> sphere behind it. I thought 'rgbf' or 'rgbt' should do it but I cannot make it
> work.


Just change your code to :

#declare tr = 0.95;
plane {
   <0,phi,1>, 0
   texture {
   pigment {
     square
       color rgbt <0.50, 0.00, 0.00, tr>
       color rgbt <0.00, 0.50, 0.00, tr>
       color rgbt <0.50, 0.00, 0.00, tr>
       color rgbt <0.00, 0.50, 0.00, tr>
     }
   finish {
     diffuse 0.9
     phong 0.5
     }
   }
   clipped_by {
     box {
       <-2.5,-2.5,-2.5>,<2.5,2.5,2.5>
       }
     }
   }

... and play with <tr> value from 0 to 1


-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

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