POV-Ray : Newsgroups : povray.general : Speed up Boolean : Re: Speed up Boolean Server Time
30 Jul 2024 12:26:26 EDT (-0400)
  Re: Speed up Boolean  
From: clipka
Date: 9 Feb 2009 21:30:01
Message: <web.4990e65b9aa695af4e63d9990@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
> Mike Williams put together a page describing the problem and a few
> alternative approaches to minimising the slowdown at
> http://www.econym.demon.co.uk/holetut/index.htm.

The solutions are probably good, but the description of the underlying problem
is a bit misleading.

The better bounding that POV can take advantage of in the described scenario is
not applied to unions - it is applied to scene level objects. It only shows in
the described scenario because POV "unwraps" unions to scene level if possible.

For example, the following construction suffers from the very same slowdown as a
difference - simply because the merge prevents the union from being "unwrapped":

    merge {
      union {
        // place a host of cylinders here
      }
    }

The true underlying problem is a totally different one: Due to the inner design
of POV-Ray, objects aren't tested for the *first* intersection with a ray, but
rather *all* intersections. It is only afterwards that the very first of them
is determined.

Whether it is an intersection, a union or a merge, this invariably means that
*all* components have to be tested for intersections. And if the components are
all cylinders, bounding boxes wouldn't win a thing because the effort would be
about the same.

Ironically, the mechanism to test for *all* intersections is required for
objects to work properly in CSG intersections...


Post a reply to this message

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