Computer Animation Algorithms and Techniques

Slides:



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

2.5. B ASIC P RIMITIVE I NTERSECTION Details of common forms of primitive intersection test.
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
Computational Geometry & Collision detection
A Fast Algorithm for Incremental Distance Calculation Paper by Ming C. Ling and John F. Canny Presented by Denise Jones.
MAE 242 Dynamics – Section I Dr. Kostas Sierros.
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.
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.
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Collision Detection David Johnson Cs6360 – Virtual Reality.
Computer graphics & visualization Rigid Body Simulation.
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.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
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,
Chapter 17 PLANE MOTION OF RIGID BODIES: ENERGY AND MOMENTUM METHODS
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
Computer Game Design and Development
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, ;
Dynamics. Motion with Regard to Mass Particle Dynamics Mass concentrated in point Newton’s Equation Governs Motion f = M x.
Computer Graphics Imaging Ying Zhu Georgia State University Lecture 29 Soft Bodies and Rigid Bodies.
Particle Kinematics Direction of velocity vector is parallel to path Magnitude of velocity vector is distance traveled / time Inertial frame – non accelerating,
Feature-length films: Games: Desktop Animations:.
Fundamentals of Computer Animation Collision Detection and Response.
Advanced Computer Graphics Rigid Body Simulation
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
CHAPTER 4: Systems of Particles
Collision Detection Spring 2004.
Intersecting Simple Surfaces
Parts of these slides are based on
Chapter 4.2 Collision Detection and Resolution
Collision handling: detection and response
Kinematics of Rigid Bodies in Three Dimensions
2.5. Basic Primitive Intersection
Manipulator Dynamics 2 Instructor: Jacob Rosen
Motion in Real and Virtual Worlds
Collision Detection.
Game Programming Algorithms and Techniques
David Johnson Cs6360 – Virtual Reality
GPAT – Chapter 7 Physics.
Presentation transcript:

Computer Animation Algorithms and Techniques Collisions & Contact

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 detection kinematic response Penalty method Impulse force of collision response

Collision detection: point-plane

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

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

Collision response: damped Damping factor = 0.8

Collision response – penalty method Add restitution force into enviornment Often have to hand-tune spring: not too stiff, not too wimpy

Collision response: penalty

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

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)

Bounding Spheres Compute bounding sphere of vertices Compute in object space and transform with object Find min/max pair of points in each dimension use maximally separated pair – use to create initial bounding sphere (midpoint is center) for each vertex adjust sphere to include point Q: How do you test for overlapping spheres? A: Compute distance between centers and compare to sum of radii

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

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

Convex Hull Best fit convex polyhedron to concave polyhedron but takes some (one-time) computation Find highest vertex, V1 Find remaining vertex that minimizes angle with horizontal plane through point. Call edge L Form plane with this edge and horizontal line perpendicular to L at V1 Find remaining vertex that for triangle that minimizes angle with this plane. Add this triangle to convex hull, mark edges as unmatched For each unmatched edge, find remaining vertex that minimizes angle with the plane of the edge’s triangle Might be more efficient methods, but this is intuitive and not hard to code up

Collision detection: polyhedra 1. test bounding volumes for overlap 2. test for vertex of one object inside of other object 3. test for edge of one object intersecting face of other object Now consider #2 and #3

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 Q: What if semi-infinite ray exactly intersects a vertex (does it intersect both edges, no edges, one edge)? A: only count intersection if it intersects higher of 2 vertices of edge; ignore intersections with horizontal edges A vertex is inside a cancave polyhedron if a semi-infinite ray from the vertex intersects an odd number of faces

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)

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

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

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

Impulse response How to compute the collision response of two rotating rigid objects?

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

Rigid body simulation Impulse force Separation velocity

Update linear and angular velocities as a result of impulse force

Velocities of points of contact

Rigid body simulation vrel- j applied to object A; -j applied to B

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