Collision Detection Part II David H Eberly 3
Collision Detection Part II David H. Eberly 3 D Game Engine Design 2001. 10. 31 Graphics Lab Jong-In Choi 1
Abstract (1/2) • Dynamic Object-Object Intersection – 물체가 이동한 궤적을 고려하여 검사 • Oriented Bounding Box Trees – OBB Tree의 간략한 소개 • Processing of Rotating and Moving Objects – 회전하며 이동하는 물체의 충돌 검사 Graphics Lab Jong-In Choi 2
Abstract (2/2) • Constructing an OBB Tree – OBB Tree를 만드는 방법 • A Simple Dynamic Collision Detection System – OBB Tree를 이용한 충돌 검사 구현 Graphics Lab Jong-In Choi 3
Dynamic Object-Object Intersection (2/2) • • Spheres, Capsules, and Lozenges Oriented Boxes and Triangles Dynamic Sphere Static Capsule Lozenge Sphere Dist(pnt, {pnt, seg}) Dist(pnt, {seg, pgm}) Dist(pnt, {rct, hex, ppd}) Capsule Dist(seg, {pnt, seg}) Dist(seg, {seg, pgm}) Dist(seg, {rct, hex, ppd}) Lozenge Dist(rct, {pnt, seg}) Dist(rct, {seg, pgm}) Dist(rct, {rct, hex, ppd}) Graphics Lab Jong-In Choi 5
Sphere Point Line Segment Graphics Lab Jong-In Choi 6
Capsule Line Segment Parallelogram Graphics Lab Jong-In Choi 7
Lozenge Rectangle Hexagon Parallelepiped Graphics Lab Jong-In Choi 8
Oriented Boxes (1/5) • Finding the First Time of Intersection b 2 B 2 b 1 B 1 D a 1 A 1 a 2 A 2 R 0 R Graphics Lab R 1 L Jong-In Choi L: separating axis ai: edge length of box A Ai: axis normal of box A bi: edge length of box B Bi: axis normal of box B D: distance between boxes 9
Oriented Boxes (2/5) • Finding the First Time of Intersection D C(0) C(T) L C(T) C(0) R (0)< R 0 + R 1 , R (tmax)> R 0 + R 1 Sign(L • D(0)) = Sign(L • D(tmax)) Graphics Lab R(0) R(T) R 0 R 1 Jong-In Choi 충돌이 아님 10
Oriented Boxes (3/5) • Added separating sxis Graphics Lab Jong-In Choi 11
Oriented Boxes (4/5) • Finding a Point of Intersection Graphics Lab Jong-In Choi 12
Oriented Boxes (5/5) • Finding a Point of Intersection Graphics Lab Jong-In Choi 13
Oriented Boxes and Triangles (1/8) • Finding the First Time of Intersection p 2 a 1 A 1 E 1 D a 2 A 2 p 0 p 1 E 0 -R R L Min(ui) Max(ui) Graphics Lab Jong-In Choi L: separating axis ai: edge length of box Ai: axis normal of box Ei: edge vector of triangle pi: vertex of triangle D: distance between boxes 14
Oriented Boxes and Triangles (2/8) • Finding the First Time of Intersection – Axis N p(0) p(T) -R R p(T) p(0) R > p(0) and R > p(T) -R < p(0) and -R > p(T) 충돌이 아님 Graphics Lab Jong-In Choi 15
Oriented Boxes and Triangles (3/8) • Finding the First Time of Intersection – Axis Ak p(0) p(T) -R R p(T) p(0) R > p(0) and R > p(T) -R < p(0) and -R > p(T) 충돌이 아님 Graphics Lab Jong-In Choi 16
Oriented Boxes and Triangles (4/8) • Finding the First Time of Intersection – Axis Ai X Ej p(0) p(T) -R R p(T) p(0) R > p(0) and R > p(T) -R < p(0) and -R > p(T) 충돌이 아님 Graphics Lab Jong-In Choi 17
Oriented Boxes and Triangles (5/8) • Finding a Point of Intersection Graphics Lab Jong-In Choi 18
Oriented Boxes and Triangles (6/8) Graphics Lab Jong-In Choi 19
Oriented Boxes and Triangles (7/8) Graphics Lab Jong-In Choi 20
Oriented Boxes and Triangles (8/8) Graphics Lab Jong-In Choi 21
Triangles (1/4) • Finding the First Time of Intersection E 0 p 0 q 2 p 1 E 1 Min(ui) p 2 F 1 D q 0 F 0 Max(ui) Min(vi) q 1 L Max(vi) Graphics Lab Jong-In Choi L: separating axis Ei: edge vector of triangle 1 pi: vertex of triangle 1 D: distance between boxes 22
Triangles (2/4) • Finding the First Time of Intersection – Axis N or M p(0) p(T) Graphics Lab p(T) p(0) Jong-In Choi 23
Triangles (3/4) • Finding the First Time of Intersection – Axis E X F p(0) Graphics Lab p(T) p(0) Jong-In Choi 24
Triangles (4/4) • Finding a Point of Intersection Graphics Lab Jong-In Choi 25
Oriented Bounding Box Trees • Gottchalk, Lin, and Manocha 1996 • 충돌 검사의 계층적인 방법을 제시 • 동적인 물체에 확장 적용 가능 Graphics Lab Jong-In Choi 26
Processing of Rotating and Moving Objects • 일정 시간 간격마다 충돌 검사 – Equations of Motion – Closed-Form Algorithm – Algorithm Based on a Numerical Ordinary Differential Equation Solver Graphics Lab Jong-In Choi 27
Constructing an OBB Tree (1/2) • Subdivision rule – Splitting longest axis of a box – Partitioning the polygons according to center point lies on Recursively partition The Bounded polygons Graphics Lab Jong-In Choi 28
Constructing an OBB Tree (2/2) • Example – Teapot, Torus Level 0 Level 2 Level 4 Level 6 Graphics Lab Jong-In Choi 29
A Simple Dynamic Collision Detection System • Testing for Collision – Tree를 반복적으로 검색 • Root leaf: 하향식 검색 • Finding Collision Detection – OBB & OBB – OBB & Triangle – Triangle & Triangle Graphics Lab Jong-In Choi 30
- Slides: 30