|
|
"MichaelJF" <mi-### [at] t-onlinede> wrote:
> "Dicko" <dic### [at] gmailcom> wrote:
> > Hi all,
> >
> > How do I combine these three?
> >
> > I already found a function to combine a color and an image map:
> >
> > #macro pigment_multiply(p1,p2)
> > #local PR1 = function {pigment{p1}}
> > #local PR2 = function {pigment{p2}}
> > #local PR_FRed = function (x,y,z) {PR1(x,y,z).red*PR2(x,y,z).red}
> > #local PR_FGrn = function (x,y,z) {PR1(x,y,z).green*PR2(x,y,z).green}
> > #local PR_FBlu = function (x,y,z) {PR1(x,y,z).blue*PR2(x,y,z).blue}
> >
> > average pigment_map {
> > [function{PR_FRed(x,y,z)} color_map{[0 rgb 0][1 rgb <1,0,0>*3]}]
> > [function{PR_FGrn(x,y,z)} color_map{[0 rgb 0][1 rgb <0,1,0>*3]}]
> > [function{PR_FBlu(x,y,z)} color_map{[0 rgb 0][1 rgb <0,0,1>*3]}]
> > }
> > #end
> >
> > So I use for example:
> > texture {pigment {pigment_multiply(pigment {color rgb<0,1,0>}, pigment
> > {image_map {jpeg "image.jpg"}})}}
> >
> > I tried to use a rgbf color, but that adds no transparency.
> >
> > How to proceed?
> >
> > Thanks, Dick
>
> In fact, I have no real idea, but playing around with something like that:
>
> average pigment_map {
> [0.3 function{PR_FRed(x,y,z)} color_map{[0 rgb 0][1 rgb <1,0,0>*3]}]
> [0.3 function{PR_FGrn(x,y,z)} color_map{[0 rgb 0][1 rgb <0,1,0>*3]}]
> [0.3 function{PR_FBlu(x,y,z)} color_map{[0 rgb 0][1 rgb <0,0,1>*3]}]
> [0.7 Clear ]
> }
>
> seems to help a Little bit.
>
> Best regards,
> Micahel
Forgot to mention that you have to include "colors.inc" first.
Post a reply to this message
|
|