07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Bounding volume 23<br />

Bounding volume<br />

For building code compliance, see Bounding.<br />

In computer <strong>graphics</strong> and computational geometry, a bounding<br />

volume for a set of objects is a closed volume that completely contains<br />

the union of the objects in the set. Bounding volumes are used to<br />

improve the efficiency of geometrical operations by using simple<br />

volumes to contain more complex objects. Normally, simpler volumes<br />

have simpler ways to test for overlap.<br />

A bounding volume for a set of objects is also a bounding volume for<br />

the single object consisting of their union, and the other way around.<br />

Therefore it is possible to confine the description to the case of a single<br />

object, which is assumed to be non-empty and bounded (finite).<br />

Uses of bounding volumes<br />

Bounding volumes are most often used to accelerate certain kinds of tests.<br />

A three dimensional model with its bounding box<br />

drawn in dashed lines.<br />

In ray tracing, bounding volumes are used in ray-intersection tests, and in many rendering algorithms, they are used<br />

for viewing frustum tests. If the ray or viewing frustum does not intersect the bounding volume, it cannot intersect<br />

the object contained in the volume. These intersection tests produce a list of objects that must be displayed. Here,<br />

displayed means rendered or rasterized.<br />

In collision detection, when two bounding volumes do not intersect, then the contained objects cannot collide, either.<br />

Testing against a bounding volume is typically much faster than testing against the object itself, because of the<br />

bounding volume's simpler geometry. This is because an 'object' is typically composed of polygons or data structures<br />

that are reduced to polygonal approximations. In either case, it is computationally wasteful to test each polygon<br />

against the view volume if the object is not visible. (Onscreen objects must be 'clipped' to the screen, regardless of<br />

whether their surfaces are actually visible.)<br />

To obtain bounding volumes of complex objects, a common way is to break the objects/scene down using a scene<br />

graph or more specifically bounding volume hierarchies like e.g. OBB trees. The basic idea behind this is to organize<br />

a scene in a tree-like structure where the root comprises the whole scene and each leaf contains a smaller subpart.<br />

Common types of bounding volume<br />

The choice of the type of bounding volume for a given application is determined by a variety of factors: the<br />

computational cost of computing a bounding volume for an object, the cost of updating it in applications in which<br />

the objects can move or change shape or size, the cost of determining intersections, and the desired precision of the<br />

intersection test. The precision of the intersection test is related to the amount of space within the bounding volume<br />

not associated with the bounded object, called void space. Sophisticated bounding volumes generally allow for less<br />

void space but are more computationally expensive. It is common to use several types in conjunction, such as a<br />

cheap one for a quick but rough test in conjunction with a more precise but also more expensive type.<br />

The types treated here all give convex bounding volumes. If the object being bounded is known to be convex, this is<br />

not a restriction. If non-convex bounding volumes are required, an approach is to represent them as a union of a<br />

number of convex bounding volumes. Unfortunately, intersection tests become quickly more expensive as the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!