|
![](/i/fill.gif) |
> I think in the worst case it should be possible using three separate
> function patterns for RGB and rebuilding the pigment using color_maps
> and average.
ok, just tried it and it seems to work. The macro pigment_scale
below multiplies the color values for arbitrary (non-transparent)
pigments. Transmit/Filter would need some further effort, but
I'm inclined to think it would be possible as well.
In order to additively mix two pigments, it should be enough to
average them and then scale the result up by a factor of two.
#macro from_black(COLOR)
color_map
{
[0 color rgb 0]
[1 color COLOR]
}
#end
#macro pigment_scale(PIGMENT, SCALE)
#local F = function { pigment {PIGMENT} }
#local R = pigment {function {F(x,y,z).red} from_black(3*SCALE*Red) }
#local G = pigment {function {F(x,y,z).green} from_black(3*SCALE*Green)}
#local B = pigment {function {F(x,y,z).blue} from_black(3*SCALE*Blue) }
pigment {average pigment_map {[R] [G] [B]} }
#end
Post a reply to this message
|
![](/i/fill.gif) |