2.1. C OLLISION D ETECTION Overview. Collision detection is used within many types of application, e.g. from robotics, through engineering simulations,

Slides:



Advertisements
Similar presentations
2.6. B OUNDING V OLUME H IERARCHIES Overview of different forms of bounding volume hierarchy.
Advertisements

2.5. B ASIC P RIMITIVE I NTERSECTION Details of common forms of primitive intersection test.
Exploration of bump, parallax, relief and displacement mapping
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.
3.2. I NTRODUCTION TO R EAL - TIME P HYSICS Overview of core principles behind real-time physics systems.
3.7. S TABILITY AND O PTIMISATION Improving engine stability and performance.
CSE 380 – Computer Game Programming Collision Detection & Response Erin Catto’s Box2D.
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
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.
Parallel Decomposition-based Contact Response Fehmi Cirak California Institute of Technology.
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.
Adapted from: CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware Naga K. Govindaraju, Stephane.
Implicit Surfaces Tom Ouyang January 29, Outline Properties of Implicit Surfaces Polygonization Ways of generating implicit surfaces Applications.
Oct 26, Fall 2006IAT 4101 Collision Detection. Oct 26, Fall 2006IAT 4102 Collision Detection  Essential for many games –Shooting –Kicking, punching,
Game Mathematics & Game State The Complexity of Games Expectations of Players Efficiency Game Mathematics o Collision Detection & Response o Object Overlap.
Oct 3, Fall 2005Game Design1 Collision Detection.
Computer graphics & visualization Collision Detection – Narrow Phase.
12/4/2001CS 638, Fall 2001 Today Using separating planes/axes for collision testing Collision detection packages.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
In the name of God Computer Graphics Modeling1. Today Introduction Modeling Polygon.
Haptic rendering Part 1 4/CY/B3 Part 1. Collision detection and response Nic Melder Part 2. Manipulation and polygon transitions (T.B.A.)
COMPUTER AIDED DESIGN -(CAD)-3
CSE 381 – Advanced Game Programming Quickhull and GJK.
3D Graphics for Game Programming Chapter XII Physics-based Simulation.
© Fluent Inc. 10/14/ Introductory GAMBIT Notes GAMBIT v2.0 Jan 2002 Fluent User Services Center Volume Meshing and the Sizing.
3.4. C ONTACT G ENERATION Generating contacts between rigid bodies.
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.
Collision and Proximity Queries Dinesh Manocha Department of Computer Science University of North Carolina
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
Visual Computing Geometric Modelling 1 INFO410 & INFO350 S2 2015
CSCE 552 Fall 2012 Math, Physics and Collision Detection By Jijun Tang.
A Computationally Efficient Framework for Modeling Soft Body Impact Sarah F. Frisken and Ronald N. Perry Mitsubishi Electric Research Laboratories.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Minimum Distance between curved surfaces Li Yajuan Oct.25,2006.
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
11/20/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Collision Detection Overview Player-Environment handling.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Subdivision Surfaces Greg Humphreys University of Virginia CS 445, Fall 2003.
Maths & Technologies for Games Spatial Partitioning 1 CO3303 Week 8-9.
Advanced Games Development Game Physics CO2301 Games Development 1 Week 19.
Interactive Continuous Collision Detection for Polygon Soups Xin Huang 11/20/2007.
Introduction to Game Programming & Design III Lecture III.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
APE'07 IV INTERNATIONAL CONFERENCE ON ADVANCES IN PRODUCTION ENGINEERING June 2007 Warsaw, Poland M. Nowakiewicz, J. Porter-Sobieraj Faculty of.
CS679 - Fall Copyright Univ. of Wisconsin
POLYGON MESH Advance Computer Graphics
3D Object Representations
CS475 3D Game Development Level Of Detail Nodes (LOD)
2.1. Collision Detection Overview.
Chapter 4.2 Collision Detection and Resolution
2.5. Basic Primitive Intersection
Motion in Real and Virtual Worlds
Computer Animation Algorithms and Techniques
Collision Detection.
Advanced Games Development Game Physics
CO Games Concepts Week 12 Collision Detection
GPAT – Chapter 7 Physics.
Presentation transcript:

