POV-Ray : Newsgroups : povray.advanced-users : Alternative to CSG : Re: Alternative to CSG Server Time
29 Jul 2024 14:25:28 EDT (-0400)
  Re: Alternative to CSG  
From: Mike Williams
Date: 9 Dec 2001 02:15:44
Message: <Eb7m5LA36wE8EwoB@econym.demon.co.uk>
Wasn't it Jkior who wrote:
>Hello (should this be posted on the newusers group?),
>I'm constructing a tunnel out of many small blocks - fairly simple stuff. 
>However, I'd like to cut a hole in it, for a doorway. Since I'm using while 
>loops, I don't see any way 
>to remove certain blocks, and #difference is *really* slow. Any suggestions on 
>this? By the way, deleting whole blocks to make the hole is perfectly fine.

Rather than trying to work out which bricks to delete, it's possible to
make "difference" got very much faster.

Differencing with collections of many small objects will often defeat
POVRay's automatic bounding algorithm. Effectively you end up with POV
having to check every brick for every ray, rather than only those that
bricks that are close to the ray.

I'd suggest that you try converting it from 

difference {
  union {
    lots of {
      individual_brick
    }
  }
  hole
}

to

union {
  lots of {
    difference {
      individual_brick
      hole
    }
  }
}

Which will allow POV to apply sensible automatic bounds around each
brick, and the scene will render in a fraction of the time.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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