Overview Overview Motivation Motivation Collision detection - - PDF document

overview overview
SMART_READER_LITE
LIVE PREVIEW

Overview Overview Motivation Motivation Collision detection - - PDF document

Overview Overview Motivation Motivation Collision detection Collision detection Classification Classification Query type Query type Alan Liu Alan Liu Algorithms Algorithms aliu@simcen.usuhs.mil


slide-1
SLIDE 1

1

Collision detection Collision detection

Alan Liu Alan Liu aliu@simcen.usuhs.mil aliu@simcen.usuhs.mil

Surgical Simulation Laboratory Surgical Simulation Laboratory National Capital Area Medical Simulation Center National Capital Area Medical Simulation Center Uniformed Services University of the Health Sciences Uniformed Services University of the Health Sciences http://simcen.usuhs.mil/m http://simcen.usuhs.mil/mmvr2002 mvr2002

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Overview Overview

  • Motivation

Motivation

  • Classification

Classification

  • Query type

Query type

  • Algorithms

Algorithms

  • Examples

Examples

  • Research directions

Research directions

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Motivation Motivation

  • Surgical simulation

Surgical simulation involves a complex involves a complex interaction between interaction between

– – Tool and tissue Tool and tissue – – Tissue and tissue Tissue and tissue – – Tool and tool Tool and tool

  • Interactions can mean

Interactions can mean

– – Physical contact Physical contact – – Penetration (piercing, Penetration (piercing, cutting) cutting) – – Proximity (thermal tool too Proximity (thermal tool too close to sensitive tissue) close to sensitive tissue)

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Brute force collision detection Brute force collision detection

  • Check for collisions

Check for collisions between everything and between everything and everything else! everything else!

  • Includes

Includes

– – Self collision Self collision – – Tool Tool-

  • tissue collision

tissue collision – – tissue tissue-

  • tissue collision

tissue collision

  • Too much, need to prune

Too much, need to prune list of objects/polygons to list of objects/polygons to test test

Image by Daigo Tanaka

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Brute force collision detection Brute force collision detection

  • Check for collisions

Check for collisions between everything and between everything and everything else! everything else!

  • Includes

Includes

– – Self collision Self collision – – Tool Tool-

  • tissue collision

tissue collision – – tissue tissue-

  • tissue collision

tissue collision

  • Too much, need to prune

Too much, need to prune list of objects/polygons to list of objects/polygons to test test

Image by Daigo Tanaka Image by Daigo Tanaka

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Collision detection Collision detection

  • Must be performed

Must be performed rapidly rapidly

– – For realistic visual and For realistic visual and haptic responses haptic responses

  • Types of collisions

Types of collisions

– – Tool/tool Tool/tool – – Tool/tissue Tool/tissue – – Tissue/tissue Tissue/tissue

  • Tissues can deform!

Tissues can deform!

slide-2
SLIDE 2

2

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Detecting collision between Detecting collision between polyhedra polyhedra

  • Feature

Feature-

  • based algorithms

based algorithms

– – Features can be vertices, lines, or faces. Features can be vertices, lines, or faces. – – Examples Examples

» » Lin Lin-

  • Canny algorithm

Canny algorithm » » V V-

  • Clip

Clip

  • Linear programming methods

Linear programming methods

– – Gilbert, Johnson and Kerrthi Algorithm Gilbert, Johnson and Kerrthi Algorithm

» » GJK and enhanced GJK GJK and enhanced GJK

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Bounding volumes Bounding volumes

  • Distant objects don’t intersect

Distant objects don’t intersect

– – Ignore Ignore

  • Need fast way to determine if objects are distant

Need fast way to determine if objects are distant

  • Use two level approach

Use two level approach

– – Prune uninteresting objects Prune uninteresting objects

» » Too far away Too far away » » No colliding for next “n” time steps No colliding for next “n” time steps

– – Check for collision between likely objects only Check for collision between likely objects only

» » Check between polytopes Check between polytopes » » Check specific polygons between objects. Check specific polygons between objects.

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Popular pruning methods Popular pruning methods

  • Bounding volumes

