|
|
Hello.
I am stuck over this :-( and any help will save my life! I need a texture
that extends along one axis with a varying transparency along another axis.
For example:
cylinder { 0*y 3*y 1
pigment { gradient x
color map { [ 0.3 Red]
[ 0.5 White]
[ 0.7 Blue] ... and so on.
This should be merged with something like
gradient y {
[ 0 transmit 0.5 ]
[ 1 transmit 1.0 ]
So, the desired result is a cylinder with the colour bands along x, but
increasing transparency along y - the cylinder "disappears" at the top.
First, I expected it should be easy to get this, but meanwhile I tried
EVERYthing I could think of, with no luck. I am still sure that it should
be possible with two lines of code, and that I am -as many times- too
close to see it.
Thanks for any hint
S.
Post a reply to this message
|
|
|
|
Well, the way I'd do it is:-
// -- begin code --
cylinder { 0*y, 3*y, 1
pigment {
gradient y
pigment_map {
[0
gradient x
colour_map {
[ 0.3 colour Red transmit 0.5]
[ 0.5 colour White transmit 0.5]
[ 0.7 colour Blue transmit 0.5]
}
]
[1
gradient x
colour_map {
[ 0.3 colour Red transmit 1]
[ 0.5 colour White transmit 1]
[ 0.7 colour Blue transmit 1]
}
]
}
scale <1,3,1>
}
}
// -- end code --
Hope this helps,
Mike Andrews.
"Steely" <nomail@nomail> wrote:
> Hello.
>
> I am stuck over this :-( and any help will save my life! I need a texture
> that extends along one axis with a varying transparency along another axis.
> For example:
>
> cylinder { 0*y 3*y 1
> pigment { gradient x
> color map { [ 0.3 Red]
> [ 0.5 White]
> [ 0.7 Blue] ... and so on.
>
> This should be merged with something like
>
> gradient y {
> [ 0 transmit 0.5 ]
> [ 1 transmit 1.0 ]
>
> So, the desired result is a cylinder with the colour bands along x, but
> increasing transparency along y - the cylinder "disappears" at the top.
>
> First, I expected it should be easy to get this, but meanwhile I tried
> EVERYthing I could think of, with no luck. I am still sure that it should
> be possible with two lines of code, and that I am -as many times- too
> close to see it.
>
> Thanks for any hint
>
> S.
Post a reply to this message
|
|
|
|
Steely nous apporta ses lumieres en ce 2005-06-08 13:21:
> "Mike Andrews" <nomail@nomail> wrote:
>
>>Well, the way I'd do it is:-
>>
>>// -- begin code --
>> pigment_map {
>
> ^^^^^^^^^^^^^^
>
>
> Any other ideas?
>
> TIA
>
> S.
>
>
>
Been in a media, the solution is simple: use 2 densitys in the same media. The
densitys will
multiplied together. If one density return zero, it will cancel the other.
Read 3.6.2.3.4 Multiple Density vs. Multiple Media in the documentation.
So,
media {
density { gradient y }
density { your horizontal density_map }
}
Hope this will help you
Alain
Post a reply to this message
|
|