POV-Ray : Newsgroups : povray.advanced-users : Povtree macro (mesh created at parsing whith loops) seems to waste memory Server Time
31 Oct 2024 19:33:11 EDT (-0400)
  Povtree macro (mesh created at parsing whith loops) seems to waste memory (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: Povtree macro (mesh created at parsing whith loops) seems to waste memo=
Date: 24 Jul 2018 19:00:00
Message: <web.5b57ae9e35a2b326a47873e10@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> Now here's the catch: When you instantiate any primitive or compound
> object in POV-Ray using `object{FOO}`, POV-Ray creates a COPY of the
> object in question.
>
> For most primitives and compound objects, this means the memory
> requirements are doubled.
>
> Only a handful of inherently memory-intensive primitives - such as
> meshes, blobs and height fields - share their bulk data among copies,
> thus allowing for a reduced memory footprint despite high number of
> copies. Unions and other CSG compounds - although potentially
> memory-intensive as well, depending on their complexity - do not fall
> into this category.
>

Thanks for that, and for the other comments about 'single leaf' mesh memory vs.
an entire tree mesh; very informative (and it clears up some of my own
misconceptions and guesses).

Besides meshes, blobs and height_fields, are there any other particular objects
that share data among copies (to the extent that the copies reduce the overall
memory needs in a meaningful way?)


Post a reply to this message

From: clipka
Subject: Re: Povtree macro (mesh created at parsing whith loops) seems to waste memo=
Date: 24 Jul 2018 20:16:24
Message: <5b57c158$1@news.povray.org>
Am 25.07.2018 um 00:57 schrieb Kenneth:

> Besides meshes, blobs and height_fields, are there any other particular objects
> that share data among copies (to the extent that the copies reduce the overall
> memory needs in a meaningful way?)

I've just had a quick look at the source code; there are actually a lot
more primitives that seem to share data than I remembered:

- blob
- height_field
- isosurface (sharing the function code)
- lathe
- mesh / mesh2
- polygon
- prism
- sor
- text (data shared on a per-character basis)

Also, I might have missed one or two others. I just had a cursory glance.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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