Bounding volumes

– – Spheres Spheres – – Boxes Boxes

» » Static partition Static partition » » Axis aligned bounding boxes Axis aligned bounding boxes » » Separating Axis Theorem Separating Axis Theorem

  • Hierarchy of volumes

Hierarchy of volumes

– – Octrees Octrees – – Sphere trees Sphere trees – – OBBTrees OBBTrees

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Spheres Spheres

  • Bound objects by

Bound objects by spheres spheres

  • Fast, easy to compute

Fast, easy to compute

  • Can be too

Can be too conservative conservative

– – Too many false Too many false positives if object is positives if object is long and thin/flat long and thin/flat – – But see But see [HUBBARD93] and [HUBBARD93] and [HUBBARD96] [HUBBARD96]

1

r

2

r d

Intersect if

2 1

r r d + <

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Axis Aligned Bounding Boxes Axis Aligned Bounding Boxes (AABB) (AABB)

  • I

I-

  • Collide algorithm

Collide algorithm

[COHEN95] [COHEN95] – – Boxes intersect if and Boxes intersect if and

  • nly if projections to
  • nly if projections to

coordinate axes coordinate axes intersect intersect – – Uses temporal Uses temporal coherence coherence

» » Detects all possible Detects all possible intersections in intersections in expected linear time expected linear time

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Axis Aligned Bounding Boxes Axis Aligned Bounding Boxes (AABB) (AABB)

  • Inefficient for long

Inefficient for long thin objects at thin objects at arbitrary orientations arbitrary orientations

  • Need to keep

Need to keep recomputing bounding recomputing bounding boxes for boxes for

– – rotating objects rotating objects – – deforming objects deforming objects

slide-3
SLIDE 3

3

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Oriented bounding boxes Oriented bounding boxes

  • Oriented bounding boxes

Oriented bounding boxes

  • Bounding box is not

Bounding box is not necessarily aligned to necessarily aligned to coordinate axes coordinate axes

  • Separating Axis Theorem

Separating Axis Theorem

[GOTTSCHALK96]. [GOTTSCHALK96].

  • Two polytopes are disjoint

Two polytopes are disjoint iff. iff.

– – there exists an axis there exists an axis

  • rthogonal to an edge in
  • rthogonal to an edge in

each polytope, or there each polytope, or there exists an axis orthogonal exists an axis orthogonal to a face on one polytope to a face on one polytope

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Oriented bounding boxes Oriented bounding boxes

  • For boxes, need to test

For boxes, need to test at most 15 axes at most 15 axes

– – Each box has 3 unique Each box has 3 unique face and 3 unique edge face and 3 unique edge

  • rientations
  • rientations

– – Thus, 3 faces (on one Thus, 3 faces (on one box) + 3 faces (on the box) + 3 faces (on the

  • ther box) + 9 edge
  • ther box) + 9 edge

combinations combinations

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Static partition Static partition

  • Partition space into fixed

Partition space into fixed sized boxes sized boxes

  • Build hash table mapping

Build hash table mapping space to polygons space to polygons

  • Advantages

Advantages

– – Fast (expected constant Fast (expected constant time) time) – – Deformations easily Deformations easily handled handled

  • Disadvantages

Disadvantages

– – Memory overhead Memory overhead – – But memory is cheap But memory is cheap

Image courtesy of Frank Tendick

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Hierarchy of bounding volumes Hierarchy of bounding volumes

  • Need tighter fit with object

Need tighter fit with object

  • Collision detection reduced to tree search

Collision detection reduced to tree search

– – Typically O(lg N) time Typically O(lg N) time

  • Types of bounding volume hierarchies

Types of bounding volume hierarchies

– – Octrees [SAMMET98] Octrees [SAMMET98] – – Sphere trees [HUBBARD93] Sphere trees [HUBBARD93] – – AABB Trees [BERGEN97] AABB Trees [BERGEN97] – – OBB Trees [GOTTSCHALK96] OBB Trees [GOTTSCHALK96]

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Octrees Octrees

