POV-Ray : Newsgroups : povray.newusers : How to make an existing object transparent? Server Time
13 Nov 2024 03:48:19 EST (-0500)
  How to make an existing object transparent? (Message 1 to 4 of 4)  
From: John D  Gwinner
Subject: How to make an existing object transparent?
Date: 30 Jun 2001 19:15:13
Message: <3b3e5d81$1@news.povray.org>
Folks:

  Sort of a dumb question I think, but here goes:

  I'm trying to use the existing wood textures to build a mock up of an
object.  I want to 'fade' the outside plywood by setting it partially
transparent via animation to show the internal wood structure.  I know I can
do this by playing with the pigments and all, but how can I do it without
changing the library textures (pigments / etc)?

  i.e. something like this

#define seethrough 0.9

  texture { T_Wood2 transparency seethrough }

(I'd vary seethrough obviously).  I can handle all of this but I'm missing
the syntax on how to do the transparency.  (Might be the wrong keyword,
although I did look at the syntax)

  Thank you,

        == John ==


Post a reply to this message

From: Bob H 
Subject: Re: How to make an existing object transparent?
Date: 1 Jul 2001 02:50:30
Message: <3b3ec836$1@news.povray.org>
"John D. Gwinner" <jgw### [at] hotmailcom> wrote in message
news:3b3e5d81$1@news.povray.org...
>
>   I'm trying to use the existing wood textures to build a mock up of an
> object.  I want to 'fade' the outside plywood by setting it partially
> transparent via animation to show the internal wood structure.  I know I
can
> do this by playing with the pigments and all, but how can I do it without
> changing the library textures (pigments / etc)?

My first reply was totally off, or almost totally.  I checked it out.  Just
so you know what I suggested: I thought perhaps adding pigment {filter 1}
into the wood texture itself might make a semitransparency.  It does, but it
overrides the whole texture without any other previous pigments showing up
if the wood is single layered.  If multilayered, as most the predefined
included woods are then it just affects the outermost layer I guess.
Anyhow... the solution is probably to use:

#declare T1=1-clock;
#declare T2=clock;

texture {
 average
  texture_map {
   [T1 Twood2]
   [T2 texture {pigment {rgbf 1}}]
  }
}


Bob H.


Post a reply to this message

From: John D  Gwinner
Subject: Re: How to make an existing object transparent?
Date: 1 Jul 2001 12:18:43
Message: <3b3f4d63$1@news.povray.org>
Bob:

Thanks, makes me feel a bit better that it wasn't trivial.

FWIW, I had to change the syntax slightly, here's what I ended up using:

#declare T02 = texture { average texture_map { [T1 T_Wood2  rotate x*90
scale 10 finish { specular 0.15 roughness 0.25 ambient 0.25  } ]
  [T2 pigment {rgbf 1} ] } }

(i.e. the 'texture' keyword in T2 didn't take)

It doesn't 'fade' fast but I can fiddle with that.

I'd been hoping that there was a 'transparency' keyword I was missing (VRML
syntax floating around in my head), but it wouldn't really make sense
actually.


      == John ==


"Bob H." <omn### [at] msncom> wrote in message
news:3b3ec836$1@news.povray.org...
> My first reply was totally off, or almost totally.  I checked it out.
Just
> so you know what I suggested: I thought perhaps adding pigment {filter 1}
> into the wood texture itself might make a semitransparency.  It does, but
it
> overrides the whole texture without any other previous pigments showing up
> if the wood is single layered.  If multilayered, as most the predefined
> included woods are then it just affects the outermost layer I guess.
> Anyhow... the solution is probably to use:
>
> #declare T1=1-clock;
> #declare T2=clock;
>
> texture {
>  average
>   texture_map {
>    [T1 Twood2]
>    [T2 texture {pigment {rgbf 1}}]
>   }
> }
>
>
> Bob H.
>
>


Post a reply to this message

From: Bob H 
Subject: Re: How to make an existing object transparent?
Date: 1 Jul 2001 14:39:55
Message: <3b3f6e7b@news.povray.org>
"John D. Gwinner" <jgw### [at] hotmailcom> wrote in message
news:3b3f4d63$1@news.povray.org...
>
> #declare T02 = texture { average texture_map { [T1 T_Wood2  rotate x*90
> scale 10 finish { specular 0.15 roughness 0.25 ambient 0.25  } ]
>   [T2 pigment {rgbf 1} ] } }
>
> (i.e. the 'texture' keyword in T2 didn't take)

Sorry, I declared it ahead of time when I actually tried it here myself, didn't do it
like I wrote
here before.  You don't use the texture {} part if it's texture_map and likewise leave
off the
pigment {} if using pigment_map.

> I'd been hoping that there was a 'transparency' keyword I was missing (VRML
> syntax floating around in my head), but it wouldn't really make sense
> actually.

There is a transmit keyword (as opposed to filter) which doesn't depend on pigment
colors when
doing the transparency.  I just don't see any way to apply it to layered textures
after the fact.
An interesting predicament, it would be good to be able to use such a thing.

Bob H.


Post a reply to this message

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