|
![](/i/fill.gif) |
--
__________________
RAY
"Michael Andrews" <m.c### [at] reading ac uk> wrote in message
news:3CB### [at] reading ac uk...
> Hi Folks,
>
> I was playing with Gilles' cloud pigment and hit a problem: what is the
> best (ie fastest rendering) way to reproduce an arbitrary pigment from
> it's function?
>
> For example, given
>
> #declare PIG = pigment { bozo colour_map {[0.2 rgbf 1][0.5 rgb
> y*1.3][0.7 rgb x transmit 1] } }
> #declare FNPIG = function { pigment { PIG } }
>
> #declare REBUILD = pigment { ... }
>
> how do you define REBUILD to give the same pigment as PIG, based on
> FNPIG?
>
> Normally it's just a matter of
>
> #declare REBUILD = pigment {
> average
> pigment_map {
> [1 function { FNPIG(x,y,z).x } colour_map {[0 rgb 0][1 rgb 3*x]} ]
> [1 function { FNPIG(x,y,z).y } colour_map {[0 rgb 0][1 rgb 3*y]} ]
> [1 function { FNPIG(x,y,z).z } colour_map {[0 rgb 0][1 rgb 3*z]} ]
> }
> }
would #declare REBUILD = pigment {function {FNPIG}}; work
> but with filter, transmit or colours with values greater than one this
> doesn't work.
>
> I've come up with one structure which works, but is very slow for how I
> am using it.
>
> So, I was hoping someone can come up with a better method. Any takers?
Yes ;-)
Post a reply to this message
|
![](/i/fill.gif) |