POV-Ray : Newsgroups : povray.advanced-users : mapped trasparency : Re: mapped trasparency Server Time
28 Jul 2024 20:24:57 EDT (-0400)
  Re: mapped trasparency  
From: Gianluca Massaccesi
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

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