POV-Ray : Newsgroups : povray.advanced-users : Povtree macro (mesh created at parsing whith loops) seems to waste memory : Re: Povtree macro (mesh created at parsing whith loops) seems to waste memo= Server Time
26 Apr 2024 10:09:37 EDT (-0400)
  Re: Povtree macro (mesh created at parsing whith loops) seems to waste memo=  
From: Warren
Date: 21 Jul 2018 07:35:00
Message: <web.5b5319fcfe12f07620df21d60@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> You say that "the leaves are meshes"; if by that you mean that there is
> a leaf mesh, and the foliage of a single tree is multiple copies of that
> mesh, that does explain the symptoms.
>
> While meshes do share their bulk data when copied, they each carry their
> own individual overhead, which is heavier than one might think.
>
> If you use one mesh per leaf, you have a lot of overhead per triangle in
> the mesh, and thus the data sharing reduces the memory footprint only by
> a marginal fraction.
>
> If instead of one mesh per leaf you use one huge mesh for the entire
> foliage of the tree, you only have one instance of the overhead. You do
> have much more bulk data, and unless the leaf mesh is trivially simple
> this may actually leave you with a larger total memory footprint for a
> single tree; but as soon as you create multiple instances of that tree,
> the impact of the bulk data on the total memory footprint quickly
> diminishes.
>
> The term "compound object" in the context of POV-Ray is typically used
> in the sense of "non-primitive", i.e. an object that is comprised of
> other objects. Whether the members of such compound object are of same
> type or different types is irrelevant, as there's no special processing
> happening in same-type cases.

Ok , I think I understand. The overhead of a leaf can be a transform block (i.e.
scale , translate or rotate) or a texture block or any of his sub-part  or
something else I'm not thinking about. The texture for the leaves are applied
globally to the foliage though (If I'm not mistaking).

I said before the kapok tree was about 285 MB in size but I must say it is
exceptional, most of the mesh files are less than 50 MB and something like 5 MB
for the little flores. The precision of the mesh can be diminished in povtree,
but this is less acceptable for such a great tree like the kapok tree (a
rainforest tree, 6 times the highness of a stairless house compared to a plant
that is 1 meter high.

From now on, I will stick to the ready-made mesh files, the headache overhead is
much less important :-D.


Post a reply to this message

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