[SAMMET98] [SAMMET98]

  • Start with AABB encompassing entire

Start with AABB encompassing entire

  • bject
  • bject

– – Recursively subdivide box into four sub Recursively subdivide box into four sub-

  • boxes

boxes until a lower limit is reached until a lower limit is reached – – Relatively easy to construct Relatively easy to construct – – Updates are non Updates are non-

  • trivial

trivial

» » Movement Movement » » Deformation Deformation

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Sphere trees Sphere trees

[HUBBARD93] [HUBBARD93]

  • Instead of using boxes,

Instead of using boxes, use spheres use spheres

  • Methods for building

Methods for building hierarchy hierarchy

– – Octree subdivision Octree subdivision [HUBBARD93] [HUBBARD93] – – Medial axis based Medial axis based [HUBBARD96] [HUBBARD96]

[HUBBARD96] [HUBBARD96] [HUBBARD96] [HUBBARD96]

slide-4
SLIDE 4

4

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

AABB Trees AABB Trees

[BERGEN98] [BERGEN98]

  • Recursively subdivide

Recursively subdivide AABB by partitioning AABB by partitioning along longest axis along longest axis

  • Refit boxes after

Refit boxes after deformation deformation

– – AABB of child AABBs is AABB of child AABBs is smallest AABB enclosing smallest AABB enclosing all primitives. all primitives. – – Refitted boxes have more Refitted boxes have more

  • verlap than rebuilt boxes
  • verlap than rebuilt boxes
  • Software available

Software available (SOLID) (SOLID)

– – See resources slide at end See resources slide at end

[BERGEN98] [BERGEN98]

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

OBBTrees OBBTrees

[GOTTSCHALK96] [GOTTSCHALK96]

  • Recursively subdivide

Recursively subdivide OBBs OBBs

– – Divide along Divide along longest/2 longest/2nd

nd

longest/shortest axis longest/shortest axis – – Repeat division until Repeat division until not possible to divide not possible to divide

  • n any axis
  • n any axis

– – Use Separating Axis Use Separating Axis Theorem to determine Theorem to determine intersection intersection

[GOTTSCHALK96] [GOTTSCHALK96]

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Bucket trees Bucket trees

[GANOVELLI00] [GANOVELLI00]

  • For each axis,

For each axis, maintain sorted list of maintain sorted list of polygon coordinates polygon coordinates

  • Use octree to partition

Use octree to partition space space

  • Leaves point to

Leaves point to polygon with lowest polygon with lowest coordinate value in coordinate value in each array each array

– – Each leaf contains a Each leaf contains a “bucket” of polygons “bucket” of polygons

[GANOVELLI00]

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Bucket trees Bucket trees

  • When object deforms,

When object deforms, polygons move to polygons move to different bucket different bucket

– – Change pointer at Change pointer at leaves leaves

[GANOVELLI00]

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

  • Updating tree for

Updating tree for deformable deformable

  • bjects requires
  • bjects requires

little effort little effort

  • Tree can get

Tree can get unbalanced unbalanced

  • Tight fit with

Tight fit with underlying object underlying object

  • Faster

Faster

  • Relatively easy to test

Relatively easy to test for intersections for intersections

  • Needs fewer

Needs fewer intersection tests intersection tests compared to AABB compared to AABB Tree (object Tree (object dependent) dependent)

  • No need to rebuilt

No need to rebuilt tree for tree for deformable deformable

  • bjects
  • bjects
  • Easy to build

Easy to build

  • Relatively easy to

Relatively easy to test for test for intersections intersections

  • Needs more

Needs more intersection tests intersection tests compared to OBB compared to OBB Tree (object Tree (object dependent) dependent)

  • Rotationally

Rotationally invariant invariant

  • Intersection test is

Intersection test is very simple very simple

  • Approximation to

Approximation to underlying object underlying object may be poor may be poor

OBB Tree OBB Tree

