POV-Ray : Newsgroups : povray.general : --- : Re: Efficiency question, PovRay 3.1 - intersections? Server Time
3 Aug 2024 12:14:22 EDT (-0400)
  Re: Efficiency question, PovRay 3.1 - intersections?  
From: Warp
Date: 13 Feb 2004 04:47:46
Message: <402c9d42@news.povray.org>
Darren <dne### [at] sanrrcom> wrote:
> Now, the building consists basically of

> intersection {
>    union {
>      ... lots of walls ...
>     }
>     union {
>       ... all the doorways and windows ...
>     }
>   }

  Using enormous amounts of objects in an intersection will definitely
slow down a lot. You have probably found one of the most patological
cases. :)

  I recommend remodelleing your building without using intersection
(nor difference, of course).

  One way (I think) is to make more intersections (or differences) with
less objects. Something like this:

union
{ intersection { ... Wall 1 ... }
  intersection { ... Wall 2 ... }
  intersection { ... Wall 3 ... }
  ...
}

  (I haven't actually tested this will be faster, but if my logic is
correct, it should be.)

  Another way is to avoid intersection/difference completely.
  For example, if you have a wall with a window made with the difference
of two boxes, replace it with the union of four boxes instead. There will
be more primitives, but since there's no CSG it will probably be faster
when the number of walls grows.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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