|
|
"jr" <cre### [at] gmailcom> wrote:
>...I thought why aren't the basic image_map pigments in
> an array? (perhaps in a separate include file) then the macro (and other code)
> only need to deal with indices. eg. (just typed, any errors mine):
>
> #declare myImgMaps = array {
> pigment {image_map {jpeg "building windows 7 HO.jpg" interpolate 2}},
> ...
> };
>
> so you'd refer to 'myImgMaps[0]' etc.
>
The main trouble is with the texture{image_pattern{ syntax.
In its general form for 'masking' use...
texture{
image_pattern{
png "my_holdout_mask_image_1.png" interpolate 2 // the mask
texture_map{TEX_MAP_FOOBAR} // or just texture{...}, the texture to mask
}
}
.... the syntax of
png "my_holdout_mask_image.png" interpolate 2
is a difficult 'thing' to pre-#declare (in case you want to substitute different
images there.) It's not quite a full pigment specification. In other words,
#declare XYZ = png "my_holdout_mask_image.png" interpolate 2
doesn't even work as a #declare, it produces a fatal error, "not a valid Rvalue"
or something like that. I imagine that trying to put it into an array might have
the same problem, because entering entries in an array is like #declaring them.
Although, I may not have tried it before, I don't remember. (I tried a BUNCH of
ways around this problem, several years ago.) I could be wrong though!
Post a reply to this message
|
|