Efficient for rejection tests, less efficient for cases where mu Efficient for rejection tests, less efficient for cases where multiple intersections ltiple intersections exists exists

Bucket Bucket Trees Trees AABB Tree AABB Tree Sphere trees Sphere trees

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Hardware based collision detection Hardware based collision detection

[LOMBARDO99] [LOMBARDO99]

  • Hardware implementation for a specific collision

Hardware implementation for a specific collision detection task detection task

  • No additional data structures

No additional data structures

  • Uses commonly available graphics hardware

Uses commonly available graphics hardware

– – OpenGL based OpenGL based

  • Detects multiple contact points in one pass

Detects multiple contact points in one pass

  • Runs at interactive frame rates

Runs at interactive frame rates

– – Depending on hardware Depending on hardware

slide-5
SLIDE 5

5

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Hardware based collision detection Hardware based collision detection

[LOMBARDO99] [LOMBARDO99]

  • Laparoscopic instrument moves about a pivot

Laparoscopic instrument moves about a pivot point point

  • At each time step, instrument moves in (nearly) a

At each time step, instrument moves in (nearly) a straight line. straight line.

  • Volume swept out by instrument approximates a

Volume swept out by instrument approximates a viewing frustum viewing frustum

  • Use OpenGL define that frustum, then render

Use OpenGL define that frustum, then render

  • Anything visible must be due to objects

Anything visible must be due to objects intersecting path of instrument intersecting path of instrument

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Hardware based collision detection Hardware based collision detection

[LOMBARDO99] [LOMBARDO99]

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Open questions Open questions

  • Many, many points of contact

Many, many points of contact

– – Organ/organ, Suturing, Palpation Organ/organ, Suturing, Palpation – – Many current algorithms not efficient at solving this Many current algorithms not efficient at solving this problem problem

  • Deformation, change in topology

Deformation, change in topology

  • Self collision

Self collision

– – Knot tying Knot tying

  • Collision detection using a volumetric

Collision detection using a volumetric representation representation

  • Need to do everything in real

Need to do everything in real-

  • time

time

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Collision detection code Collision detection code

  • Lin

Lin-

  • Canny algorithm

Canny algorithm

– – http://www.cs.berkeley.edu/~mirtich/collDet.html http://www.cs.berkeley.edu/~mirtich/collDet.html

  • I

I-

  • COLLIDE,V

COLLIDE,V-

  • COLLIDE and many others

COLLIDE and many others

– – http://www.cs.unc.edu/~geom/ http://www.cs.unc.edu/~geom/

  • SOLID (AABB Trees)

SOLID (AABB Trees)

– – http://www.win.tue.nl/~gino/solid/ http://www.win.tue.nl/~gino/solid/

  • Enhanced GJK

Enhanced GJK

– – http://web.comlab.ox.ac.uk/oucl/work/stephen.cameron http://web.comlab.ox.ac.uk/oucl/work/stephen.cameron /distances/index.html /distances/index.html

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Bibliography Bibliography

  • [BERGEN97] van den Bergen G. "Efficient collision detection of

[BERGEN97] van den Bergen G. "Efficient collision detection of complex complex deformable models using AABB trees." Journal of Graphics Tools, deformable models using AABB trees." Journal of Graphics Tools, 2(4):1 2(4):1--

  • -13,

13,

  • 1997. pp. 1
  • 1997. pp. 1-
  • 13.

13.

  • [HUBBARD96] Hubbard, P.M. "Approximating Polyhedra with Spheres

[HUBBARD96] Hubbard, P.M. "Approximating Polyhedra with Spheres for for Time Time-

  • Critical Collision Detection." ACM Trans. on Graphics, 15(3), 19

Critical Collision Detection." ACM Trans. on Graphics, 15(3), 1996. pp.

  • 96. pp.

179 179-

  • 210.

210.

  • [HUBBARD93] Hubbard, P.M. "Interactive collision detection." Pr

[HUBBARD93] Hubbard, P.M. "Interactive collision detection." Proceedings

  • ceedings
  • f the IEEE Symposium on Research Frontiers in Virtual Reality,
  • f the IEEE Symposium on Research Frontiers in Virtual Reality, October 25

