Collision Detection Michael Fuller. Overlap testing Most Common Technique Most Error Prone Test if two bodies overlap.

Slides:



Advertisements
Similar presentations
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Advertisements

Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
2.3. B OUNDING V OLUMES Bounding volumes of use for collision detection.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
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.
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.
CSE 381 – Advanced Game Programming Scene Management
Computational Geometry & Collision detection
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
K-structure, Separating Chain, Gap Tree, and Layered DAG Presented by Dave Tahmoush.
Collision Detection CSE 191A: Seminar on Video Game Programming Lecture 3: Collision Detection UCSD, Spring, 2003 Instructor: Steve Rotenberg.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
Game Mathematics & Game State The Complexity of Games Expectations of Players Efficiency Game Mathematics o Collision Detection & Response o Object Overlap.
CSCE 590E Spring 2007 Collision Detection By Jijun Tang.
Mechanics, Dynamics & Aesthetics The Complexity of Games Expectations of Players Efficiency Game Mathematics o Collision Detection & Response o Object.
1Notes. 2 Time integration for particles  Back to the ODE problem, either  Accuracy, stability, and ease-of- implementation are main issues  Obviously.
CS 4730 Collision Detection CS 4730 – Computer Game Design.
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.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
Managing Your Objects Paul Taylor 2009 Assignment Due Fri 5/6/2009.
10/09/2001CS 638, Fall 2001 Today Spatial Data Structures –Why care? –Octrees/Quadtrees –Kd-trees.
COMPUTER AIDED DESIGN -(CAD)-3
© Manfred Huber Autonomous Robots Robot Path Planning.
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,
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Collision/Acceleration University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
12/4/2001CS 638, Fall 2001 Today Managing large numbers of objects Some special cases.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
Computer Game Design and Development Mathematics, Collision, and Physics Havok Destruction.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
CSCE 552 Fall 2012 Math, Physics and Collision Detection By Jijun Tang.
Controlling a Virtual Camera Ross Ptacek University of Alabama Birmingham.
3D Game Engine Design 1 3D Game Engine Design Ch D MAP LAB.
ONLINE CONFERENCE DESIGN.BUILD.DELIVE R with WINDOWS PHONE THURSDAY 24 MARCH 2011.
Computer Game Design and Development
Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited.
Ray Tracing Optimizations
Game Programming 13 Physics in Games (cont.) 2010 년 2 학기 디지털콘텐츠전공.
Introduction to Game Programming & Design III Lecture III.
CSCE 552 Fall 2012 Math, Physics and Collision Detection By Jijun Tang.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
3D Game Development and Computer Animation Collision Detection
CS679 - Fall Copyright Univ. of Wisconsin
Collision Detection Spring 2004.
3D Object Representations
Parts of these slides are based on
Chapter 4.2 Collision Detection and Resolution
Collision handling: detection and response
Mechanics, Dynamics & Aesthetics
INTERACTION TECHNIQUES
Spatial Databases: Digital Terrain Model
CS679 - Fall Copyright Univ. of Wisconsin
Computer Animation Algorithms and Techniques
Collision Detection.
CO Games Concepts Week 12 Collision Detection
Game Programming Algorithms and Techniques
Spatial Databases: Digital Terrain Model
David Johnson Cs6360 – Virtual Reality
GPAT – Chapter 7 Physics.
Presentation transcript:

Collision Detection Michael Fuller

Overlap testing Most Common Technique Most Error Prone Test if two bodies overlap

TIME STEP 1 TIME STEP 2 TIME STEP 3 TIME STEP 4 Overlap Example

Overlap Limitations Fails for Small or Fast Moving Objects TIME STEP 1 TIME STEP 2 TIME STEP 3

Intersection Testing Predicts future collision before they happen Multiple collision can occur in one time sample Tests geometry of two swept objects

Intersection Example Planned Path Testing

Intersection Limitations Networked Games cannot reliably use this method.  Needs perfect information to be accurate  Packet loss can cause sync errors with timing Assumes no Acceleration during steps  Engine would have to accommodate for this.

Complexity Testing every object against each other Complex Geometry Very Tedious and Time Consuming

Geometry Testing Very Tedious to Test Every Edge Instead use simplified geometry Alex from Half-Life 2, Model, Hit Boxes, Physics Model

Simplified Geometry Use Simplified models for Testing Not acceptable for all games Physics ModelRender Model

Minkowski Sum Merge two shapes and create a new volume Determine Overlap by testing if a single point is contained inside of the sum.

Minkowski Sum Example Test Square & Circle Collision Square + Circle Minkowski Sum Test

Bounding Volumes Turn Complex objects into bounded areas for testing Fast, but not reliable Great 1 st test, but should be followed by another test

Bounding Sphere Simplest Way to bound an object Good for small or round objects

Bounding Boxes Axis Aligned Vs Orientated Axis Aligned Cheaper Orientated More Expensive

More Bounding Boxes Use of Multiple Bounding Boxes Chain of Bounding Boxes G-Man, Dog & Alex from Half-Life 2

Time Complexity Test for Collisions Faster Partitioning  Put Every Object into a Cell  Test Adjacent Cells Plane Sweep  Test Objects who have colliding planes

Partitioning

Plane Sweep

Terrain Collisions How to test for collisions within a 3d landscape Most terrains are height maps  No Cliffs, or Overhead Terrain  Used in Oblivion, Half-life 2 & Supreme Commander Non-Uniform Terrains (TINs)  Polygon Meshes for terrain, ex. Caves, interiors.

Height map

Triangulated Irregular Networks Irregular meshes can still be parsed using oct- trees. Oct-trees are useful, because they subdivide into smaller segments. So knowing which oct- tree your in allows the engine to search within in, until the correct polygon is found. Also can be used to make simpler geometry for distant scenery.