OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,

Slides:



Advertisements
Similar presentations
2.5. B ASIC P RIMITIVE I NTERSECTION Details of common forms of primitive intersection test.
Advertisements

COMP 175 | COMPUTER GRAPHICS Remco Chang1/6103b – Shapes Lecture 03b: Shapes COMP 175: Computer Graphics February 3, 2015.
Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
CSE 681 Bounding Volumes. CSE 681 Bounding Volumes Use simple volume enclose object(s) tradeoff for rays where there is extra intersection test for object.
2.3. B OUNDING V OLUMES Bounding volumes of use for collision detection.
Collision Detection CSCE /60 What is Collision Detection?  Given two geometric objects, determine if they overlap.  Typically, at least one of.
Collision Detection and Resolution Zhi Yuan Course: Introduction to Game Development 11/28/
Computer graphics & visualization Collisions. computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization.
Geometry Primer Lines and rays Planes Spheres Frustums Triangles Polygon Polyhedron.
Ray Tracing CMSC 635. Basic idea How many intersections?  Pixels  ~10 3 to ~10 7  Rays per Pixel  1 to ~10  Primitives  ~10 to ~10 7  Every ray.
고려대학교 그래픽스 연구실 Chapter 6 Collision Detection 6.1~6.4 고려대학교 그래픽스연구실 민성환.
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Introduction to Collision Detection & Fundamental Geometric Concepts Ming C. Lin Department of Computer Science University of North Carolina at Chapel.
Advanced Computer Graphics Spring 2014
Computational Geometry & Collision detection
Review Methods for convex polytopes See video demonstration
Collision Detection CSE 191A: Seminar on Video Game Programming Lecture 3: Collision Detection UCSD, Spring, 2003 Instructor: Steve Rotenberg.
Bounding Volume Hierarchy “Efficient Distance Computation Between Non-Convex Objects” Sean Quinlan Stanford, 1994 Presented by Mathieu Brédif.
UNC Chapel Hill M. C. Lin References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics.
3D Geometry for Computer Graphics
Adapted from: CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware Naga K. Govindaraju, Stephane.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Continuous Collision Detection David Knott COMP 259 class presentation.
Bounding Volume Hierarchies and Spatial Partitioning Kenneth E. Hoff III COMP-236 lecture Spring 2000.
Proximity Queries Using Spatial Partitioning & Bounding Volume Hierarchy Dinesh Manocha Department of Computer Science University of North Carolina at.
Apex Point Map for Constant-Time Bounding Plane Approximation Samuli Laine Tero Karras NVIDIA.
Efficient Distance Computation between Non-Convex Objects By Sean Quinlan Presented by Sean Augenstein and Nicolas Lee.
Collision Detection David Johnson Cs6360 – Virtual Reality.
Computer graphics & visualization Collision Detection – Narrow Phase.
11/25/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Managing large numbers of objects Colliding spheres with things (spheres being common.
Week 13 - Wednesday CS361.
12/4/2001CS 638, Fall 2001 Today Using separating planes/axes for collision testing Collision detection packages.
INTERACTION TECHNIQUES Collision Detection and Other Interactions Collision Detection and Other Interactions.
CSE 381 – Advanced Game Programming Quickhull and GJK.
Collision handling: detection and response
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
Week 13 - Monday.  What did we talk about last time?  Exam 2!  Before that…  Polygonal techniques ▪ Tessellation and triangulation  Triangle strips,
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
Collaborative Visual Computing Lab Department of Computer Science University of Cape Town Graphics Topics in VR By Shaun Nirenstein.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Implementation II.
Stabbing balls and simplifying proteins Ovidiu Daescu and Jun Luo Department of Computer Science University of Texas at Dallas Richardson, TX
3D Game Engine Design 1 3D Game Engine Design Ch D MAP LAB.
Chapter 11 Collision Detection 가상현실 입문 그래픽스 연구실 민성환.
Advanced Computer Graphics Spring 2009
Presented by Paul Phipps
Computer Graphics I, Fall 2010 Implementation II.
Interactive Continuous Collision Detection for Polygon Soups Xin Huang 11/20/2007.
A Fast Algorithm for Incremental Distance Calculation Ming C. Lin & John Canny University of California, Berkeley 1991 Presentation by Adit Koolwal.
Hierarchical Data Structure in Game Programming Yanci Zhang Game Programming Practice.
Week 13 - Wednesday CS361.
Computer Graphics Implementation II
Bounding Volume Hierarchies and Spatial Partitioning
Collision Detection Spring 2004.
Bounding Volume Hierarchies and Spatial Partitioning
Parts of these slides are based on
CSCE350 Algorithms and Data Structure
References Additional lecture notes for 2/18/02.
Collision handling: detection and response
Implementation II Ed Angel Professor Emeritus of Computer Science
2.5. Basic Primitive Intersection
References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics of Surfaces 1998.
Computer Animation Algorithms and Techniques
Introduction to Computer Graphics with WebGL
Collision Detection.
David Johnson Cs6360 – Virtual Reality
Implementation II Ed Angel Professor Emeritus of Computer Science
GPAT – Chapter 7 Physics.
Presentation transcript:

OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science, University of N. Carolina, Chapel Hill. Presenter: Tao Ju Spring, 2001

Introduction OBBTree: A tight-fitting hierarchical structure and an efficient overlap-testing algorithm for interference detection amongst complex models undergoing rigid motion. Bounding Volume: OBB (Oriented Bounding Box) Overlap test algorithm for OBBs: Separating Axis Algorithm

Computing Tight Fitting OBB O(n Log(n)) Triangulate polygons. ( O(n) ) Compute the convex hull of the vertices of the triangles. ( O(n Log(n)) ) Orientation of OBB: Covariance Matrix. ( O(n) ) Position and dimension of OBB. ( O(n) )

Compute Orientation of OBB Let the i ’ th triangle of the convex hull have vertices p i, q i, and r i. Let the number of triangles in the convex hull be n. The area of i ’ th triangle is denoted as A i, A i = | (p i - q i ) × (p i - r i ) | / 2 The surface area of the convex hull is denoted as A H, A H = ∑ i A i

Compute Orientation of OBB The centroid of the i ’ th triangle is denoted by vector m i, m i = ( p i + q i + r i ) / 3 The centroid of the entire convex hull is a weighted mean of the triangle centroids, denoted by m H, m H = ∑ i A i m i / A H

Compute Orientation of OBB The elements of the covariance matrix C n × n are defined as: C n × n = The three eigenvectors of C will be mutually orthogonal. After normalization, the three eigenvectors become axes of OBB.

Compute Dimension of OBB Find the maximum and minimum extents of the original triangle set along each axis, and size the OBB.

Computing Tight Fitting OBB Why using covariance matrix? Second order statistics summarizing the data points. Why using convex hull? Avoid arbitrary influences from interior vertices of the model. Why computing areas? Infinitely dense sampling.

Constructing a hierarchical OBBTree: Top-down Approach Subdivision method: Split the longest axis of an OBB with a plane orthogonal to one of its axes, partitioning the polygons according to which side of the plane their center point lies on. The subdivision coordinate along that axis was then chosen to be that of the mean point of the vertices.

OBBTree Construction Building the OBBTree: Recursively partition the bounded polygons and bound the resulting groups.

OBBTree Construction Running time: Similar to Quicksort. Fitting an OBB to n triangles and partitioning into two subgroups:O(n Log(n)) Levels of recursion:O( Log(n)) Total computation time: O(n Log 2 (n))

Fast Overlap Test For OBBs Previous algorithms: Simple test (144 edge-face tests) Linear programming Closest features computation. Performance: Two orders of magnitude slower than checking two spheres for overlap.

Fast Overlap Test For OBBs Separating axis theorem: Two convex polytopes are disjoint iff there exists a separating axis orthogonal to a face of either polytope or orthogonal to an edge from each polytope. Separating Axis: An axis on which the projections of two polytopes don’t overlap.

Fast Overlap Test For OBBs Testing 15 axes is sufficient for determining overlap status of two OBBs.

Fast Overlap Test For OBBs Radius of interval: r A = ∑ i | a i A i · L | The intervals are disjoint iff: | T · L | > r A + r B

Fast Overlap Test For OBBs The computation simplifies when L is a box axis or cross product of box axes. Worst case run time: 200 operations. ( computed on HP 735/125 ) Separating Axis Algorithm Closest Features Linear Programming 5 – 7 us45 – 105 us180 – 230 us

Comparison Of Bounding Volumes Bounding volumes: Spheres AABBs ( Axis Aligned Bounding Boxes ) OBBs ( Oriented Bounding Boxes )

Comparison Of Bounding Volumes Cost function of hierarchical structure: T = N v × C v + N p × C p where N v : # of bounding volume pair overlap tests C v : cost of testing a pair of bounding volumes for overlap, N p : # of primitive pairs tested for interference, C p : cost of testing a pair of primitives for overlap.

Comparison Of Bounding Volumes C v is one-order of magnitude slower than that for sphere trees or AABBs. Primary advantage for OBB: Low N v and N p In general, OBBs can bound geometry more tightly than AABBTrees and sphere trees.

Comparison Of Bounding Volumes Define tightness, г, of a bounding volume, B, with respect to the geometry it covers, G, is B ’ s Hausdorff distance from G, i.e. г= max b min g dist(b, g)b ∈ B, g ∈ G Define diameter, d, of a bounding volume with respect to the bounded geometry is the maximum distance among all pairs of enclosed points on the bounded geometry, d = max g,h dist(g, h) g, h ∈ G

Comparison Of Bounding Volumes When bounding low curvature surfaces, AABBTrees and spheres haveгwith linear dependence on d, whereas OBBTrees haveгwith quadratic dependence on d. To cover a surface patch with volumes to a given tightness, if OBBs require O(m) bounding volumes, AABBs and spheres would require O(m 2 ) bounding volumes.

Comparison Of Bounding Volumes AABBs vs. OBBs: Approximation of a Torus – This shows OBBs converging to the shape of a torus more rapidly.

Experiment Of Bounding Volumes Parallel close proximity : every point on each surface is close to some point on the other surface.

Experiment Of Bounding Volumes Point close proximity : two nonparallel surfaces patches come close to touching at a point.

Comparison Of Performance With AABBs: Improvement from 1/7 – 1/5 of a second for computation of all contacts between models to 1/75 – 1/25 of a second. ( on SGI Indigo 2 Extreme ). With spheres: Improvement of one order of magnitude.

Interference Detection In Action RAPID V-COLLIDE H-COLLIDE

Interference Detection In Action Interactive Interference Detection on Complex Interweaving Pipeline: 140, 000 polygons each; Average time to perform collision query: 4.2 msec

Interference Detection In Action Interactive Interference Detection for a Torpedo on a Pivot Structure – Torpedo has 4780 triangles; Pivot has triangles; Average time to perform collision query: 100 msec

Interference Detection In Action Interactive Interference Detection for a Complex Torus – Torus has polygons; Environment has polygons; Average time to perform collision query: 6.9 msec

Conclusion New efficient algorithms for hierarchical representation using tight-fitting OBBs. Use of a “ separating axis ” theorem to check two OBBs for overlap in about 100 operations on average. By comparison with AABBs, show that for many close proximity situations, OBBs are asymptotically much faster.