|
|
hi,
"Kenneth" <kdw### [at] gmailcom> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > #macro mkPigment(i_)
> > ...
>
> Oops, I just noticed the difference between this macro and my array idea-- ...
> the various images might be used *repetitively* in a scene (which I forgot to
> mention!)...
ouch, yes. although I've followed the thread(s), I completely lost sight of the
> For the macro, I came up with a slight change which *might* make it work
> likewise... but I don't think so:
>
> #macro mkPigment(i_)
> #declare IMG =
> pigment {image_map {jpeg concat("my image ",str(i_,0,0)," example.jpg")
> interpolate 2}}
> IMG
> #end
>
> That would just re-#declare the image for each macro call, with the same(?)
> memory increase...unless each 'newly-#declared' identical IMG just takes the
> place of the previous one in memory?
not sure, would expect the old to be de-allocated. in case it helps, the name
too could be supplied, eg:
#macro mkPigment(n_, i_)
#local n_ = pigment {...};
#end
but wrt reducing memory, (guessing) an array will be best.
regards, jr.
Post a reply to this message
|
|