POV-Ray : Newsgroups : povray.advanced-users : Mesh replacements for primitives? : Re: Mesh replacements for primitives? Server Time
2 May 2024 05:41:30 EDT (-0400)
  Re: Mesh replacements for primitives?  
From: clipka
Date: 6 Aug 2016 21:33:56
Message: <57a69004$1@news.povray.org>
Am 07.08.2016 um 02:26 schrieb Bald Eagle:

> I just ran a scene that employed 8 million spheres, and that ate up 11 GIGAbytes
> of memory.  (I'm glad I recently shoved 16 GB into this thing) :O
> 
> Finite Objects:      8026445
> Peak memory used:       11 487 420 416 bytes
> 
> As I understand it, I can declare a mesh object once, and then just translate
> instances of it, which doesn't take up any, or very much more memory.

I'm sorry to disappoint you, but using meshes won't give you as much of
an advantage in terms of memory as you might expect.

While creating multiple instances of a mesh does indeed typically add
only little memory overhead compared to the mesh data itself, that
overhead is still in the same ballpark as that for a single sphere.

(It may also be worthwhile noting that the "Finite Objects:" entry in
the parser summary only specifies the number of finite obects at the top
level of the scene. This does include objects in pure unions (as the
parser will pull them out into the top level), but not in other CSG
constructs.)


That said, I've just identified a block of 256 bytes allocated for each
and every sphere that is translated, rotated, scaled or otherwise
transformed, which I might be able to get rid of.


Post a reply to this message

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