POV-Ray : Newsgroups : povray.advanced-users : mapped trasparency Server Time
28 Jul 2024 18:18:00 EDT (-0400)
  mapped trasparency (Message 1 to 4 of 4)  
From: Gianluca Massaccesi
Subject: mapped trasparency
Date: 18 Apr 2004 15:58:44
Message: <4082ddf4@news.povray.org>
Hallo to everybody.
Could anybody suggest an example to simulate a mapped trasparency plane or
sphere, knowing the value of the trasparency at specific position?

Thank you for your help.

-- 
*********************************************
        Gianluca Massaccesi
Consulenza Scientifica e Tecnologica

v. Banchieri, 27 - 40133 Bologna Italy
tel: 0039-51-566391
cel:    348-4758772
*********************************************


Post a reply to this message

From: Mike Williams
Subject: Re: mapped trasparency
Date: 18 Apr 2004 21:36:17
Message: <PE$PvBADzygAFw6+@econym.demon.co.uk>
Wasn't it Gianluca Massaccesi who wrote:
>Hallo to everybody.
>Could anybody suggest an example to simulate a mapped trasparency plane or
>sphere, knowing the value of the trasparency at specific position?
>
>Thank you for your help.
>

If you can plot the transparency to an image, then you can use that
image_map to control a pigment_pattern

#declare transTex = texture {
  pigment_pattern {image_map {jpeg "tex.jpg" interpolate 2}}
  texture_map {
     [0 pigment {rgbt <0,0,0,1>}]
     [1 pigment {MyPigment}]
  }      
}



If you can express your knowledge of the transparency at a specific
position as a function then you can use that function to control a
pigment_pattern. 

#declare transTex = texture {
  pigment_pattern {function{abs(sin(x*4)+cos(y*8))*0.5}}
  texture_map {
     [0 pigment {rgbt <0,0,0,1>}]
     [1 pigment {MyPigment}]
  }      
}

Hint: It's much easier to manage things if you ensure that your function
returns values in the range 0 to 1 (hence my use of abs() and *0.5)
rather than trying to adjust the control values of the texture_map to
work with a function that returns values outside that range.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Gianluca Massaccesi
Subject: Re: mapped trasparency
Date: 19 Apr 2004 02:25:41
Message: <408370e5$1@news.povray.org>
Thank you very much.
Could it be done with a discrete set of trasparency values, given a table of
those values related to their coordinates?

This could be easier for my purpose.

Gianluca

"Mike Williams" <nos### [at] econymdemoncouk> ha scritto nel messaggio
news:PE$PvBADzygAFw6+@econym.demon.co.uk...
> Wasn't it Gianluca Massaccesi who wrote:
> >Hallo to everybody.
> >Could anybody suggest an example to simulate a mapped trasparency plane
or
> >sphere, knowing the value of the trasparency at specific position?
> >
> >Thank you for your help.
> >
>
> If you can plot the transparency to an image, then you can use that
> image_map to control a pigment_pattern
>
> #declare transTex = texture {
>   pigment_pattern {image_map {jpeg "tex.jpg" interpolate 2}}
>   texture_map {
>      [0 pigment {rgbt <0,0,0,1>}]
>      [1 pigment {MyPigment}]
>   }
> }
>
>
>
> If you can express your knowledge of the transparency at a specific
> position as a function then you can use that function to control a
> pigment_pattern.
>
> #declare transTex = texture {
>   pigment_pattern {function{abs(sin(x*4)+cos(y*8))*0.5}}
>   texture_map {
>      [0 pigment {rgbt <0,0,0,1>}]
>      [1 pigment {MyPigment}]
>   }
> }
>
> Hint: It's much easier to manage things if you ensure that your function
> returns values in the range 0 to 1 (hence my use of abs() and *0.5)
> rather than trying to adjust the control values of the texture_map to
> work with a function that returns values outside that range.
>
> -- 
> Mike Williams
> Gentleman of Leisure


Post a reply to this message

From: David Wallace
Subject: Re: mapped trasparency
Date: 29 Apr 2004 17:35:45
Message: <40917531@news.povray.org>
> > #declare transTex = texture {
> >   pigment_pattern {function{abs(sin(x*4)+cos(y*8))*0.5}}
> >   texture_map {
> >      [0 pigment {rgbt <0,0,0,1>}]
> >      [1 pigment {MyPigment}]
> >   }
> > }

Another approach which preserves "sine wave" appearance as opposed to
"scallop wave" is this:

pigment_pattern {function{(sin(x*4)+cos(y*8)+2)*0.25}}


Post a reply to this message

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