POV-Ray : Newsgroups : povray.general : Mesh bounding Server Time
31 Jul 2024 02:24:14 EDT (-0400)
  Mesh bounding (Message 1 to 4 of 4)  
From: Bill Pragnell
Subject: Mesh bounding
Date: 7 Feb 2008 06:25:00
Message: <web.47aaea152b12b227731f01d10@news.povray.org>
Are there any circumstances under which manually bounding mesh objects is more
efficient than using the automatic bounding hierarchy? Since it is possible to
turn off the feature and do it manually I'd guess yes, but I can't find out how
it might be the case.

Can anyone shed any light on this for me?

Bill


Post a reply to this message

From: Mike Williams
Subject: Re: Mesh bounding
Date: 7 Feb 2008 06:57:18
Message: <5+u1t3JUHvqHFwjv@econym.demon.co.uk>
Wasn't it Bill Pragnell who wrote:
>Are there any circumstances under which manually bounding mesh objects is more
>efficient than using the automatic bounding hierarchy? Since it is possible to
>turn off the feature and do it manually I'd guess yes, but I can't find out how
>it might be the case.
>
>Can anyone shed any light on this for me?

The usual situations where manual bounding can be better are those where 
the intersection or difference of two large objects produces a small 
result. If you have prior knowledge about the size of the result, you 
can set the bounds to match it, whereas POV has no such prior knowledge 
and has to set the bounds much larger.

Another factor is that the automatic bounding slabs are always aligned 
with the axes. So if you had a mesh object of a thin plate which was 
tilted at 45 degrees there might be some gain from bounding it with a 
thin box which was also tilted at that angle. Mesh objects render so 
efficiently anyway that the gains would be unlikely to be very 
significant unless the mesh object has a large number of large polygons.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Bill Pragnell
Subject: Re: Mesh bounding
Date: 7 Feb 2008 07:40:00
Message: <web.47aafb2656769dd8731f01d10@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> The usual situations where manual bounding can be better are those where
> the intersection or difference of two large objects produces a small
> result.

Understood; I've used this trick before and it can yield massive speed gains in
some circumstances.

> Another factor is that the automatic bounding slabs are always aligned
> with the axes.

Presumably it follows that manual bounding shapes are transformed with their
parents and end up at angles, etc...?

> Mesh objects render so
> efficiently anyway that the gains would be unlikely to be very
> significant unless the mesh object has a large number of large polygons.

Hmm. I'll try to explain the source of my suspicions. I have a large number of
small meshes in a union (see my recent post in p.b.i). I'm using MegaPOV, which
draws bounding rectangles on the render window before it starts tracing - I
understand this is a representation of the vista buffer. All of the bounding
rectangles for my mesh objects seem to be much larger than the meshes. Is this
because of the way the vista buffer works or is it a symptom of inefficient
mesh bounding shapes?

I'm sorry I don't have any screenshots - I'll try get some tonight if it helps.

Bill


Post a reply to this message

From: Tim Attwood
Subject: Re: Mesh bounding
Date: 7 Feb 2008 17:02:29
Message: <47ab7ff5$1@news.povray.org>
>> The usual situations where manual bounding can be better are those where
>> the intersection or difference of two large objects produces a small
>> result.
>
> Understood; I've used this trick before and it can yield massive speed 
> gains in
> some circumstances.
>
>> Another factor is that the automatic bounding slabs are always aligned
>> with the axes.
>
> Presumably it follows that manual bounding shapes are transformed with 
> their
> parents and end up at angles, etc...?
>
>> Mesh objects render so
>> efficiently anyway that the gains would be unlikely to be very
>> significant unless the mesh object has a large number of large polygons.
>
> Hmm. I'll try to explain the source of my suspicions. I have a large 
> number of
> small meshes in a union (see my recent post in p.b.i). I'm using MegaPOV, 
> which
> draws bounding rectangles on the render window before it starts tracing - 
> I
> understand this is a representation of the vista buffer. All of the 
> bounding
> rectangles for my mesh objects seem to be much larger than the meshes. Is 
> this
> because of the way the vista buffer works or is it a symptom of 
> inefficient
> mesh bounding shapes?
>
> I'm sorry I don't have any screenshots - I'll try get some tonight if it 
> helps.

POV splits bounding of unions into bounding for the objects inside the
union, so if you bounded_by the union it'll almost always be less efficent,
since then it can't split the bounding of the union.

Bounded_by always adds an extra bounding test... for it to be better to
use manual bounding the automatic bounding needs to have lots of
empty space, and because automatic bounding boxes are aligned to the
axes that happens. It's also much faster to test bounding on a box that
is aligned to the axes...


Post a reply to this message

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