|
|
scott wrote:
> I started by writing 3 functions to calculate the R G and B components,
> but then I got stuck trying to combine them in the pigment part of an
> object. What's the best way to do this?
>
> I want to write this:
>
> pigment{color rgb <functionR,functionG,functionB>}
I don't know if this is the best way, but this is what I do.
#local P_R=pigment{
function{functionR(x,y,z)}
color_map{[0,rgb<0,0,0>][1,rgb<5,0,0>]}
};
#local P_R=pigment{
function{functionG(x,y,z)}
color_map{[0,rgb<0,0,0>][1,rgb<0,5,0>]}
};
#local P_R=pigment{
function{functionB(x,y,z)}
color_map{[0,rgb<0,0,0>][1,rgb<0,0,5>]}
};
#local P_F=pigment{
function{functionF(x,y,z)}
color_map{[0,rgbf<0,0,0,0>][1,rgbf<0,0,0,5>]}
};
#local P_T=pigment{
function{functionT(x,y,z)}
color_map{[0,rgbt<0,0,0,0>][1,rgbt<0,0,0,5>]}
};
pigment{
average
pigment_map{[1,P_R][1,P_G][1,P_B][1,P_F][1,P_T]}
}
If you eliminate both the filter and transmit parts, change the 5s to 3s.
I hope this helps.
Post a reply to this message
|
|