POV-Ray : Newsgroups : povray.newusers : Transparent object Server Time
24 Nov 2024 10:39:25 EST (-0500)
  Transparent object (Message 1 to 4 of 4)  
From: Delfo
Subject: Transparent object
Date: 23 Dec 2008 08:35:00
Message: <web.4950e8a2149533f3998813760@news.povray.org>
Hi everybody
I would like to make a previously-declared object transparent. Since my idea is
to have this object appearing both in transparent and solid version, I would
like to know if there is a way to make it transparent without having to change
ALL the colors in all sub-instances of said object.
So far I've tried

#declare MyObj=object {prev_declared_object
                       hollow
                       transmit 0.6}

but the object appears as solid as if normally instanced...Is there a way to
override the previous transparency with new settings, or shall I manually
change all rgb declarations into rgbt?
Thanks


Post a reply to this message

From: Stephen
Subject: Re: Transparent object
Date: 23 Dec 2008 08:44:16
Message: <moq1l4h90tl4duhobj2r20fo3bal3obak8@4ax.com>
On Tue, 23 Dec 2008 08:33:22 EST, "Delfo" <nomail@nomail> wrote:

>.Is there a way to
>override the previous transparency with new settings, or shall I manually
>change all rgb declarations into rgbt?

Hi Delfo

Why not change all the rgb declarations into rgbft and call f and t declared
variables that can be varied globally.

#declare MyFilter = 0.3
#declare MyTrans = 0.7;


color rgbft <x,x,x, MyFilter, MyTrans >

The keyword *hollow* is only for media.
-- 

Regards
     Stephen


Post a reply to this message

From: Warp
Subject: Re: Transparent object
Date: 23 Dec 2008 08:52:36
Message: <4950ed24@news.povray.org>
Delfo <nomail@nomail> wrote:
> I would like to make a previously-declared object transparent.

  In the current POV-Ray it's unfortunately not possible to change the
texture of pre-textured objects. You can only modify the original texture
definition.

  You can use declared identifiers and/or macros to make this easier on
a per-instantiation basis.

-- 
                                                          - Warp


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Transparent object
Date: 23 Dec 2008 09:30:01
Message: <web.4950f4cef3ef2f50c67b294d0@news.povray.org>
"Delfo" <nomail@nomail> wrote:
> Hi everybody
> I would like to make a previously-declared object transparent. Since my idea is
> to have this object appearing both in transparent and solid version, I would
> like to know if there is a way to make it transparent without having to change
> ALL the colors in all sub-instances of said object.
> So far I've tried
>
> #declare MyObj=object {prev_declared_object
>                        hollow
>                        transmit 0.6}
>
> but the object appears as solid as if normally instanced...Is there a way to
> override the previous transparency with new settings, or shall I manually
> change all rgb declarations into rgbt?
> Thanks

Two ways you can do it:

1)  Declare the object, but don't apply the texture.  Apply the texture when it
is inserted.  With this method you need to declare two textures and it only
works if the object has a single texture applied to it.

2) Make a macro of the object with the specific colour to be changed as a
variable.  Anytime you insert it, you can just pass the colour you need.  This
is the most versatile method.

-tgq


Post a reply to this message

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