Oct 3, Fall 2005Game Design1 Collision Detection.

Slides:



Advertisements
Similar presentations
Everything you ever wanted to know about collision detection
Advertisements

Direct Volume Rendering. What is volume rendering? Accumulate information along 1 dimension line through volume.
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.
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/
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.
2.1. C OLLISION D ETECTION Overview. Collision detection is used within many types of application, e.g. from robotics, through engineering simulations,
CSE 380 – Computer Game Programming Collision Detection & Response Erin Catto’s Box2D.
Hidden Surface Removal Why make the effort?  Realistic models.  Wasted time drawing. OpenGL and HSR  OpenGL does handle HSR using the depth buffer.
Advanced Computer Graphics Spring 2014
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
A Fast Algorithm for Incremental Distance Calculation Paper by Ming C. Ling and John F. Canny Presented by Denise Jones.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Basic 3D collision detection We want to know if objects have touched Objects are considered to.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
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.
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.
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.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Continuous Collision Detection David Knott COMP 259 class presentation.
Oct 26, Fall 2006IAT 4101 Collision Detection. Oct 26, Fall 2006IAT 4102 Collision Detection  Essential for many games –Shooting –Kicking, punching,
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Computer graphics & visualization Collision Detection – Narrow Phase.
CS 4730 Collision Detection CS 4730 – Computer Game Design.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
10/09/2001CS 638, Fall 2001 Today Spatial Data Structures –Why care? –Octrees/Quadtrees –Kd-trees.
CSE 381 – Advanced Game Programming Quickhull and GJK.
CSE 381 – Advanced Game Programming GJK. GJK Gilbert – Johnson – Keerthi distance algorithm Used to determine the minimum distance between convex sets.
Contact Manifolds Erin Catto Blizzard Entertainment.
Collision handling: detection and response
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
Section 8.4 Nack/Jones1 Section 8.4 Polyhedrons & Spheres.
Quaternions Paul Taylor Swizzle What is a swizzle?
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.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
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.
Implementation II.
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.
1 11. Polygons Polygons 2D polygons ( 다각형 ) –Polygon sides are all straight lines lying in the same plane 3D polyhedra ( 다면체 )  chap. 12 –Polyhedra.
12.1 Exploring Solids.
______________________________________________________________________________________ SCHOOL OF INTERACTIVE ARTS + TECHNOLOGY [SIAT] |
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Presented by Paul Phipps
Computer Graphics I, Fall 2010 Implementation II.
Polygon Definition Bounded by a closed circuit of straight-line segment. Term Edge : straight line segment Vertices : points.
Ray Tracing Optimizations
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
Minkowski Sums and Distance Computation Eric Larsen COMP
Particle Animation and Rendering Using Data Parallel Computation Karl Sims Optomystic Thinking Machines Corporation Presentation ©2001 Brenden Schubert.
Physics for Games Programmers: Collision Detection Crash Course Gino van den Bergen
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
Computer Graphics Implementation II
Procedural, Collision University of British Columbia
2.1. Collision Detection Overview.
Parts of these slides are based on
Detekcija trkov.
Chapter 4.2 Collision Detection and Resolution
Implementation II Ed Angel Professor Emeritus of Computer Science
Lecture 3 : Isosurface Extraction
CS679 - Fall Copyright Univ. of Wisconsin
Computer Animation Algorithms and Techniques
Collision Detection.
Implementation II Ed Angel Professor Emeritus of Computer Science
Problem Image and Volume Segmentation:
GPAT – Chapter 7 Physics.
Presentation transcript:

Oct 3, Fall 2005Game Design1 Collision Detection

Oct 3, Fall 2005Game Design2 Collision Detection  Essential for many games –Shooting –Kicking, punching, beating, whacking, smashing, hitting, chopping, dicing, slicing, julienne fries… –Car crashes  Expensive – tests!!

Oct 3, Fall 2005Game Design3 Collision Detection  For each object i containing polygons p –Test for intersection with object j with polygons q –(j > i)  For polyhedral objects, test if object i penetrates surface of j –Test if vertices of i straddle polygon q of j If straddle, then test intersection of polygon q with polygon p of object i

Oct 3, Fall 2005Game Design4 Collision Detection  Efficiency hacks/cheats –Fewer tests: Exploit spatial coherence Use bounding boxes/spheres Hierarchies of bounding boxes/spheres

Oct 3, Fall 2005Game Design5 Bounding Boxes  Axis-aligned vs. Object-aligned  Axis-aligned BBox change as object moves  Approximate by rotating BBox Swept volume

Oct 3, Fall 2005Game Design6 Collision Detection  Convex objects –Look for separating plane Test all faces Test each edge from obj 1 against vertex of obj 2 –Save separating plane for next animation frame

Oct 3, Fall 2005Game Design7 Collision Detection  Concave Objects –Break apart –Convex hull Automatic or artist-created

Oct 3, Fall 2005Game Design8 Collision Detection  To go faster –Sort on one dimension Bucket sort (i.e. discretize in 1 dimension) –Exploit temporal coherence Maintain a list of object pairs that are close to each other Use current speeds to estimate likely collisions –Use cheaper tests

Oct 3, Fall 2005Game Design9 Collision Detection  Cheaper distance calculation: –Compare against  Approximation: –Manhattan distance - Shortest side/2

Oct 3, Fall 2005Game Design10 Collision Detection: Sprites  AND for each pixel in sprites

Oct 3, Fall 2005Game Design11 Collision Detection  Discretization in 3D  Create a voxel array –Store an ID in each voxel where an object is –Collision where voxel has an ID already –Difficult to determine good voxel size –Huge memory –Hash table -- gives constant time point queries

Oct 3, Fall 2005Game Design12 Inter-Object Distance  A related problem: –Collision Avoidance  Part of motion planning is to avoid collisions  Many collision detection algorithms take time into account  Estimate Collision Time, distance 