2.1. C OLLISION D ETECTION Overview

Collision detection is used within many types of application, e.g. from robotics, through engineering simulations, to computer games. In computer games, collision detection provides: the illusion of a solid world (e.g. preventing the player from falling through the floor, rag-dolls from visually intersecting their surroundings) line-of-sight queries (e.g. for driving AI opponent visibility/aiming tests, etc.). Note: The material in this section is based on the course text. The following considers a number of key design issues to consider when building a collision detection system.

Core issues for consideration when building a collision detection system

Game object representations include: Explicit representation: e.g. polygon (triangle) mesh consisting of a number of defined vertices, connected by edges and forming faces. Most game objects are represented (and rendered) using a triangle mesh. Implicit representation: e.g. Spheres, ellipsoids, cylinders, whose surface is defined mathematically. Aside: Some objects can be precisely defined both explicitly and implicitly, e.g. cuboids.

Typically an explicit mesh used for rendering will be too complex (hence computationally expensive) to be used for collision detection. An implicit object description or simple explicit representation can be employed as an object approximation. This is effective as 1) we are very tolerant of minor inaccuracies between collision detection (particularly if the objects are moving quickly or there are many on- screen collisions), 2) in games there is rarely a need for very high precision. The downside of using separate collision geometry is data duplication (more information needs to be stored) and the extra work required to build and maintain the collision geometry.

Common types of collision query include (in all cases assumed between two objects based on their current positions/orientations) Determining (i.e. true/false response) if two objects are intersecting (broadly easy/fast to accomplish) Determining the point(s) of contact between two objects. The point(s) of contact might be expressed in terms of a penetration depth, surface normal, etc. Aside: Often a rigid-body physics simulation will need to consider the set of all contacting points between two bodies (i.e. the contact manifold). Computing the contact manifold is typically a complex problem.

The number of potentially intersecting objects and their spatial organisation will likely have a bearing upon how a collision detection system is introduced. For large numbers of items an exhaustive set of pairwise tests becomes impractical (n(n-1)/2 individual tests). The number of tested pairs needs to be reduced. This is typically done by separating collision detection into two phases: Broad phase – identifying (small) subgroups of objects that may be colliding Narrow phase – Pairwise collision tests between objects contained within subgroups

Simultaneous Motion: All objects are stepped (i.e. position/rotation updated) by a small time step (e.g. 1/50s). A set of all intersecting objects is determined and processed (e.g. the set of intersecting objects can respond in a physically plausible manner) Sequential Motion: Each object is moved and immediately tested for collision (alongside collision resolution). Then the next object is given an opportunity to move. Sequential movement is the more physically inaccurate approach (e.g. resulting in collisions that should not have occurred).

Discrete Motion: This involves checking for intersection between objects at discrete time instances. At each point, the objects are considered to be stationary. Continuous Motion: This involves considering the continuous motion of the object over the specified period of time (i.e. its swept volume). Continuous motion intersection is often a lot more expensive than discrete motion, but can determine the exact point of initial contact and is not subject to tunnelling. Aside: Tunnelling can be a problem with discrete motion if, within the time step between intersections, an object moves more than its spatial extent (i.e. it may simply through another object without detection).

Intersection detection is typically an expensive test. Means of improving performance include: Selecting a board-phase approach that exploits object spatial distribution. Performing simple bounding volume tests first, before considering more complex/accurate geometric intersection tests. Exploiting temporal coherency, i.e. in general the position/orientation of objects change slowly from one frame to the next (often permitting results to be cached and reused). Of course there are a range of lower-level, implementation and platform specific optimisations that can be considered if needed.

Directed collision overview reading Directed reading

Read Chapter 2 (pp7-21) of Real Time Collision Detection Directed reading

To do: Explore the directed reading. Today we explored: Overview of collision detection issues. Common types of collision detection system.