POV-Ray : Newsgroups : povray.beta-test : SUGGESTION: Saving Memory: Images Server Time: 19 Jan 2018 05:50:39 GMT
  SUGGESTION: Saving Memory: Images (Message 1 to 3 of 3)  
From: Sven Littkowski
Subject: SUGGESTION: Saving Memory: Images
Date: 16 Dec 2015 09:18:19
Message: <56712c5b@news.povray.org>
Hi,

I learned from other users, that declaring an image file (that is being
used for multiple textures) within a pigment and then using this pigment
in these textures, would save memory as it prevents that the same image
is being loaded multiple times into the memory.

Well, now I tried to optimize my scene source code.

Since the same bump_map image is used for a planar and also for a
spherical projection, I tried to declare the bump_map, too:
#declare Bump = bump_map { "Seneca II - Hull Bump NoGates.png" }

And then using it multiple times:
#declare BPL04 = normal { bump_map { Bump bump_size 0.4 } }
#declare BPL10 = normal { bump_map { Bump bump_size 1.0 } }
#declare BSP04 = normal { bump_map { Bump map_type 1 bump_size 0.4 } }

I also thought, that I could optimize (minimize image loading amounts)
this way:
#declare Car = image_map { jpeg "Seneca II - Hull Plating.jpg" }

And then using it multiple times:
#declare CarPL = pigment { image_map { Car             interpolate 2 } }
#declare CarSP = pigment { image_map { Car  map_type 1 interpolate 2 } }

But planet Earth would be a paradise, if things would be that easy. But
they aren't. POV-Ray returned an error saying "rvalue expected but
something else found".

Thus my suggestion to the magnificent POV-Ray developer team, to allow
such declarations. I believe, this could reduce memory usage further by
preventing having to load the same image multiple times just because the
map-type or any other modifier differs slightly. I would like to get
some feedback of other users and surely of the developers, if possible.
Thanks for your time, reading, good intentions and answering. :-D


Post a reply to this message

From: clipka
Subject: Re: SUGGESTION: Saving Memory: Images
Date: 16 Dec 2015 14:50:00
Message: <web.56717921735e1ac7ad6fa18f0@news.povray.org>
Sven Littkowski <jam### [at] yahoocom> wrote:

> Thus my suggestion to the magnificent POV-Ray developer team, to allow
> such declarations. I believe, this could reduce memory usage further by
> preventing having to load the same image multiple times just because the
> map-type or any other modifier differs slightly. I would like to get
> some feedback of other users and surely of the developers, if possible.

No need for further user feedback - such a feature is already on the agenda...
somewhere. See my other post in povray.general (or wherever that was) a few
minutes ago.


Post a reply to this message

From: Sven Littkowski
Subject: Re: SUGGESTION: Saving Memory: Images
Date: 16 Dec 2015 18:29:52
Message: <5671ada0@news.povray.org>
Thanks, this is great news, and good to know! At the moment, the
computer goes almost down while parsing, and parsing alone takes up to
10 minutes for the scene I am working on...   :-D

I hope, this little implementation won't take too much time to do.


Post a reply to this message

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