POV-Ray : Newsgroups : povray.newusers : Repeated objects and Memory Server Time
27 Nov 2024 21:33:08 EST (-0500)
  Repeated objects and Memory (Message 1 to 7 of 7)  
From: Chris Becker
Subject: Repeated objects and Memory
Date: 28 Mar 2002 13:08:03
Message: <3ca35c03$1@news.povray.org>
In a scene I have a rather complex object (aka tree) that I want to repeat
several times. The tree consists of about 40 branches all of which are the
same object. Now, does POV-Ray optimize in that if I use the same object
(like with #declare blah = object{ or union{) it will only create one of
those in memory and just transform and texture it?

Currently, for one tree POV-Ray states 250,000 objects, 330megs peak to
render. If I have some many repeated objects, shouldn't it be much much
less? Or I am declaring the stuff wrong?

Thanks in advance!


Post a reply to this message

From:
Subject: Re: Repeated objects and Memory
Date: 28 Mar 2002 13:11:42
Message: <k2n6augfrg9ter7dvmgs39jumui12m3hq6@4ax.com>
On Thu, 28 Mar 2002 13:10:08 -0500, "Chris Becker" <cmb### [at] ritedu> wrote:
> In a scene I have a rather complex object (aka tree) that I want to repeat
> several times. The tree consists of about 40 branches all of which are the
> same object. Now, does POV-Ray optimize in that if I use the same object
> (like with #declare blah = object{ or union{) it will only create one of
> those in memory and just transform and texture it?

You can simple check this comparing memory usage reported in output after
rendering of one instance and two insttances of your object. But short answer
is: in general it is omptimized only for meshes.

ABX


Post a reply to this message

From: Chris Becker
Subject: Re: Repeated objects and Memory
Date: 28 Mar 2002 13:26:46
Message: <3ca36066$1@news.povray.org>
This is why I ask, while looking for a tree macro I came upon this page:

http://www.netaxs.com/~ptdawson/ptdtree3.htm

which has a picture with a thousand trees and says that it only takes up the
same amount of memory as one tree. Is this because they're made up of
triangles and not other objects?


news:k2n6augfrg9ter7dvmgs39jumui12m3hq6@4ax.com...
> On Thu, 28 Mar 2002 13:10:08 -0500, "Chris Becker" <cmb### [at] ritedu>
wrote:
> > In a scene I have a rather complex object (aka tree) that I want to
repeat
> > several times. The tree consists of about 40 branches all of which are
the
> > same object. Now, does POV-Ray optimize in that if I use the same object
> > (like with #declare blah = object{ or union{) it will only create one of
> > those in memory and just transform and texture it?
>
> You can simple check this comparing memory usage reported in output after
> rendering of one instance and two insttances of your object. But short
answer
> is: in general it is omptimized only for meshes.
>
> ABX


Post a reply to this message

From:
Subject: Re: Repeated objects and Memory
Date: 28 Mar 2002 13:39:12
Message: <slo6au4sgfeaem9t3ii7eo8afn7q949maf@4ax.com>
On Thu, 28 Mar 2002 13:28:50 -0500, "Chris Becker" <cmb### [at] ritedu> wrote:
> This is why I ask, while looking for a tree macro I came upon this page:
> http://www.netaxs.com/~ptdawson/ptdtree3.htm
> which has a picture with a thousand trees and says that it only takes up the
> same amount of memory as one tree. Is this because they're made up of
> triangles and not other objects?

Yes, but I suppose author of this page/macro was inaccurate. Next mesh instance
reuires at least memory for transformation and pointer to original mesh
structure.

ABX


Post a reply to this message

From: Warp
Subject: Re: Repeated objects and Memory
Date: 28 Mar 2002 14:37:53
Message: <3ca37111@news.povray.org>

> Yes, but I suppose author of this page/macro was inaccurate. Next mesh instance
> reuires at least memory for transformation and pointer to original mesh
> structure.

  I think that in 3.5 it also requires memory for the textures in the mesh.
(This was necessary to fix the bug about textures not being transformed
with meshes.)

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: John VanSickle
Subject: Re: Repeated objects and Memory
Date: 29 Mar 2002 13:20:21
Message: <3CA4B171.7BCA9765@hotmail.com>
Make a tree into a mesh.   Copy that object 40 times.

In the Petrified Orchard Valley (where all of the Rusty animations
take place), I have several hundred trees.  They are meshes built 
from a fractal pattern.  There are only three different ones, scaled
and rotated.  Not much memory used.

-- 
Rusty is rendering!


Post a reply to this message

From: Tom Melly
Subject: Re: Repeated objects and Memory
Date: 2 Apr 2002 08:26:58
Message: <3ca9b1a2$1@news.povray.org>
"John VanSickle" <evi### [at] hotmailcom> wrote in message
news:3CA4B171.7BCA9765@hotmail.com...
> Make a tree into a mesh.   Copy that object 40 times.
>
> In the Petrified Orchard Valley (where all of the Rusty animations
> take place), I have several hundred trees.  They are meshes built
> from a fractal pattern.  There are only three different ones, scaled
> and rotated.  Not much memory used.
>

15,000 in my latest irtc image.... (4 flavours, and w/ different rotations and
scales for each copy).


Post a reply to this message

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