POV-Ray : Newsgroups : povray.binaries.images : Lonely tree : Re: Lonely tree Server Time
30 Jul 2024 08:21:58 EDT (-0400)
  Re: Lonely tree  
From: clipka
Date: 6 Jul 2012 06:31:29
Message: <4ff6be81$1@news.povray.org>
Am 05.07.2012 20:20, schrieb nemesis:

>> Also it's all grass. 6 GB worth of mesh grass.
>
> That's quite insane.  I mean, sure there's a lot of grass blades there, but
> aren't they all instances of the same simple geometry?  Why all that data?

Multiple instances of the same mesh only share vertices, UV coordinates, 
normals and faces (plus possibly per-triangle or per-vertex textures); 
other stuff can be different per instance, and thus require some 
per-instance memory overhead, most notably the transformation 
information, which requires a whopping quarter kB (4x4 64-bit floats for 
the matrix, plus the same for its precomputed inverse). Now multiply 
that by two dozen million of grass blades and you're there.

Now you may think that a dozen million grass blades is a lot; but at an 
estimated density of one grass blade per cm^2, that's a lousy 60m x 40m 
worth of grass.

For more efficient memory use, I'd recommend defining not single grass 
blades, but an assorted collection of grass patches, maybe 100 blades 
per patch. With an estimated 100 triangles and vertices per blade, and 
10 different patches (which you can rotate and flip to give added 
variation), the pure mesh data would still remain reasonably "small" (a 
guesstimated 15 MB), while cutting down the per-instance overhead by a 
factor of 100 (to 60 MB in this case).


Post a reply to this message

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