|
|
Ken wrote:
>
> Marc Schimmler wrote:
> >
> > I'm just wondering if it is possible to make an object which
> > transparency that changes with it's height?
> > Imagine a cylinder which is nearly total transparent at it's bottom and
> > and fully opaque at the top.
> >
> > Any help appreciated from indenters as well as from non-indenters!!! ;-)
> >
> > Thanks in advance,
> > Marc
>
> Note: for the purpose of this response I am going to refer to
> transperancy as clear just because it's easier to type :)
>
> You are on the right track with the gradient idea. The thing you
> have to watch out for with mixing solid pigments with clear pigments
> is that the pattern function will blend the solids in with the clear
> parts making them much less clear. TO get around this you have to
> carefully design you color map around this limitation.
>
> An untested example:
>
> cylinder{
> <0,-1,0>,
> <0,1,0>,
> 1
> pigment{
> gradient y
> color_map{
> [0.0 rgbf<1,1,1,1.0>]
> [0.0 rgbf<1,1,1,1.0>]
> [0.2 rgbf<1,1,1,0.8>]
> [0.2 rgbf<1,1,1,0.8>]
> [0.4 rgbf<1,1,1,0.6>]
> [0.4 rgbf<1,1,1,0.6>]
> [0.6 rgbf<1,1,1,0.4>]
> [0.6 rgbf<1,1,1,0.4>]
> [0.8 rgbf<1,1,1,0.2>]
> [1.8 rgbf<1,1,1,0.2>]
> [1.0 rgbf<1,1,1,0.0>]
> }
> translate -.5
> }
> }
>
> How is my indenting now people ?
interesting. it's.... Different.
>
> Anyway if you study the example you will see that I have bracketed each
> map entry with a duplicate entry. This causes a sharp demarcation of
> pigment color, clearness, and stops the bleeding from adjacent entries.
> This example may be too sharp in it's cutoff points for what you want.
> To correct this let each value in the color map entry extend a bit
> higher than the one before it. If that doesn't work for you then just
> start randomly playing with values and see what happens. Exploration
> is a mighty powerfull teacher and there are few substitutions that will
> replace it.
Well, that is if you want it to be filtering the light.
Easier would be transparent.(transmit)
pigment {
gradient y
tubulence <0.3,1.2,0.2>
octaves 3600 //ou _are_ patient, aren't you *smile*
omega 1/24
lambda 0.4
colour_map {
[0.0 colour rgbt <0.7,0.7,1,0>]
[1.0 colour rgbt <0.7,0.7,1,1>]
}
}
//Spider
"42"
http://www.bahnhof.se/~spider/
Post a reply to this message
|
|