POV-Ray : Newsgroups : povray.general : # of objects in a model : Re: # of objects in a model Server Time
5 Aug 2024 00:21:58 EDT (-0400)
  Re: # of objects in a model  
From: Vadim Sytnikov
Date: 16 Jan 2003 19:16:31
Message: <3e274b5f$1@news.povray.org>
"Slime" <slm### [at] slimelandcom> wrote in message
news:3e272d85@news.povray.org...
> Put just the model in a scene by itself, without any other objects (like
> ground planes or whatever). The "number of frame level objects" should
then
> be an accurate count of the number of objects in the model.

Well, it wouldn't. At least, not always.

Roughly speaking, "number of frame-level objects" is the number of
primitives plus the number of intersections and other compound objects
*except* unions. POV-Ray's parser splits unions (including nested unions, to
any depth) until it "hits" a primitive, or a non-union compound object. It
is the result of this process that defines that number... And the reason
behind this is very strong: building an efficient bounding slabs' tree.

As an illustration, try making the following scene: turn your complex model
into, say, a stone one by making an intersection of your model and large
enough sphere; assign stone texture to that intersection; add a point light.
Render the scene and see how many "frame level objects" you've got. Voila --
just one. If you make a complex enough model with intersection being at its
root, and then try to render it (so that this model occupies entire camera
view), chances are it will render for ages. The rendering performance
distinction between unions and other compounds is so big that that might as
well be in the VFAQ and/or manual...

So, if I understood your question correctly, you are not supposed to get an
easy unswer. If your model, say, contains a golf ball made as an
intersection of a sphere with N smaller ones (e.g. created using #while),
your ball will always count as a single frame-level object.


Post a reply to this message

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