|
|
clipka <ano### [at] anonymousorg> wrote:
> And yes, image-based pigments do indeed share the actual image data
> among instances.
Excellent. I'd have been surprised if that wasn't the case, but I never actually
knew for certain!
So then, here's an example of what I was talking about for Kenneth:
#declare Filenames = array[3] {
"FileName1.jpg",
"FileName2.jpg",
"FileName3.jpg"
}
#declare Pigments = array[3];
#for (I, 0, 2)
#declare Pigments[I] = pigment {
image_pattern {
jpeg Filenames[I]
}
}
#end
#declare S = seed(0);
// Now do the below a bajillion times and hopefully
// you'll only be using memory for the 3 images
// plus the pigment instance:
#declare RandI = floor(rand(S)*2.99);
box { -1, 1 pigment { Pigments[RandI] } finish { ambient 0 } }
Post a reply to this message
|
|