|
![](/i/fill.gif) |
"Reactor" <rea### [at] hotmail com> wrote in message
news:web.4bc22e72256a6c956811279d0@news.povray.org...
> I am assuming those are pigment functions, which do not return a single
> value -
> they return a color 3vector. Assuming that they are returning a grayscale
> value, you can change that to:
>
> pigment
> {
> color rgbt <fRingRed(x,y,z).red,
> fRingGreen(x,y,z).red,
> fRingBlue(x,y,z).red,
> fRingTrans(x,y,z).red>
> }
>
> Note that while I am extracting what would be the red component, this
> doesn't
> have anything to do with the color produced by the pigment. I am just
> pulling
> the first float out of the 3 vector.
Your assumption is incorrect. The fRingXXX() functions return floats not
vectors.
After searching the archives I came up with the following...
#declare pRingColour=
pigment
{
average
pigment_map
{
[1 function { fRingColourRed(x,y,z) } color_map{[0 rgb 0][1 red
3]}]
[1 function { fRingColourGreen(x,y,z) } color_map{ [0 rgb 0][1
green 3]}]
[1 function { fRingColourBlue(x,y,z) } color_map{ [0 rgb 0][1
blue 3]}]
}
}
Many thanks to all who helped.
Rarius
Post a reply to this message
|
![](/i/fill.gif) |