POV-Ray : Newsgroups : povray.binaries.images : city buildings as height_fields-- WIP 1 : Re: city buildings as height_fields-- WIP 1 Server Time
7 May 2024 17:37:32 EDT (-0400)
  Re: city buildings as height_fields-- WIP 1  
From: Kenneth
Date: 28 Feb 2018 18:40:00
Message: <web.5a973d31e5be66e2a47873e10@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:

> >
> > Both of those work, too.
>
> Yep, except that predeclaring the texture block into an array element avoids
> reading the image file every time it's used, which was what you wanted to avoid.

Oh! I'm on the verge of understanding something important here, that I didn't
know :-)  (and which the docs DO mention, but I didn't read them as clearly as I
should have until now; AND you mentioned something earlier-- your rocks and
pebbles example-- but I didn't pick up on it.)

Let's say I have 50 different pigments:

pigment{image_map{jpeg "building windows *number*.jpg}}

So sticking them into an array actually #declares them-- once into memory-- then
I can call those pigments as many times as I want without increasing memory
usage. Just like pre-#declaring all of them individually.

Sorry to say, I thought arrays were just 'containers'  :-O  I've never put any
memory-hogging things into one.

NOW I see what you're getting at. Thanks! That's a rather big clarification for
me.

But in the case of my image_pattern-- which uses just
       jpeg "building windows *number*.jpg"

....I'm still not *totally* convinced that the image itself has actually been
#declared by the array...mainly because there's no pigment or image_map
'wrapper' around it. It looks like an 'unfinished entity.' Your thoughts?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.