POV-Ray : Newsgroups : povray.general : Question: Lower Memory Usage in Scenes? Server Time
31 Oct 2024 16:17:23 EDT (-0400)
  Question: Lower Memory Usage in Scenes? (Message 1 to 3 of 3)  
From: Sven Littkowski
Subject: Question: Lower Memory Usage in Scenes?
Date: 22 Jan 2016 15:09:22
Message: <56a28c72@news.povray.org>
Hi, some months ago, when I inquired about the usage of images in
POV-Ray, I got the answer that pointing to the file of each image only
one time and then just re-declaring saves a lot of memory. Before that
advise, I pointed to the file of each image several times. Each time of
reading the original file, POV-Ray assigns an amount of memory to it.

Indeed, my scene parses now much faster, and I am happy.

But now I am wondering, if the same applies to the usage of the shapes
in POV-Ray. I wonder, if I would declare an "original" box one time, and
then use more and more boxes just as re-declaration of the "original"
box would save lots of memory, or if it does make no difference (in
opposition to the images).

EXAMPLE

#declare OriginalBox = box // POV-Ray assigns memory to this box object
{
 < 0.0, 0.0, 0.0 > < 1.0, 1.0, 1.0 >
}

object { OriginalBox scale < ... > translate < ... > texture { ... } }
// or
#declare Bungalow = OriginalBox
{
 scale < ... >
 translate < ... >
 texture { ... }
}


Post a reply to this message

From: clipka
Subject: Re: Question: Lower Memory Usage in Scenes?
Date: 22 Jan 2016 18:30:08
Message: <56a2bb80$1@news.povray.org>
Am 22.01.2016 um 21:09 schrieb Sven Littkowski:
> Hi, some months ago, when I inquired about the usage of images in
> POV-Ray, I got the answer that pointing to the file of each image only
> one time and then just re-declaring saves a lot of memory. Before that
> advise, I pointed to the file of each image several times. Each time of
> reading the original file, POV-Ray assigns an amount of memory to it.
> 
> Indeed, my scene parses now much faster, and I am happy.
> 
> But now I am wondering, if the same applies to the usage of the shapes
> in POV-Ray. I wonder, if I would declare an "original" box one time, and
> then use more and more boxes just as re-declaration of the "original"
> box would save lots of memory, or if it does make no difference (in
> opposition to the images).

Currently it only applies to geometric primitives with "bulk" data, that
is meshes and blobs. All other shapes -- most notably including CSG
constructs -- are copied.

Also, even meshes and blobs only share the "bulk" data among the various
copies.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Question: Lower Memory Usage in Scenes?
Date: 22 Jan 2016 21:22:40
Message: <56a2e3f0$1@news.povray.org>
Thanks. :-)


Post a reply to this message

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