POV-Ray : Newsgroups : povray.general : --- : Re: Efficiency question, PovRay 3.1 - intersections? Server Time
3 Aug 2024 12:20:49 EDT (-0400)
  Re: Efficiency question, PovRay 3.1 - intersections?  
From: Mike Williams
Date: 14 Feb 2004 01:37:50
Message: <21bVRDACabLAFwX8@econym.demon.co.uk>
Wasn't it Darren who wrote:

>First, a difference is actually an intersection with everything but the 
>first item having its "inside" and "outside" swapped, right? So
>   difference { box {...}  sphere {...} }
>is the same as
>   intersection { box { ... } sphere {... inverted} }
>right? If that's the case, why can't Pov-Ray figure out what the 
>bounding box is? Surely it can't be bigger than the bounding box of the 
>first item?

That's right, it's just that POV can't automatically determine any
tighter bounds than that. In some circumstances it's possible to
manually construct bounds that are very much better than that. This
tends to happen if the difference/intersection removes the majority of
the first object and in situations where there are a large number of
small holes.

>Secondly, if I have a bunch of walls, a bunch of lights, and a bunch of 
>holes in the walls, even with my back to the walls, doesn't PovRay have 
>to consider all the holes and all the lights to figure out what shadows 
>I see? I mean, picture stonehenge with many campfires inside, in turn 
>inside an airplane hanger. If I'm standing outside the ring facing away, 
>  how does PovRay know what to show me as light and dark on the wall 
>without having to consider a large number of holes anyway?

It still has to consider all the holes, but with good manual bounding it
would be possible for POV to know which holes to consider for each
individual ray that it traces. With weak bounding, POV has to test every
hole *for*every*ray* from every campfire. If there are lots of holes and
lots of rays that can sometimes be quite slow. Common sense may tell us
that a ray travelling North doesn't need to be tested to see if it
passes through a hole on the South side of the structure, but without
good bounding POV doesn't have a clue, so it performs an intersection
test. 

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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