Fast Collision Detection for Deformable Models using Representative-Triangles Sean Curtis 1, Rasmus...
-
Upload
walter-stone -
Category
Documents
-
view
224 -
download
0
Transcript of Fast Collision Detection for Deformable Models using Representative-Triangles Sean Curtis 1, Rasmus...
Fast Collision Detection for Deformable Models using Representative-Triangles
Sean Curtis1, Rasmus Tamstorf 2, & Dinesh Manocha1
I3D 2008February 15, 2008
1 University of North Carolina at Chapel Hill 2 Walt Disney Animation Studios
Faster Collision Detection
• Seven layers of cloth and body with 50K triangles.
• 3.3X collision detection speed-up with Representative Triangles.
Previous Work
• General surveys– Ericson 2004; Lin and Manocha 2003;
Teschner et al. 2005.
Previous Work
• Triangle-pair Culling– BVH - BV types
• Sphere, Swept-sphere, AABB, OBB, k-DOP, hybrid, etc.
• Bradshaw and O’Sullivan. 2004; Gottschalk et al. 1996; Hubbard 1993; Klosowski et al. 1998; van den Bergen 1997; etc.
Previous Work
• Triangle-pair Culling– BVH Management
• Restructuring, rebuilding, lazy construction, etc.
• Larsson and Akenine-Möller 2006; Otaduy et al. 2007, Yoon et al. 2007; Zachmann and Weller 2006.
Previous Work
• Triangle-pair Culling– BVH Management
• Restructuring, rebuilding, lazy construction, etc.
• Larsson and Akenine-Möller 2006; Otaduy et al. 2007, Yoon et al. 2007; Zachmann and Weller 2006.
– Specialized culling techniques• Normal cones, GPU-based culling, etc.
• Govindaraju et al. 2005; Provot 1997; Sud et al. 2006.
Previous Work
• Feature-based Collision Detection– Voronoi regions (convex and non-convex)
• Ehmann and Lin 2001; Lin and Canny 1991; Mirtich 1998.
Previous Work
• Feature-based Collision Detection– Voronoi regions (convex and non-convex)
• Ehmann and Lin 2001; Lin and Canny 1991; Mirtich 1998.
– Feature BVs• Hutter and Fuhrmann 2007.
Previous Work
• Continuous Collision Detection– Reduction of elementary tests– Govindaraju et al. 2005; Hutter and Fuhrmann
2007; Tang et al. 2007; Wong 2005, etc.
Continuous Collision Detection (CCD)
• Time of collision.
t = i+1t = i
Continuous Collision Detection (CCD)
• Time of collision.
t = i+1t = i+Δtt = i
Continuous Collision Detection (CCD)
• Time of collision.
• Test between features (vertices, edges and faces.)
Edge-EdgeVertex-Face
Triangles vs. Features
• Triangles used for culling.
Triangles vs. Features
• Triangles used for culling.
• CD operates on features.
Triangles vs. Features
• Triangles used for culling.
• CD operates on features.
• This leads to:– Less efficient culling– Elementary test duplication
Culling Efficiency
• Features usually occupy significantly less space than their corresponding triangles.
Culling Efficiency
• Features usually occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 1 EE test
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 1 EE test
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests– 0 VF tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests– 0 VF tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests– 0 VF tests
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests– 1 VF test
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests– 1 VF test
Culling Efficiency
• Features can occupy significantly less space than their corresponding triangles.
• Based on triangle BVs:– 15 elementary tests
• Based on feature BVs:– 2 EE tests– 1 VF test
Elementary Test Duplication
• The intersecting vertex is shared by six triangles.
Elementary Test Duplication
• The intersecting vertex is shared by six triangles.
• The VF test could be spawned by six different triangle pairs.
Representative Triangles (R-Tris)
• R-Tris definition
• R-Tris usage
• R-Tris properties
• Computing R-Tris (assignment)
R-Tri Definition
• An augmented triangle that “represents” some subset of its features and their corresponding feature BVs.
R-Tri DefinitionFeature Assignment
• The pattern in which each feature is assigned to an R-Tri is an assignment scheme.
R-Tri DefinitionFeature Assignment
• The pattern in which each feature is assigned to an R-Tri is an assignment scheme.
• Assignment scheme– Not unique.– Every feature is assigned to one and only one
triangle, incident to the feature.
R-Tri Usage
• Given a pair of R-Tris that are potentially colliding:
– Find corresponding feature pairs.
R-Tri Usage
• Given a pair of R-Tris that are potentially colliding:
– Find corresponding feature pairs.
– Test feature BVs.
R-Tri Usage
• Given a pair of R-Tris that are potentially colliding:
– Find corresponding feature pairs.
– Test feature BVs.
R-Tri Usage
• Given a pair of R-Tris that are potentially colliding:
– Find corresponding feature pairs.
– Test feature BVs.
R-Tri Usage
• Given a pair of R-Tris that are potentially colliding:
– Find corresponding feature pairs.
– Test feature BVs.
R-Tri Usage
• Given a pair of R-Tris that are potentially colliding:
– Find corresponding feature pairs.
– Test feature BVs.– Spawn elementary tests.
R-Tri Usage
• Given a pair of R-Tris that are potentially colliding:
– Find corresponding feature pairs.– Test feature BVs.– Spawn elementary tests.
• Improves culling and eliminates duplicates.
R-Tris Properties
• General– Compatible with any triangle-pair culling
algorithm (including grids, BVHs, sweep & prune, GPU occlusion queries, etc.)
R-Tris Properties
• Complete– R-Tris will find all collisions, guaranteed.
R-Tris Properties
• Compact– R-Tris need no additional memory. (However,
O(|E|) data can be cached to potentially boost performance.)
R-Tris Properties
• Connectivity-based– Representation is a function of topology. For
meshes which only undergo deformation, assignment is a pre-processing step.
Computing R-Tris Assignment Schema
• How are features assigned to R-Tris?
• Does it matter?
• How many elementary tests are performed per contact?
Assignment Schema
• Optimal assignment– One elementary test per contact.
Assignment Schema
• Optimal assignment– One elementary test per contact.– Dependent on triangle-pair culling efficiency.
Assignment Schema
• Optimal assignment– One elementary test per contact.– Dependent on triangle-pair culling efficiency.– Assignment schema offer limited freedom.
Assignment Schema
• Example
Assignment Schema
• Example • Tests– 2 VF, 0 EE
• Total– 2 VF, 0 EE
Assignment Schema
• Example • Tests– 2 VF, 2 EE
• Total– 4 VF, 2 EE
Assignment Schema
• Example • Tests– 1 VF, 4 EE
• Total– 5 VF, 6 EE
Assignment Schema
• Example • Tests– 1 VF, 4 EE
• Total– 6 VF, 10 EE
Assignment Schema
• Example • Tests– 1 VF, 2 EE
• Total– 7 VF, 12 EE
Assignment Schema
• Example • Tests– 2 VF, 4 EE
• Total– 9 VF, 16 EE
Assignment Schema
• Example
Assignment Schema
• Example • Tests– 0 VF, 0 EE
• Total– 0 VF, 0 EE
Assignment Schema
• Example • Tests– 1 VF, 0 EE
• Total– 1 VF, 0 EE
Assignment Schema
• Example • Tests– 0 VF, 0 EE
• Total– 1 VF, 0 EE
Assignment Schema
• Example • Tests– 0 VF, 0 EE
• Total– 1 VF, 0 EE
Assignment Schema
• Example • Tests– 0 VF, 0 EE
• Total– 1 VF, 0 EE
Assignment Schema
• Example • Tests– 0 VF, 0 EE
• Total– 1 VF, 0 EE
Global Optimality
• A single assignment scheme which provides optimal performance for all cases.
Global Optimality
• A single assignment scheme which provides optimal performance for all cases.
• Unfeasible in general
Global Optimality
• A single assignment scheme which provides optimal performance for all cases.
• Unfeasible in general– No a priori knowledge of
deformations.
Global Optimality
• A single assignment scheme which provides optimal performance for all cases.
• Unfeasible in general– No a priori knowledge of
deformations.– Representation is localized.
• The probability that neighboring triangles are included by the triangle-pair culling algorithm are high.
Global Assignment Schema
• Maximal Scheme [Wong and Baciu 2005]
• Total Tests– 3 VF
Empty Tri
Global Assignment Schema
• Maximal Scheme [Wong and Baciu 2005]
• Total Tests– 9 VF– 27 EE
• Average– 19.5 tests
Full Tri
Global Assignment Schema
• Uniform Scheme
• Total Tests– 9 VF
– 9 EE
V-E Tri
Global Assignment Schema
• Uniform Scheme• Total Tests
– 9 VF– 9 EE
• Average– 18 tests
E-E Tri
Global Assignment Schema
• Efficacy of a scheme depends on:– Actual mesh deformation, and– Triangle-pair culling efficiency.
Global Assignment Schema
• Efficacy of a scheme depends on:– Actual mesh deformation, and– Triangle-pair culling efficiency.
• The assignment scheme doesn’t really matter.
Global Assignment Schema
• Simple greedy scheme– Visit each triangle
• For each incident feature that hasn’t already been assigned, assign it to this triangle.
Global Assignment Schema
• Simple greedy scheme– Visit each triangle
• For each incident feature that hasn’t already been assigned, assign it to this triangle
• Very simple.
• Very fast.
BenchmarksFlamenco Dancer
Tris: 50 K
Verts: 26 K
Edges: 75 K
Frames: 352
Princess
Tris: 92 K
Verts: 47 K
Edges: 139 K
Frames: 1045
N-Body Balls
Tris: 34 K
Verts: 18 K
Edges: 51 K
Frames: 375
Cloth-Ball
Tris: 40 K
Verts: 20 K
Edges: 60 K
Frames: 465
Results
• System Characteristics– Binary BVH.– AABB BVs.– For self-collision, adjacent features are never
tested.
Results
• System Characteristics– Binary BVH.– AABB BVs.– For self-collision, adjacent features are never
tested.
• Hardware– Intel Xeon 3 GHz with 3 GBytes RAM– 32-bit Windows XP
Results
• Comparison Algorithms– R-Tri (RTRI)
* In the paper DB is ADJ and MARK is NO-DUPL.
Results
• Comparison Algorithms– R-Tri (RTRI)– Database (DB)*
• Run-time database to eliminate duplicate queries.
• Feature BVs for improved culling.
* In the paper DB is ADJ and MARK is NO-DUPL.
Results
• Comparison Algorithms– R-Tri (RTRI)– Database (DB)*
• Run-time database to eliminate duplicate queries.
• Feature BVs for improved culling.
– Mark-up (MARK)*
• Uses representation without feature BVs.
* In the paper DB is ADJ and MARK is NO-DUPL.
Results
• Comparison Algorithms– R-Tri (RTRI)– Database (DB)*
• Run-time database to eliminate duplicate queries.
• Feature BVs for improved culling.
– Mark-up (MARK)*
• Uses representation without feature BVs.
– Baseline (BASIC)• No duplicate culling and no feature BVs.
* In the paper DB is ADJ and MARK is NO-DUPL.
ResultsAverage Number of Elementary Tests (× 106) /
Average Frame Time for CCD (sec)
Speed-up of R-TRI
R-TRI DB MARK BASIC R-TRI DB MARK BASIC
0.23 /
0.09
0.23 /
0.13
0.74 /
0.13
2.0 /
0.461.0 X 1.5 X 1.5 X 5.3 X
0.27 /
0.23
0.27 /
0.39
1.7 /
0.36
7.6 /
1.151.0 X 1.7 X 1.6 X 5.1 X
0.45 /
0.15
0.45 /
0.43
1.2 /
0.22
5.5 /
0.751.0 X 2.9 X 1.4 X 5.0 X
0.46 /
0.19
0.46 /
0.63
1.5 /
0.28
6.8 /
0.921.0 X 3.3 X 1.5 X 4.9 X
Limitations
• Subservient to the choice of BV-type – even with feature BVs (AABB) false positives > 90%.
Limitations
• Subservient to the choice of BV-type – even with feature BVs (AABB) false positives > 90%.
• Benefit decreases as the meshes become triangle soups – every triangle represents all of its own features.
Limitations
• Subservient to the choice of BV-type – even with feature BVs (AABB) false positives > 90%.
• Benefit decreases as the meshes become triangle soups – every triangle represents all of its own features.
• It may take a performance hit in memory-strapped systems.
Conclusions
• A simple mechanism for accelerating collision detection.
Conclusions
• A simple mechanism for accelerating collision detection.– Eliminates duplicate queries without expensive
run-time data structures.
Conclusions
• A simple mechanism for accelerating collision detection.– Eliminates duplicate queries without expensive
run-time data structures.– Easy to implement.
Conclusions
• A simple mechanism for accelerating collision detection.– Eliminates duplicate queries without expensive
run-time data structures.– Easy to implement.– Complementary to most existing CD systems.
Conclusions
• A simple mechanism for accelerating collision detection.– Eliminates duplicate queries without expensive
run-time data structures.– Easy to implement.– Complementary to most existing CD systems.– Orthogonal to culling algorithm and BV type.
Acknowledgments
• ARO
• NSF
• DARPA/RDECOM
• Intel
• Walt Disney Animation Studios
Questions
References
• BRADSHAW, G., AND O’SULLIVAN, C. 2004. Adaptive medial-axis approximation for sphere-tree construction. ACM Trans. on Graphics 23, 1.
• EHMANN, S., AND LIN, M. C. 2001. Accurate and fast proximity queries between polyhedra using convex surface decomposition. Computer Graphics Forum (Proc. of Eurographics’2001) 20, 3, 500–510.
• ERICSON, C. 2004. Real-Time Collision Detection. Morgan Kaufmann.
• GOTTSCHALK, S., LIN, M., AND MANOCHA, D. 1996. OBBTree: A hierarchical structure for rapid interference detection. Proc. of ACM Siggraph’96, 171–180.
References
• GOVINDARAJU, N., KNOTT, D., JAIN, N., KABAL, I., TAMSTORF, R., GAYLE, R., LIN, M., AND MANOCHA, D. 2005. Collision detection between deformable models using chromatic decomposition. ACM Trans. on Graphics (Proc. of ACM SIGGRAPH) 24, 3, 991–999.
• HUBBARD, P. M. 1993. Interactive collision detection. In Proceedings of IEEE Symposium on Research Frontiers in Virtual Reality.
• HUTTER, M., AND FUHRMANN, A. 2007. Optimized continuous collision detection for deformable triangle meshes. In Proc. WSCG ’07, 25–32.
• KLOSOWSKI, J., HELD, M., MITCHELL, J., SOWIZRAL, H., AND ZIKAN, K. 1998. Efficient collision detection using bounding volume hierarchies of k-dops. IEEE Trans. on Visualization and Computer Graphics 4, 1, 21–37.
References
• LARSSON, T., AND AKENINE-MÖLLER, T. 2006. A dynamic bounding volume hierarchy for generalized collision detection. Computers and Graphics 30, 3, 451–460.
• LIN, M., AND CANNY, J. F. 1991. Efficient algorithms for incremental distance computation. In IEEE Conference on Robotics and Automation, 1008–1014.
• LIN, M., AND MANOCHA, D. 2003. Collision and Proximity Queries. In Handbook of Discrete and Computational Geometry: Collision detection
• MIRTICH, B. 1998. V-Clip: Fast and robust polyhedral collision detection. ACM Transactions on Graphics 17, 3 (July), 177–208.
References
• MOLLER, T. 1997. A fast triangle-triangle intersection test. Journal of Graphics Tools 2, 2.
• OTADUY, M., CHASSOT, O., STEINEMANN, D., AND GROSS, M. 2007. Balanced hierarchies for collision detection between fracturing objects. In IEEE Virtual Reality.
• PROVOT, X. 1997. Collision and self-collision handling in cloth model dedicated to design garment. Graphics Interface, 177–189.
• TANG, M., YOON, S., CURTIS, S., AND MANOCHA, D. 2007. Interactive continuous collision detection between deformable models using connectivity-based culling. UNC Chapel Hill, Technical Report.
References
• TESCHNER, M., KIMMERLE, S., HEIDELBERGER, B., ZACHMANN, G., RAGHUPATHI, L., FUHRMANN, A., CANI, M.- P., FAURE, F., MAGNENAT-THALMANN, N., STRASSER, W., AND VOLINO, P. 2005. Collision detection for deformable objects. Computer Graphics Forum 19, 1, 61–81.
• TROPP, O., TAL, A., SHIMSHONI, I. 2006. A fast triangle to triangle intersection test for collision detection. Computer Animation and Virtual Worlds 17, 5, 527–535.
• VAN DEN BERGEN, G. 1997. Efficient collision detection of complex deformable models using AABB trees. Journal of Graphics Tools 2, 4, 1–14.
References
• WONG, W. S.-K., AND BACIU, G. 2006. A randomized marking scheme for continuous collision detection in simulation of deformable surfaces. Proc. of ACM VRCIA.
• YOON, S., CURTIS, S., AND MANOCHA, D. 2007. Ray tracing dynamic scenes using selective restructuring. Proc. of Eurographics Symposium on Rendering.
• ZACHMANN, G., AND WELLER, R. 2006. Kinetic bounding volume hierarchies for deforming objects. In ACM Int’l Conf. on Virtual Reality Continuum and its Applications.
Feature-based Hierarchies
• Memory– There are 2 * N nodes in a BVH with N nodes.– Typically, |E| + |V| = 2 * F. – There are 3 * F total leaves yielding 6 * F total
nodes. – In a triangle soup, |E| + |V| = 6 * F giving 14 *
F total nodes.
Representative Triangles The Strengths
• Preliminary results – VF culling:
Benchmark Total non-adjacent
pairs
Implied VF tests
VF_BV Overlaps
VF_BV Cull rate
V-Line Intersections
V-Line Cull rate
balls 4.7 x 107 2.82 x 108 7.81 x 107 72.3% 6.23 x 107 77.9%
cloth-ball 9.98 x 107 5.99 x 108 1.36 x 108 77.4% 7.22 x 107 87.9%
princess 2.33 x 108 1.4 x 109 7.12 x 108 49.1% 4.78 x 108 65.8%
dragon-bunny
2.66 x 108 1.6 x 109 1.04 x 109 34.9% 7.49 x 108 53.1%
Representative Triangles The Strengths
• Preliminary results – EE culling:
Benchmark Total non-adjacent
pairs
Implied EE tests
EE_BV Overlaps
EE_BV Cull rate
balls 4.7 x 107 4.23 x 108 1.78 x 108 58.0%
cloth-ball 9.98 x 107 8.98 x 108 3.3 x 108 63.2%
princess 2.33 x 108 2.1 x 109 1.33 x 109 36.7%
dragon-bunny
2.66 x 108 2.4 x 109 1.8 x 109 24.9%
Last Thoughts
• Zero additional memory– Swept vertices need no BV.– Edge BVs can be computed on the fly.– Assignment encoded in triangle ID.
• Adaptive reassignment– Might be possible to adaptively change
assignments to accommodate actual collisions.– Move non-colliding feature assignments to
incident tris not involved in collisions.