POV-Ray : Newsgroups : povray.unofficial.patches : BSP tree bounding patch : Re: BSP tree bounding patch Server Time
28 Sep 2024 16:49:36 EDT (-0400)
  Re: BSP tree bounding patch  
From: Christoph Hormann
Date: 27 Nov 2003 04:45:15
Message: <hprg91-5n2.ln1@triton.imagico.de>
Andrew Clinton wrote:
> Hello all,
> 
> I've been thinking about writing a patch for some time, but only in the past
> month have I taken some time to do the research and put one together.  What
> I've implemented is a BSP tree data structure that can be used in place of
> the bounding volumes/light buffer/vista buffer to improve raytracing
> performance.  The premise is that for scenes with many objects, a lot of
> time is spent sorting the bounding box intersections from front to back,
> and intersecting bounding boxes that may later be discarded.  With a
> spatial subdivision like a BSP tree that partitions *space* instead of
> *objects*, there is no need for a sort on the length of the ray, as the
> space can be efficiently traversed in order, and few additional bounding
> box intersections are required than those in front of the final object
> intersection.

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.

> I've put together the patch as a set of diffs (following the example of the
> previous patch posted here).  The patch can be found at
> http://povplace.addr.com/bsppov.tar.gz

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.

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.

> 
> There is still lots of room for optimization for the patch, and I am working
> on having it work on objects with some internal structure like meshes.

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

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

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