POV-Ray : Newsgroups : povray.general : Output Statistics Questions : Re: Output Statistics Questions Server Time
2 Nov 2024 11:24:52 EDT (-0400)
  Re: Output Statistics Questions  
From: Mike Williams
Date: 17 Mar 2004 22:57:49
Message: <3mIOWDAH2RWAFweG@econym.demon.co.uk>
Wasn't it How Camp who wrote:

>Yep - as you and others pointed out,  I rather screwed this up.  So,
>then, perhaps (well, er, obviously) I don't understand how bounding
>boxes work:
>
>Let's say I have two long cylinders perpendicular to one another - a
>'+' shape of some sort.
>
>Separately, the bounding boxes would be tight around each cylinder.
>If I place them in a union together, I've got one large bounding box,
>which I suppose could be less efficient than two tight bounding boxes
>done separately.  Er, am I right so far?

Not for *unions*. For unions and merges it's possible to bound
intelligently, and POV does so. It's possible to see the effect by
rendering a simple pair of crossed cylinders with the switches 
 +MB0 +UD

camera {location  <0,0,-10> look_at <0,0,0> angle 20}
light_source {<-30, 100, -30> color rgb 1}
union {
  cylinder {-x,x,0.01}
  cylinder {-y,y,0.01}
  pigment {rgb 1}
}

The +MB0 sets the bounding threshold to zero. POV would normally switch
bounding off on a scene with so few objects. +UD tells POV to display
the outlines of the Vista Buffers before tracing. Vista Buffers are
derived from the bounding slabs and (in most cases) give you a good 2D
representation of where the 3D bounding slabs are.

You'll see that there are two red rectangles which fit the cylinders
tightly. And you'll also see this in the stats (this is for a 320*240 no
AA rendering), showing that only a small number of cylinder tests were
performed.

------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
------------------------------------------------------------------
Cone/Cylinder                     2035            1162     57.10

If you render a scene with two separate cylinders you get exactly the
same red rectangles and exactly the same stats.




With intersections and differences, however, there can be situations
where POVs automatic bounding can't create such tight fits. 

For example, see <http://www.econym.demon.co.uk/holetut/index.htm>.
A box with 1600 cylindrical holes in it took 26 minutes 25 seconds to
render, but after rewriting the scene so that POV could bound it better
it took 8 seconds.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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