POV-Ray : Newsgroups : povray.advanced-users : memory usage & large number of objects : Re: memory usage & large number of objects Server Time
1 Jul 2024 05:29:35 EDT (-0400)
  Re: memory usage & large number of objects  
From: clipka
Date: 17 Nov 2009 20:01:50
Message: <4b03477e@news.povray.org>
Folkert van Heusden schrieb:
>>> I'm trying to render a scene with a large number of objects (scene
>>> generated by a 3D fractal); 3 milion and more objects. As you'll
>>> understand this will use a lot of memory. Now I was wondering: what
>>> object is the most memory efficient?
>> If triangles will suffice, then generating a mesh should be the most
>> efficient.
> 
> Will try.
> But are you sure? As you then have twice as much objects.
> Or are boxes internally split-up in 6 x 2 (2 triangles per side) 
> triangles?

Boxes, like any objects in POV-Ray, are not represented as polygon 
meshes (except for mesh objects of course :-)), but as a set of 
parameters to an object-type-soecific algorithm that will test whether 
and where a straight line intersects the object, or whether a given 
point is inside the object.

Theoretically, this would leave you with two coordinate points for 
boxes, but three coordinate points for triangles.

In practice however, each object also stores a bunch of additional data 
common to /all/ object types: A transformation matrix, a reference to a 
texture, and a reference to an interior, to name just a few.

With a bunch of boxes, you get this overhead once per box. With a mesh, 
you get this overhead once per mesh.


> What do you mean with aggregate? According to wikipedia it means 
> composite (am not a native speaker. Does that mean with respect to povray 
> something like this?
> 
> #declare myobj =
>         box { <0, 0, 0>, <1, 1, 1> texture { pigment { rgb <0.25, 1.0, 
> 0.25 } } }
> 
> and then use
> 
> object { myobj rotate <somevalue> translate <someohter> }

No, more like

union {
   box {...}
   box {...}
   box {...}
   ...
   texture { ... }
}


Post a reply to this message

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