Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.

Slides:



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

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.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
Two-Dimensional Rotational Dynamics W09D2. Young and Freedman: 1
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/
Geometry Primer Lines and rays Planes Spheres Frustums Triangles Polygon Polyhedron.
Physics Montwood High School R. Casao
Advanced Computer Graphics Spring 2014
Computational Geometry & Collision detection
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.
Color Problem Have a black-box function that returns a bright color in 24-bit RGB Want a paler version of the output What to do?
Chapter 5 Rotation of a Rigid Body. §5-5 Angular Momentum of a rigid Body Conservation of Angular Momentum §5-1 Motion of a Rigid body §5-2 Torque The.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
EGR 280 Mechanics 18 – Impulse and Momentum of Rigid Bodies.
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.
1cs533d-winter-2005 Notes  Assignment 2 going okay? Make sure you understand what needs to be done before the weekend  Read Guendelman et al, “Nonconvex.
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,
Physics 101: Lecture 15, Pg 1 Physics 101: Lecture 15 Impulse and Momentum l Today’s lecture will be a review of Chapters and l New material:
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Oct 3, Fall 2005Game Design1 Collision Detection.
Collision Detection David Johnson Cs6360 – Virtual Reality.
Computer graphics & visualization Collision Detection – Narrow Phase.
Feature-length films: Games: Desktop Animations: Computer Animation.
Week 13 - Wednesday CS361.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Physically Based Animation.
Interaction and Normals Intro to Programming in 3D Applications Lecture 20.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
CSE 381 – Advanced Game Programming Quickhull and GJK.
Collision handling: detection and response
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
3D Graphics for Game Programming Chapter XII Physics-based Simulation.
3.4. C ONTACT G ENERATION Generating contacts between rigid bodies.
Week 13 - Monday.  What did we talk about last time?  Exam 2!  Before that…  Polygonal techniques ▪ Tessellation and triangulation  Triangle strips,
Collision/Acceleration University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
Chapter 17 PLANE MOTION OF RIGID BODIES: ENERGY AND MOMENTUM METHODS
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
ONLINE CONFERENCE DESIGN.BUILD.DELIVE R with WINDOWS PHONE THURSDAY 24 MARCH 2011.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
Computer Game Design and Development
1 11. Polygons Polygons 2D polygons ( 다각형 ) –Polygon sides are all straight lines lying in the same plane 3D polyhedra ( 다면체 )  chap. 12 –Polyhedra.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Advanced Games Development Game Physics CO2301 Games Development 1 Week 19.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
Two-Dimensional Rotational Dynamics 8.01 W09D2 Young and Freedman: 1.10 (Vector Product), , 10.4, ;
Computer Graphics Imaging Ying Zhu Georgia State University Lecture 29 Soft Bodies and Rigid Bodies.
Concepts for Programming a Rigid Body Physics Engine Part 2 Presented by Scott Hawkins.
Feature-length films: Games: Desktop Animations:.
Fundamentals of Computer Animation Collision Detection and Response.
Collisions Collision Avoidance - force fields, steer to avoid, etc.
2D Simulation of Rigid Bodies
Computer Animation Ying Zhu Georgia State University
Kinetics of Rigid Bodies in Three Dimensions
Collision Detection Spring 2004.
Chapter 4.2 Collision Detection and Resolution
Collision handling: detection and response
Kinematics of Rigid Bodies in Three Dimensions
Motion in Real and Virtual Worlds
Computer Animation Algorithms and Techniques
Collision Detection.
Advanced Games Development Game Physics
David Johnson Cs6360 – Virtual Reality
GPAT – Chapter 7 Physics.
Presentation transcript:

Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact

Computer Animation Rick Parent Collision handling detection & response Particle-plane collision detection Polyhedron-polyhedron collision detection overlap of Bounding volumes Vertex inside polyhedron test Concave case Convex case Edge-face intersection test kinematic response Penalty method Impulse force of collision detection response

Computer Animation Rick Parent Collision detection: point-plane N

Computer Animation Rick Parent Collision detection: time of impact 2 options Consider collision at next time step Compute fractional time at which collision actually occurred Tradeoff: accuracy v. complexity

