POV-Ray : Newsgroups : povray.general : How is does the bounding work? Server Time
6 Aug 2024 10:23:52 EDT (-0400)
  How is does the bounding work? (Message 1 to 3 of 3)  
From: Ari-Matti Leppanen
Subject: How is does the bounding work?
Date: 11 Apr 2002 16:46:47
Message: <3cb5f637$1@news.povray.org>
If you make a simple and pointless merge like

merge{
  box { -1, 1  }
  sphere { y, 1 }
  bounded_by { cylinder { -y, 2*y, sqrt(2)} }
}

and trace it:
-------------------------------------------------
Box               957             504     52.66
Cone/Cylinder     957             957    100.00
CSG Merge         957             684     71.47
Sphere            957             448     46.81
Bounding Object   957             957    100.00
Bounding Box    78450            1914      2.44
-------------------------------------------------
the stats show intersection tests against a bounding object and a bounding
box. Why the bbox when the shape is already bounded manually?

Ari-Matti


Post a reply to this message

From: Slime
Subject: Re: How is does the bounding work?
Date: 11 Apr 2002 17:59:16
Message: <3cb60734$1@news.povray.org>
> the stats show intersection tests against a bounding object and a bounding
> box. Why the bbox when the shape is already bounded manually?

I'm willing to bet that the ray first tests to see if it hits the bounding
box of the bounding object. If it does, then it tests to see if it hits the
bounding object. If it does, then it tests to see if it hits the object
itself.

This probably speeds it up a bit, since you could technically specify an
isosurface or other slow-to-render object as the bounding object if you
wanted, and testing the bounding box of *that* object may speed up the
render.

Just a guess.

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

From: Ari-Matti Leppanen
Subject: Re: How does the bounding work?
Date: 12 Apr 2002 02:31:43
Message: <3cb67f4f@news.povray.org>
"Ari-Matti Leppanen" <ari### [at] ThisShouldBeRemovedtutfi> wrote
in message news:3cb5f637$1@news.povray.org...
> the stats show intersection tests against a bounding object and a bounding
> box. Why the bbox when the shape is already bounded manually?

Answering to myself: In the sorce of 3.1g it looks like the root node of the
bounding tree is bounded by a box big enough to contain all objects in the
tree, so that could be the reason.


Post a reply to this message

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