Collision Detection That Collision Detection That Collision Detection That Really Works Really Works Really Works David Baraff David Baraff David Baraff Robotics Institute Robotics Institute Robotics Institute Carnegie Mellon University Carnegie Mellon University Carnegie Mellon University S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Philosophy/Overview Philosophy/Overview Philosophy/Overview • This is a highly-biased talk This is a highly-biased talk • • Theory is a good thing to understand Theory is a good thing to understand • • Most implementations don’t work all that well Most implementations don’t work all that well • • Many codes don’t solve Many codes don’t solve your your problem problem • S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Philosophy/Overview Philosophy/Overview Philosophy/Overview • This is a highly-biased talk This is a highly-biased talk • • Theory is a good thing to understand Theory is a good thing to understand • • Most implementations don’t work all that well Most implementations don’t work all that well • • Many codes don’t solve Many codes don’t solve your your problem problem • • Code needs to be as simple as possible—know Code needs to be as simple as possible—know • what is important and what isn’t what is important and what isn’t • This talk: two real-life (commercial) solutions This talk: two real-life (commercial) solutions • S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
What My Rigid Body Simulator Needs What My Rigid Body Simulator Needs What My Rigid Body Simulator Needs • Does polyhedron Does polyhedron A overlap polyhedron B ? A overlap polyhedron B ? • • If so, by how much? If so, by how much? • • If not, then where are the contacts? If not, then where are the contacts? • S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
What My Rigid Body Simulator Needs What My Rigid Body Simulator Needs What My Rigid Body Simulator Needs • Does polyhedron Does polyhedron A overlap polyhedron B ? A overlap polyhedron B ? • • If so, by how much? If so, by how much? • • If not, then where are the contacts? If not, then where are the contacts? • • What are the contact What are the contact normals ? • normals ? S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Some Available Codes Some Available Codes Some Available Codes • http://www.cs.unc.edu/~geom/collide.html http://www.cs.unc.edu/~geom/collide.html • – RAPID RAPID – – V-COLLIDE V-COLLIDE – – I-COLLIDE I-COLLIDE – • http://www.merl.com/people/mirtich/vclip.html http://www.merl.com/people/mirtich/vclip.html • • http://www.comlab.ox.ac.uk/oucl/users/ http://www.comlab.ox.ac.uk/oucl/users/ • stephen.cameron/distances.html stephen.cameron/distances.html S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Separating Planes Separating Planes Separating Planes S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Separating Planes Separating Planes Separating Planes S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Separating Planes Separating Planes Separating Planes S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Coherence Coherence Coherence S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Coherence Coherence Coherence S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Contact Contact Contact S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Interpenetration Interpenetration Interpenetration S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Separating Planes (in 3D) Separating Planes (in 3D) Separating Planes (in 3D) S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Separating Planes (in 3D) Separating Planes (in 3D) Separating Planes (in 3D) contact contact plane plane S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Does It Really Work? Does It Really Work? Does It Really Work? Yes, but... Yes, but... • Requires convex decomposition Requires convex decomposition • • Needs a Needs a good good decomposition: decomposition: • ? ? S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
An Actual Implementation An Actual Implementation An Actual Implementation • Coriolis Coriolis TM TM —rigid body dynamics engine in —rigid body dynamics engine in • TM Maya TM Alias|Wavefront’s Maya Alias|Wavefront’s • Fast and reliable Fast and reliable • • Compares pairs of polygons from non-convex, Compares pairs of polygons from non-convex, • topologically specified polyhedra (using a topologically specified polyhedra (using a coherence-based separating plane approach) coherence-based separating plane approach) S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
An Actual Implementation An Actual Implementation An Actual Implementation • Coriolis Coriolis TM TM —rigid body dynamics engine in —rigid body dynamics engine in • TM Maya TM Alias|Wavefront’s Maya Alias|Wavefront’s • Fast and reliable Fast and reliable • • Compares pairs of polygons from non-convex, Compares pairs of polygons from non-convex, • topologically specified polyhedra (using a topologically specified polyhedra (using a coherence-based separating plane approach) coherence-based separating plane approach) • Hierarchical bounding-box tree to eliminate Hierarchical bounding-box tree to eliminate • most false hits most false hits S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Culling—First (and Foremost!) Culling—First (and Foremost!) Culling—First (and Foremost!) S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Culling—First (and Foremost!) Culling—First (and Foremost!) Culling—First (and Foremost!) S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Sweep Sort Sweep Sort Sweep Sort A B B A S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Sweep Sort Sweep Sort Sweep Sort B A B A S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Collision Detection in Cloth Simulation Collision Detection in Cloth Simulation Collision Detection in Cloth Simulation • Cloth/solid Cloth/solid detection is fast—test individual detection is fast—test individual • cloth particles against solid-object hiearchical cloth particles against solid-object hiearchical bounding-box tree bounding-box tree S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
cloth cloth vertex vertex (outside) solid solid skin skin S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
cloth cloth vertex vertex solid solid skin skin S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Leaf-level Bounding Boxes Leaf-level Bounding Boxes Leaf-level Bounding Boxes cloth cloth vertex vertex solid solid skin skin S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Mid-level Bounding Boxes Mid-level Bounding Boxes Mid-level Bounding Boxes cloth cloth vertex vertex solid solid skin skin S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Root-level Bounding Box Root-level Bounding Box Root-level Bounding Box cloth cloth vertex vertex S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Collision Detection in Cloth Simulation Collision Detection in Cloth Simulation Collision Detection in Cloth Simulation • Cloth/solid Cloth/solid detection is fast—test individual detection is fast—test individual • cloth particles against solid-object hiearchical cloth particles against solid-object hiearchical bounding-box tree bounding-box tree S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Collision Detection in Cloth Simulation Collision Detection in Cloth Simulation Collision Detection in Cloth Simulation • Cloth/solid Cloth/solid detection is fast—test individual detection is fast—test individual • cloth particles against solid-object hiearchical cloth particles against solid-object hiearchical bounding-box tree bounding-box tree • Cloth/cloth Cloth/cloth detection requires complicated detection requires complicated • triangle/triangle test (vertex/face, edge/edge) triangle/triangle test (vertex/face, edge/edge) S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Collision Detection in Cloth Simulation Collision Detection in Cloth Simulation Collision Detection in Cloth Simulation • Cloth/solid Cloth/solid detection is fast—test individual detection is fast—test individual • cloth particles against solid-object hiearchical cloth particles against solid-object hiearchical bounding-box tree bounding-box tree • Cloth/cloth Cloth/cloth detection requires complicated detection requires complicated • triangle/triangle test (vertex/face, edge/edge) triangle/triangle test (vertex/face, edge/edge) • Vast majority of time spent culling out the Vast majority of time spent culling out the • triangle/triangle intersections, using coherence triangle/triangle intersections, using coherence based sweep-sort routine based sweep-sort routine S IGGRAPH ’98 C OURSE N OTES P HYSICALLY B ASED M ODELING
Recommend
More recommend