Computer Animation Rick Parent Collision response: kinematic N k – damping factor =1 indicates no energy loss No forces involved! Negate component of velocity in direction of normal

Computer Animation Rick Parent Collision response: damped Damping factor = 0.8

Computer Animation Rick Parent Collision response – penalty method

Computer Animation Rick Parent Collision response: penalty

Computer Animation Rick Parent Collision detection: polyhedra 2. test for vertex of one object inside of other object 1. test bounding volumes for overlap 3. test for edge of one object intersecting face of other object Order tests according to computational complexity and power of detection

Computer Animation Rick Parent Collision detection: bounding volumes Don’t do vertex/edge intersection testing if there’s no chance of an intersection between the polyhedra Want a simple test to remove easy cases Tradeoff complexity of test with power to reject non-intersecting polyhedra (goodness of fit of bounding volume)

Computer Animation Rick Parent Bounding Spheres Compute bounding sphere of vertices Compute in object space and transform with object 1.Find min/max pair of points in each dimension 2. use maximally separated pair – use to create initial bounding sphere (midpoint is center) 3. for each vertex adjust sphere to include point

Computer Animation Rick Parent Bounding Boxes Axis-aligned (AABB): use min/max in each dimension Oriented (OBB): e.g., use AABB in object space and transform with object. Vertex is inside of OBB iff on inside of 6 planar equations

Computer Animation Rick Parent Bounding Slabs For better fit bounding polyhedron: use arbitrary (user-specified) collection of bounding plane-pairs Is a vertex between each pair?

Computer Animation Rick Parent Convex Hull Best fit convex polyhedron to concave polyhedron but takes some (one-time) computation 1.Find highest vertex, V1 2.Find remaining vertex that minimizes angle with horizontal plane through point. Call edge L 3.Form plane with this edge and horizontal line perpendicular to L at V1 4.Find remaining vertex that for triangle that minimizes angle with this plane. Add this triangle to convex hull, mark edges as unmatched 5.For each unmatched edge, find remaining vertex that minimizes angle with the plane of the edge’s triangle

Computer Animation Rick Parent Collision detection: polyhedra 2. test for vertex of one object inside of other object 1. test bounding volumes for overlap 3. test for edge of one object intersecting face of other object

Computer Animation Rick Parent Collision detection: polyhedra Intersection = NO For each vertex, V, of object A if (V is inside of B) intersection = YES For each vertex, V, of object B if (V is inside of A) intersection = YES A vertex is inside a convex polyhedron if it’s on the ‘inside’ side of all faces A vertex is inside a cancave polyhedron if a semi-infinite ray from the vertex intersects an odd number of faces

Computer Animation Rick Parent Collision detection: polyhedra Edge intersection face test Finds ALL polyhedral intersections But is most expensive test If vertices of edges are on opposite side of plane of face Calculate intersection of edge with plane Test vertex for inside face (2D test in plane of face)

Computer Animation Rick Parent Collision detection: swept volume Time & relative direction of travel sweeps out a volume Only tractable in simple cases (e.g. linear translation) If part of an object is in the volume, it was intersected by object

Computer Animation Rick Parent Collision reaction Coefficient of restitution N k – coefficient of restitution But now want to add angular velocity contribution to separation velocity

Computer Animation Rick Parent Rigid body simulation Object Properties Mass Position linear & angular velocity linear & angular momentum Calculate forces Wind Gravity Viscosity Collisions Calculate accelerations Linear & angular using mass and inertia tensor Calculate change in attributes Position linear & angular velocity linear & angular momentum

Computer Animation Rick Parent Impulse response How to compute the collision response of two rotating rigid objects?

Computer Animation Rick Parent Impulse response Given Separation velocity is to be negative of colliding velocity Compute Impulse force that produces sum of linear and angular velocities that produce desired separation velocity

Computer Animation Rick Parent Rigid body simulation Impulse forceSeparation velocity

Computer Animation Rick Parent Update linear and angular velocities as a result of impulse force

Computer Animation Rick Parent Velocities of points of contact

Computer Animation Rick Parent Rigid body simulation v rel - j applied to object A; -j applied to B

Computer Animation Rick Parent Resting contact Complex situations: need to solve for forces that prevent penetration, push objects apart, if the objects are separating, then the contact force is zero