POV-Ray : Newsgroups : povray.beta-test : Wondering about Intersect_BBox : Re: Wondering about Intersect_BBox Server Time
30 Jun 2024 12:33:40 EDT (-0400)
  Re: Wondering about Intersect_BBox  
From: Tek
Date: 9 Oct 2010 05:40:51
Message: <4cb038a3@news.povray.org>
I don't know the source but a plane has an infinite bounding box. Also, 
maybe checking against a sphere is faster than checking a bounding box?

-- 
Tek
http://evilsuperbrain.com

"Le_Forgeron" <lef### [at] freefr> wrote in message 
news:4caf2856$1@news.povray.org...
> Greetings,
>
> Maybe a bit too early for povray.programming, so beta-test seems
> appropriate.
>

> beta.39 source at hand), and looking at the shapes objects code (in
> particular sphere & plane). (source/backend/shape/spheres.cpp &
> source/backend/shape/planes.cpp )
>
> Both sphere & plane reimplement Intersect_BBox for their class as
> "always true". (instead of ObjectBase::Intersect_BBox from which they
> inherit). And that seems rather counter productive, as it seems to me
> (but am I wrong ?) that the ObjectBase's implementation is fine
> (it checks the direction & side of the box).
>
> It then seems to me that with the overloaded Intersect_BBox, the
> Find_Intersection (from source/backend/scene/objects.cpp) will in fact
> never (for plane & sphere) use the bounding box, but call the
> ::All_Intersections method (and that might be costly **) for each ray.
>
> Did I miss a subtlety ( or more) ?
>
>
>
> **: it seems that a lot of shapes like to change the method for "always
> true", in effect removing the bounding box optimisation.
>

> about a few bytes per pixel once the rendering has been started (and I
> do not understand why, hence I'm searching), which occurs with an empty
> scene (one camera), as well as a scene with 4 spheres (or finite 3D
> objects) & one camera but not a scene with some planes (unless they
> reduced to less into a csg-intersection, but then it's more a csg than a
> plane).
> It's very obvious with the gnome system monitor, and a huge resolution:
> when povray starts, it allocates w*h*5 (let's say 9 GB for a square of
> 20500), and as the render progresses, it reach 16 GB (with a
> quasi-linear progression within an empty scene). It also seems that the
> release of that collection of memory takes some not so small time, as it
> is done while the file is saved, and it might be sub-optimal (I do not
> know yet what it is).
>
> -- 
> Real software engineers work from 9 to 5, because that is<br/>
> the way the job is described in the formal spec.  Working<br/>
> late would feel like using an undocumented external procedure.


Post a reply to this message

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