|
![](/i/fill.gif) |
"Siber" <nomail@nomail> wrote:
> I had originally exported them simply as black and white images, white
> representing where the color should be added. I have since put the information
> in the alpha channel as well, in an attempt to get layering to work, but haven't
> been successful in that yet.
It sounds like you should be able to use the image_map as a pigment function,
then make the color_map match the colors you want. I believe someone above
mentioned this, so here is some sample code:
//--------------
#declare ImageMap = function{
pigment{
image_map{
"test.png"
map_type 0
interpolate 2
}
}
}
box{
0, 1
pigment{
function{ ImageMap(x,y,z).gray }
color_map{
// color of the black areas of the image
[0.00 color rgb <0.5,0.5,0.5> ]
// color of the white areas of the image
[1.00 color rgb <1.0,0.0,0.0> ]
}
}
}
//--------------
The image "test.png" is a grayscale png, and the color_map determines what the
actual colors will be. You could use this in a layered pigment, and set some of
the colors to be transparent. Alternatively, you could use this in a
pigment_map, and specify different pigments to be associated with the grayscale
range of the input image.
HTH
-Reactor
Post a reply to this message
|
![](/i/fill.gif) |