300 likes | 454 Views
Collision Detection Part II. David H. Eberly 3D Game Engine Design 2001. 10. 31. Abstract (1/2). Dynamic Object-Object Intersection 물체가 이동한 궤적을 고려하여 검사 Oriented Bounding Box Trees OBB Tree 의 간략한 소개 Processing of Rotating and Moving Objects 회전하며 이동하는 물체의 충돌 검사. Abstract (2/2).
E N D
Collision DetectionPart II David H. Eberly 3D Game Engine Design 2001. 10. 31 Jong-In Choi
Abstract (1/2) • Dynamic Object-Object Intersection • 물체가 이동한 궤적을 고려하여 검사 • Oriented Bounding Box Trees • OBB Tree의 간략한 소개 • Processing of Rotating and Moving Objects • 회전하며 이동하는 물체의 충돌 검사 Jong-In Choi
Abstract (2/2) • Constructing an OBB Tree • OBB Tree를 만드는 방법 • A Simple Dynamic Collision Detection System • OBB Tree를 이용한 충돌 검사 구현 Jong-In Choi
0 tmax w 이동 정지 이동 이동 Dynamic Object-Object Intersection (1/2) • 하나는 정지, 다른 하나는 이동 • 움직이는 물체는 상대 속도(W)를 가짐 • 일정 시간동안 검색[0, tmax] Jong-In Choi
Dynamic Object-Object Intersection (2/2) • Spheres, Capsules, and Lozenges • Oriented Boxes • Oriented Boxes and Triangles • Triangles Jong-In Choi
Sphere Point Line Segment Jong-In Choi
Capsule Line Segment Parallelogram Jong-In Choi
Lozenge Rectangle Hexagon Parallelepiped Jong-In Choi
b2B2 b1B1 D a1A1 a2A2 R0 R1 R L Oriented Boxes (1/5) • Finding the First Time of Intersection 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 Jong-In Choi
R(0) R(T) R0 R1 Oriented Boxes (2/5) • Finding the First Time of Intersection D L C(0) C(T) C(T) C(0) R (0)< R0 + R 1 ,R (tmax)> R0 + R 1 Sign(L•D(0)) = Sign(L•D(tmax)) 충돌이 아님 Jong-In Choi
Oriented Boxes (3/5) • Added separating sxis Jong-In Choi
Oriented Boxes (4/5) • Finding a Point of Intersection Jong-In Choi
Oriented Boxes (5/5) • Finding a Point of Intersection Jong-In Choi
p2 E1 D a1A1 p1 a2A2 p0 E0 -R R L Min(ui) Max(ui) Oriented Boxes and Triangles (1/8) • Finding the First Time of Intersection 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 Jong-In Choi
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) 충돌이 아님 Jong-In Choi
p(0) p(T) -R R p(T) p(0) Oriented Boxes and Triangles (3/8) • Finding the First Time of Intersection • Axis Ak R > p(0) and R > p(T) -R < p(0) and -R > p(T) 충돌이 아님 Jong-In Choi
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) 충돌이 아님 Jong-In Choi
Oriented Boxes and Triangles (5/8) • Finding a Point of Intersection Jong-In Choi
Oriented Boxes and Triangles (6/8) Jong-In Choi
Oriented Boxes and Triangles (7/8) Jong-In Choi
Oriented Boxes and Triangles (8/8) Jong-In Choi
p0 q2 E0 p1 F1 D E1 q1 q0 p2 F0 Min(ui) Max(ui) L Min(vi) Max(vi) Triangles (1/4) • Finding the First Time of Intersection L: separating axis Ei: edge vector of triangle1 pi: vertex of triangle1 Ei: edge vector of triangle1 pi: vertex of triangle1 D: distance between boxes Jong-In Choi
Triangles (2/4) • Finding the First Time of Intersection • Axis N or M p(0) p(T) p(T) p(0) Jong-In Choi
Triangles (3/4) • Finding the First Time of Intersection • Axis E X F p(0) p(T) p(T) p(0) Jong-In Choi
Triangles (4/4) • Finding a Point of Intersection Jong-In Choi
Oriented Bounding Box Trees • Gottchalk, Lin, and Manocha 1996 • 충돌 검사의 계층적인 방법을 제시 • 동적인 물체에 확장 적용 가능 Jong-In Choi
Processing of Rotatingand Moving Objects • 일정 시간 간격마다 충돌 검사 • Equations of Motion • Closed-Form Algorithm • Algorithm Based on a Numerical Ordinary Differential Equation Solver Jong-In Choi
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 Jong-In Choi
Constructing an OBB Tree (2/2) • Example • Teapot, Torus Level 0 Level 2 Level 4 Level 6 Jong-In Choi
A Simple Dynamic Collision Detection System • Testing for Collision • Tree를 반복적으로 검색 • Root leaf: 하향식 검색 • Finding Collision Detection • OBB & OBB • OBB & Triangle • Triangle & Triangle Jong-In Choi