|
![](/i/fill.gif) |
"RAY" <RAY### [at] yahoo com> wrote in message news:3cb73511@news.povray.org...
>
>
> --
> __________________
> 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 } }
Replace this with a five-parameter function:
#declare FNPIG = function(rd,gr,bl,ft,tr) { 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
After replacing the FNPIG function, the simple declare should work:
#declare REBUILD = pigment { function(rd,gr,bl,ft,tr) {FNPIG}}
>
> > 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) |