20 2 Vol. 20 o. 2 2008 Joural of System Simulatio Ja., 2008 6024 SphereOBB X Z X Sphere OBB-Sphere Z OBB Sphere Sphere OBB OBB OBB OBB TP9.9 A 004-7X (2008) 02-72-06 Research o Real-Time Collisio Detectio Based o Hybrid Hierarchical Boudig Volume ZHU ua-feg, MEG Ju, XIE Guag-hua, MA We-jua Departmet of Computer Sciece ad Egieerig, Dalia Uiversity of Techology, Dalia 6024, Chia Abstract: Aalyzig the performace of various hierarchical boudig volumes (HBVs), a fast algorithm for real-time collisio detectio (CD) was proposed usig a structure of hybrid hierarchical boudig volume (HHBV) based o OBB ad sphere BV. The HHBV tree for CD falls ito three successive layers i a top-dow maer, which are Layer X usig sphere as its tree ode, Layer usig OBB-Sphere BV ad Layer Z usig OBB. The itersectio test uses sphere vs. sphere or sphere vs. OBB method for fast overlap test i upper layers, elimiatig the possibility of collisio betwee objects far apart; the it accurately determies the cotact status amog objects i closer proximity by OBB vs. OBB test i lower oes. Experimets were compared with other competitive algorithm (OBB) to aalyze the performace. Results show the algorithm is as efficiet i precisio as OBB, ad faster i complex virtual eviromet. Key words: collisio detectio; hierarchical boudig volumes; sphere boudig boxes; OBB X Sphere OBB-Sphere Z OBB Sphere-Sphere OBB-Sphere [] OBB O( 2 ) Sphere OBB [2] Sphere BSP K-DOP [] OBB Sphere AABB FDH [4] OBB [5] AABB (axis -aliged BVT boudig boxes) (spheres) OBB(orieted boudig boxes) 2006--06 2007-0-6 () (982-) T= v Cv+ p Cp+ u C () u, (964-), 98- T v (98-) C v p 72
20 2 Vol. 20 o. 2 2008 Ja., 2008 C p CDSphere_Sphere() Sphere-Sphere u C u CDSphere_OBB() OBB-Sphere CDOBB_OBB() OBB-OBB CDTraverse(a i b i ) START. (AABB) a i b i a i, b i Layer X or AABB (a i Layer X, b i Layer Z)or(a i Layer Z, AABB b i Layer X) [6].2 (Sphere) (box(a i ) box(b i )) CDFlag= =true BV a i a i a i Sphere [7] START b i b i b i. OBB P ai S ai, P bi S bi P ai P bi?f Φ HBVT CDTraverse 2.2 HBVT A X B X OBB Sphere-Sphere [8] CDSphere_Sphere() 2 A X B A X B X Sphere 2. Sphere-Sphere HBVT A X B X Sphere Sphere Sphere-Sphere OBB-Sphere Z OBB A X B Z X Z OBB-Sphere CDSphere_OBB() A X B Z OBB-Sphere HBVT Sphere-Sphere Sphere-Sphere OBB-Sphere OBB-OBB OBB-OBB OBB-OBB 5 ( OBB HBVT CDTraverse() a i b i 6 OBB 9 A, B box(a i ) box(b i ) 5 ) OBB-Sphere Layer X Z X Z CDFlag 7 Bool CDFlag=false Bool CDSphere_Sphere() CDFlag=CDSphere_Sphere CDFlag=CDSphere_OBB (box(a i ) box(b i ) Bool CDOBB_OBB() Bool CDSphere_OBB() a i,b i Layer or Layer Z, a i,b i Layer CDFlag=CDOBB_OBB (box(a i) box(b i)) ED
20 2 Vol. 20 o. 2 2008 Ja., 2008 A OBB Sphere OBB A Z B Z OBB OBB-OBB CDOBB_OBB() OBB BV X Z X OBB-Sphere X Z Z OBB X.2 OBB OBB-OBB Z Z OBB X OBB-OBB 2 2 s (s>2) s>=2 s (s-) f(s)=(s-)*log 2 BV BVT(S) S s ( + ) f'(s)>0 f(s) s =2 f(s). HBV BVT BVT(S) S S. BV HBV BV BV.4 BV BV BVT BVT BV BV BV Z BV Sphere 2 S HBV HBV BV BV X OBB OBB 74
20 2 Vol. 20 o. 2 2008 Ja., 2008 OBB BVT OBB i L i [9] i= 2 L i L i.4 X di= /2 Li i= 2 Z i HBV 4 4. BV v Sphere-Sphere OBB-Sphere OBB-OBB vv 0 4.. Sphere-Sphere (4) 2 2 2.5 HBV oo 2 > r + r + 2rr (4) 2 o X Sphere o 2 o o 2 r r OBB-Sphere Z OBB 2 X 4..2 OBB-OBB OBB-Sphere OBB 2(a) OBB A B a i OBB sphere OBB b i A B i=, 2, A i B i A B 2 2 R= a + b + c 2 2 a b c OBB i=, 2, T A B L r A A L OBB i p i q i r B B L r i T L (r A +r B ) (2) (5) i i i m= ( p + q + r ) (2) ra= aiai L, rb= bb i i L (5) i= i= i = () i j i j i j C jk = p j pk + qjqk + rj rk, j, k () i i i i i i i TL > ra+ rb= aal i i + bbl i i (6) i= i= p = p m, q = q m, r = r m, A C B 4 C 5 A B OBB a b c X.4 Z OBB (a) (b).4 Z 2 75 (6) A B L 5
20 2 Vol. 20 o. 2 2008 Ja., 2008 4.. OBB-Sphere 2(b) OBB A (Sphere OBB) Sphere B a i A i=,2, r B A i OBB A i=,2, T A B Z OBB L r A r B A B OBB OBB L (7) OBB ra= aiai L, rb= r (7) i= T L (r A +r B ) 2 BV BV (8 A B L OBB OBB TL > ra+ rb= aal i i + r (8) BVT i= A B A B 2 A B A B B 4.2 HBV HBV BV 5 BV HBVHS AMD 64bit BV (AMD 64bit 000+ CPU, VIDIA 6800GT 2 BV GB DDR400 ) VC 8.0 BV BV 6256 8257 BV HBVHS (a) (b) HBV Sphere OBB (c) (d) HBVHS RAPID X OBB HBVHS RAPID OBB X BV (fps) RAPID HBVHS 0 209.72.0 4.77 0.27 28 52.58.02 6.55 2.00854 6 5.45 24.9 6.52.82658 28 4.7 6. 6.96 2.4968 64 0.2 2.74 9.87 2.4059 496 86.74 2.74.5 2.89676 694 68.99. 4.50 2.28478 822 60.06 46.5 6.65 2.77996 96 52.5 48.05 9.0 2.5588 06 44.56 55.88 22.44 2.49084 282.49 60.0.76.898586 76
20 2 Vol. 20 o. 2 2008 Ja., 2008 OBB 4 HBVHS RAPID OBB 5 HBVHS HBVHS FPS 0FPS HBVHS.76 HBVHS OBB 0 FPS (a) 496 (b) 694 (c) 96 (d) 06 / 70 60 50 40 0 20 0 0 vs RAPID vs HBVHS 0 200 400 600 800 000 200 400 / / FPS 220 200 80 60 40 20 00 80 60 40 20 vs (FPS) 0 200 400 600 800 000 200 400 / 6 4 5 2006, 8(S) 0-07. (ZHOU u-bo, A Qig-dog, HBV X BV LI Hog-cai. Collisio Detectio Algorithms Aalysis i Virtual BV Eviromet [J]. Joural of System Simulatio, 2006 8(S) OBB-Sphere 0-07.) [4],,. [J]. OBB-Sphere OBB, 200, 2(2): 44-47. [5],,. [J]. OBB 2006, 8(4): 058-064. (MA Deg-wu, E We, LI ig. Survey of Box-based Algorithms for Collisio Detectio [J]. Joural of System Simulatio, 2006, 8(4): 058-064.) X Z [6] Larsso T, Möller TA. Collisio detectio for cotiuously deformig bodies [C]// The Proceedigs of Eurographics 200, Machester : Eurographics Associatio 200: 25-. [] M Li, S Gottschalk. Collisio Detectio betwee Geometric Models: A Survey [C]// The Proceedigs of IMA Coferece o Mathematics of Surfaces, Birmigham, UK, 998. Birmigham Eurographics Associatio 998: 7-56. [7] [8] Palmer I J, Grimsdale RL. Collisio Detectio for Aimatio Usig Sphere-trees [J]. Computer Graphics Forum(S067-7055), 995, 4(2): 05-6.,,. OBB [J]. [2], 200, (l): 46-48.,,,. [J]., 2005, 7(9): 267-270.(ZHEG i, IG Ru-xi, LIU Jia-hua. Research o Fast Collisio Detectio Method i Virtual Assembly Eviromet[J]. Joural of System Simulatio, 2005, 7(9): 267-270.) [],,. [J]. [9],. [J]. 2005, 4(5): 46-47. 77