POV-Ray : Newsgroups : povray.general : Mesh2 instancing? : Mesh2 instancing? Server Time
2 Aug 2024 04:16:52 EDT (-0400)
  Mesh2 instancing?  
From: Tim Nikias
Date: 23 Jan 2005 11:34:40
Message: <41f3d220@news.povray.org>
So, I know that POV-Ray will, when declaring a mesh and re-using it several
times over, not create several copies of the mesh in the memory, but rather
create one mesh and just store pointers to it for further instances.

Does that still hold true when the mesh2 is saved within an array? I've got
a 2D-Array which stores several mesh2 objects, which I reuse several
thousand times to create hair/fur. Now, memory consumption doesn't look like
it's just placing pointers, unless these pointers are rather large to carry
all kinds of informations...

My "furry fellow" image in p.b.i. used 74 hairs to place 5300 hairs, and it
used 18MB peak memory. The latest test place 30.000 hairs using those same
74 base-hairs, and I had 70MB peak memory. That'd be roughly 50MB additional
data for 25.000 hairs. The hairs are placed in a union and that union gets a
texture, so as I understand it, the texure-information shouldn't be saved
for each hair, but I'm no expert on POV-Ray's mechanics. Any clues?

Of course, if the mesh2-pointer/instancing-thingy doesn't work when used
with arrays, the entire work is only a speed-up on the parsing (no need to
parse 30.000 individual hairs), but not on the memory, which was the main
goal...

Thanks in advance for any insight someone can give,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

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