October 25-

  • 26, 1993. pp. 24

26, 1993. pp. 24-

  • 31.

31.

  • [SAMMET98]

[SAMMET98] Samet H., Webber R.E. "Hierarchical data structures and Samet H., Webber R.E. "Hierarchical data structures and algorithms for computer graphics, part I: Fundamentals." IEEE Co algorithms for computer graphics, part I: Fundamentals." IEEE Computer mputer Graphics and Applications, vol. 8, no 3., May 1998. pp. 48 Graphics and Applications, vol. 8, no 3., May 1998. pp. 48-

  • 68.

68.

  • [LIN98] Lin, Ming C., Gottschalk S. "Collision detection betwee

[LIN98] Lin, Ming C., Gottschalk S. "Collision detection between geometric n geometric models: a survey" In Proc. of IMA Conference on Mathematics of S models: a survey" In Proc. of IMA Conference on Mathematics of Surfaces, urfaces,

  • 1998. ftp://ftp.cs.unc.edu/pub/users/manocha/PAPERS/COLLISION/cm
  • 1998. ftp://ftp.cs.unc.edu/pub/users/manocha/PAPERS/COLLISION/cms.pdf.

s.pdf.

A Tutorial on Surgical Simulation: Past, Present, and Future – MMVR 2002

Bibliography Bibliography

  • [GANOVELLI00] Ganovelli F., Dingliana J., O’Sullivan C. "BucketT

[GANOVELLI00] Ganovelli F., Dingliana J., O’Sullivan C. "BucketTree: ree: Improving collision detection between deformable objects" Confer Improving collision detection between deformable objects" Conference on ence on Computer Graphics (SCCG2000), Bratislava, April 2000. pp. 156 Computer Graphics (SCCG2000), Bratislava, April 2000. pp. 156-

  • 163.

163. http://citeseer.nj.nec.com/344463.html. http://citeseer.nj.nec.com/344463.html.

  • [GOTTSCHALK96] Gottschalk S., Lin M.C., Manocha D. "OBBtree: A

[GOTTSCHALK96] Gottschalk S., Lin M.C., Manocha D. "OBBtree: A hierarchical structure for rapid interference detection." SIGGRA hierarchical structure for rapid interference detection." SIGGRAPH ‘96 Proc. PH ‘96 Proc.

  • 1996. pp. 171
  • 1996. pp. 171-
  • 180.

180. http://citeseer.nj.nec.com/43036.html,ftp://cs.unc.edu/pub/users http://citeseer.nj.nec.com/43036.html,ftp://cs.unc.edu/pub/users/manocha/PAP /manocha/PAP ERS/COLLISION/obb.ps.gz ERS/COLLISION/obb.ps.gz

  • [COHEN95] Cohen J.D., Lin M.C., Manocha D., Ponamgi M.K. "I

[COHEN95] Cohen J.D., Lin M.C., Manocha D., Ponamgi M.K. "I-

  • COLLIDE: An interactive and exact collision detection system for

COLLIDE: An interactive and exact collision detection system for large large-

  • scale

scale environments." Proceedings of the 1995 Symposium on Interactive environments." Proceedings of the 1995 Symposium on Interactive 3D 3D Graphics (Monterey, California), 1995. pp. 189 Graphics (Monterey, California), 1995. pp. 189-

  • 196.

196.

  • [LOMBARDO99] Lombardo J.C., Gascuel M.P., Neyret F. "Real

[LOMBARDO99] Lombardo J.C., Gascuel M.P., Neyret F. "Real-

  • time

time collision detection for virtual surgery." Proceedings of Compute collision detection for virtual surgery." Proceedings of Computer Animation r Animation '99, May 1999. pp. 33 '99, May 1999. pp. 33-

  • 39. http://citeseer.nj.nec.com/lombardo99realtime.html
  • 39. http://citeseer.nj.nec.com/lombardo99realtime.html