POV-Ray : Newsgroups : povray.unofficial.patches : BSP tree bounding patch : Re: BSP tree bounding patch Server Time
28 Sep 2024 16:46:50 EDT (-0400)
  Re: BSP tree bounding patch  
From: Andrew Clinton
Date: 27 Nov 2003 09:10:01
Message: <web.3fc603926b3b1e2c611ee4e60@news.povray.org>
Christoph Hormann wrote:
>It would be quite important to give separate results for the speed
>improvement of the different parts.  The (2d) vista buffer for example
>can be completely different from the bounding box hierarchies in this
>concern.
>

The BSP tree replaces the combination hierarchy+vista+lightbuffer.  There is
really no need to try and speed it up with screen space hierarchies because
the traversal is fast enough without them.  In fact they might slow it
down.  All my tests have compared BSP tree (with no vista or light buffers)
against bounding box hierarchy (with vista and light buffers).

>In many cases it would be preferable to have a full set of the changed
>source files with the modifications marked with comments/preprocessor
>directives instead of the diffs.  This makes it much easier to integrate
>the changes into a different version of POV.
>

I'll see if I can put together something like this tonight...

>Having a quick look at the diff i have the impression that there are
>also changes not directly related to the main patch.  Some more comments
>in the code would be helpful.
>

I'm working on this... I hope to release more versions in the future that
will clean a few things up.  Most of the changes are related to the patch.
One exception is that there is a bug fix in TEST_RAY_FLAGS_SHADOW() macro,
which did not seem to be making the right check when light buffer is
disabled.  Also I've moved the method to initialize interior list (using
bounding boxes) into bbox.h which seemed to make more sense.  The only
other change I can think of is to more intelligently compute bounding box
for clipped or manually bounded objects in parse.cpp (I think this change
is correct).

>
>I have my doubts a BSP tree would be more efficient for meshes than the
>current octree but i can't say for sure.

Are you sure that meshes use octree for acceleration?  It seemed quite clear
to me when I looked at the code that it is just using the functions in
bbox.h to create a bounding box hierarchy for the triangles.  In this case
the BSP tree would give performance improvements comparable to the
performance improvement in normal scenes I've tested, because triangles are
simple to intersect.  I do not know how it would compare with an octree.

Andrew Clinton


Post a reply to this message

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