Graphics Reference
In-Depth Information
B
A
B
A
(a)
(b)
Figure 10.5 Two AABBs in a configuration in which the algorithm fails to detect inter-
section, assuming orthographic projection. (a) Side view. (b) Front view.
objects are tested at once using this method edges must be offset away from the
object volume during rendering by some appropriate amount in order to avoid object
self-intersections. This test deals only with closed objects. As such, it is important that
no objects undergo clipping during rendering, as this effectively renders the objects
nonclosed.
The ray intersection parity test used here has strong similarities to the tests used
in stencil-buffer shadow volumes [Everitt02] and [Lengyel02] and CSG rendering
[Rossignac92], [Stewart02], and [Guha03]. As is the case for stencil-buffer shadow
volumes, hardware stencil buffer support is not actually required to perform the ray
intersection counting done here. For example, the equivalent of stencil operations
can be implemented using additive and subtractive blending on any one of the RGBA
channels of a color buffer [Röttger02].
If the concave objects A and B are given as CSG objects, GPU-based CSG rendering
techniques (referenced previously) can also be used to determine collision between
them. The objects are in collision if any pixels of the intersection of the two CSG trees
are rendered.
10.4 GPU-based Collision Filtering
In addition to being used as a pairwise test, the test of Section 10.2 can, with minor
changes, form the basis of a simple collision-filtering algorithm [Govindaraju03].
Recall that two objects are tested as nonintersecting if all fragments generated during
rasterization of a second object lie closer to the viewer than the values present in the
depth buffer from rendering a first object. For this case, the second object is said to
be fully visible with respect to the first object. By rasterizing several objects into the
depth buffer before the last object is tested, the test extends to multiple objects. If
the last tested object is fully visible, it follows that it is not in intersection with any of
the previous objects. The converse is not true, however. An object not in intersection
with other objects is not necessarily fully visible with respect to those objects. The
test is therefore conservative when applied to multiple objects.
Search WWH ::




Custom Search