Title: Fast and Simple 2D Geometric Proximity Queries Using Graphics Hardware
1- Fast and Simple 2D Geometric Proximity Queries
Using Graphics Hardware - Kenneth E. Hoff III, Andrew Zaferakis,
- Ming Lin, and Dinesh Manocha
- University of North Carolina at Chapel Hill
- I3D 2001
2Motivation
Colliding?
Yes / No
Contact Pairs
3Motivation
Colliding?
Yes / No
Contact Pairs
More information is required for computing
collision responses!
4Motivation
Colliding?
Exact
Yes / No
Contact Pairs
5Motivation
Colliding?
Exact
Yes / No
Contact Pairs
Approximate
6Proximity Queries
Intersections
Contact Points Normals
Closest Points,Separation Distance
Penetration Depth
7Our Approach
Hybrid Approach
Object-space Localization
Image-SpaceProximity Query
ProximityInformation
CPU
Graphics-HardwareAcceleration
Bounded-ErrorApproximation
8Related Work
- Proximity query algorithms
- Exact, object-space
- Approximate, image-space
- Distance fields
9Exact, Object-Space Algorithms
Preprocessing
Static Rigid Objects
Convex decomposition
Hierarchical data structures
Gilbert88 , Lin90, Cameron97, Ehmann00
Gottschalk96, Hubbard93, Johnson98, Quinlan94
10Exact, Object-Space Algorithms
Restricted Cases
- Dynamic
- Deformable
- Objects
Known surfacemotion trajectories
Specialized geometry (cloth)
Snyder93
Baraff92, Baraff98
11Approximate, Image-Space Algorithms
- Algorithms simplified and accelerated using
graphics hardware - Visibility Sutherland74, Catmull75
- Intersections Rossignac92, Myskowski95, Baciu98
- CSG Goldfeather86, Rossignac90, Stewart00
- Robot motion-planning Lengyel90, Hoff00
- Voronoi diagrams Hoff99
- Advantages
- Simplicity
- Bounded error
- Linear complexity
- Robustness
12Distance Fields
- Distance fields give distance to nearest object
from any point - Fast marching method Sethian96
- Generalized Voronoi diagrams Hoff99
- Adaptively-sampled distance fields Frisken00
- Distance fields for penetration
computation Fisher01
Distance field
3 point objects
13Distance Fields
- Voronoi diagram computation using graphics
hardware (Hoff99)
Render polygonal mesh approximations of object
distance fields
Color buffer
Depth buffer Result after compositing distance
fields using minimum depth test
14Our Goal
- Proximity query algorithm with the following
properties - Performs all proximity queries
- Handles non-convex primitives
- Requires no precomputation or complex data
structures - Fast and efficient
- Robust
- Portable
- Bounded error
- No previous algorithm found, even in 2D!
15Our Hybrid Approach
CPU
Graphics
Image-space proximity queries
Coarse object-spacegeometric localization
Balance load by varying localization coarseness
and error bound
16Geometric Localization
Potential Closest Points
Potential Intersections
- Reduces the number of pixels processed per
image-space query - Vary max depth in hierarchy to balance
CPU/graphics loads
17Image-Space Proximity Queries
- Intersections
- Distance field and gradients
- Contact points and normals
- Closest points
- Separation distance and direction
- Penetration depth and direction
18Intersections
Boundary-volume
Volume-volume
B
A
?
?
Draw A
Draw B
Intersection Overwritten Pixels
19Distance Field and Gradients
Draw polygon to encode negative sign in a buffer
Central difference to compute gradient at a pixel
20Image-Space Proximity Queries
- Intersections
- Distance field and gradients
- Contact points and normals
- Closest points
- Separation distance and direction
- Penetration depth and direction
21Contact Points and Normals
Normals from gradient of distance field
Close contact points as intersection of enlarged
boundary
22Closest Points
Find closest point on object A to object B
23Closest Points
Localize region on A containing the closest point
24Closest Points
Compute distance field of B in As localized
region
25Closest Points
- Render boundary of A to find set of potential
closest points - Check distances at each point to find the closest
26Separation Distance and Direction
Distance at closest point min separation
distanceGradient at closest point separating
axis direction
27Penetration Depth
Minimum translational distance needed to separate
objects
28Penetration Depth and Direction for a Point
B
A
d
Compute penetration depth anddirection for As
boundary pointsthat intersect Bs interior
29Putting it all together
Collision response between 2 deformable objects
A
B
30Localize Potential Intersections
A
B
31Find Penetrating Points
A
B
32Tighten Localized Region
A
B
33Compute Distance Field
A
B
34Compute Penetration Depth and Direction
A
B
35Repeat Process for Other Object
A
B
36Use Proximity Info for Collision Response
A
B
37Separation Forces from Penetration Depth
A
B
38Demonstrations
- Simulation test cases
- Rigid and deformable objects
- Different contact scenarios
- Collision response in 2 simulation strategies
- Non-penetration constraint, backtracking
- Unconstrained, penalty-based
- In each demo
- No precomputation
- Interactive frame rates
- Bounding-box intersection localization
- Pentium III 800, nVidia GeForce256
39MAP
- Non-convex, rigid objects
- Frequent simultaneous close contacts
- Unconstrained, penalty-based
40BUMPER CARS
- Convex, rigid objects
- Less frequent contact
- Non-penetration constraint, backtracking
41LINKS
- Non-convex, rigid objects
- Frequent interlocking contacts
- Unconstrained, penalty-based
42GEARS
- Non-convex, rigid objects
- Less frequent interlocking contacts
- Unconstrained, penalty-based
43WAVY
- Non-convex, deformable objects
- Continuous contact
- Unconstrained, penalty-based
Resolving extreme penetration
44Conclusion
- Hybrid object/image space proximity query
algorithm using graphics hardware acceleration - Desired goals have been met for 2D objects
45Summary of Properties
- Simple to implement
- Useful in a wide range of applications
- Running time related to the rendering time
- Error bound provides smooth dial between
performance and level of approximation - Varying the max depth in the hierarchical
localization allows balancing load between CPU
and graphics
46Current Work Extension to 3D
3D distance field
3D intersections
47Acknowledgements
- Sarah Hoff
- UNC Computer Science Dept.
- ARO, NSF, NIH, ONR, Intel
http//www.cs.unc.edu/geom/PIVOT/ Releasing the
libraries very soon! Demonstration tonight at UNC
open house
48Performance
Performance timings for dynamics simulations. The
number of objects, number of line segments, and
the average total time in milliseconds to run
proximity queries on all objects in the scene per
frame is reported. Timing data was gathered from
three machines a Pentium-III 933MHz desktop with
a 64Mb GeForce2, a SGI 300MHz R12000 with
InfiniteReality2 graphics, and a Pentium-III
750Mhz laptop with ATI Rage Pro LT graphics.
49Effects of Changes in Error Tolerance
The effect on performance when changing the
distance error tolerance d. We used proximity
queries on the wavy demo with no collision
response. The error determines the number of
pixels used in the image-based operations.
Systems with low graphics performance are more
directly affected by the choice of d (see ATI
Rage Pro LT) however, as the error is increased
there is less dependence on graphics performance
and the faster laptop CPU overtakes the
InfiniteReality2 system.