Collision processing

Similar documents
Collision and Proximity Queries

Cloth Animation with Collision Detection

CPSC / Sonny Chan - University of Calgary. Collision Detection II

Collision Detection. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill

References. Additional lecture notes for 2/18/02.

Jane Li. Assistant Professor Mechanical Engineering Department, Robotic Engineering Program Worcester Polytechnic Institute

QP-Collide: A New Approach to Collision Treatment

Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Acceleration Data Structures

Cloth Simulation. Tanja Munz. Master of Science Computer Animation and Visual Effects. CGI Techniques Report

Rigid Body Simulation. Jeremy Ulrich Advised by David Mount Fall 2013

Collision Detection with Bounding Volume Hierarchies

Spatial Data Structures

An Adaptive Collision Detection and Resolution for Deformable Objects Using Spherical Implicit Surface

Spatial Data Structures

Collision Detection II. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

CAB: Fast Update of OBB Trees for Collision Detection between Articulated Bodies

Ray Tracing Acceleration. CS 4620 Lecture 20

Lecture 24 of 41. Collision Handling Part 1 of 2: Separating Axes, Oriented Bounding Boxes

Bounding Volume Hierarchies

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Accelerated Raytracing

Fast continuous collision detection among deformable Models using graphics processors CS-525 Presentation Presented by Harish

Simulation (last lecture and this one)

Real-time Continuous Collision Detection and Penetration Depth Computation

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

An efficient space partitioning technique based on linear kd-trees for collision culling

Collision Detection. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Ray Tracing Acceleration. CS 4620 Lecture 22

Using Bounding Volume Hierarchies Efficient Collision Detection for Several Hundreds of Objects

Overview. Collision Detection. A Simple Collision Detection Algorithm. Collision Detection in a Dynamic Environment. Query Types.

l Without collision detection (CD), it is practically impossible to construct e.g., games, movie production tools (e.g., Avatar)

Anatomy of a Physics Engine. Erwin Coumans

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Collision Detection between Dynamic Rigid Objects and Static Displacement Mapped Surfaces in Computer Games

Spatial Data Structures

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Lesson 05. Mid Phase. Collision Detection

Hidden surface removal. Computer Graphics

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Spatial Data Structures

Combinatorial optimization and its applications in image Processing. Filip Malmberg

Graphs, Search, Pathfinding (behavior involving where to go) Steering, Flocking, Formations (behavior involving how to go)

Overview. Collision detection. Collision detection. Brute force collision detection. Brute force collision detection. Motivation

Collision detection. Piotr Fulma«ski. 1 grudnia

Dynamic Bounding Volume Hierarchies. Erin Catto, Blizzard Entertainment

PolyDepth: Real-Time Penetration Depth Computation Using Iterative Contact-Space Projection

Task Description: Finding Similar Documents. Document Retrieval. Case Study 2: Document Retrieval

Dynamic Collision Detection

Continuous Collision Detection and Physics

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

B553 Lecture 12: Global Optimization

Discrete representations of geometric objects: Features, data structures and adequacy for dynamic simulation. Part I : Solid geometry

Deformable and Fracturing Objects

Collision Detection. Motivation - Dynamic Simulation ETH Zurich. Motivation - Path Planning ETH Zurich. Motivation - Biomedical Simulation ETH Zurich

Computer Graphics Ray Casting. Matthias Teschner

Data Structures for Moving Objects

CS535 Fall Department of Computer Science Purdue University

Motion Capture & Simulation

Recall: Inside Triangle Test

Real-Time Collision Detection for Dynamic Virtual Environments

Steering 1. from Millington, "Artificial Intelligence for Games", MKP 2006.

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Lecture VI: Constraints and Controllers

Intersection Acceleration

11 - Spatial Data Structures

animation projects in digital art animation 2009 fabio pellacini 1

Geometry proxies (in 2D): a Convex Polygon

Collision detection. Piotr Fulma«ski. 19 pa¹dziernika Wydziaª Matematyki i Informatyki, Uniwersytet Šódzki, Polska

improving raytracing speed

From Vertices To Fragments-1

Real Time Cloth Simulation

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Volumetric Particle Separating Planes for Collision Detection

Cognitive Robotics Robot Motion Planning Matteo Matteucci

MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur

Platform Games Drawing Sprites & Detecting Collisions

Collision handling: detection and response

Robot Motion Control Matteo Matteucci

Learning Objectives. c D. Poole and A. Mackworth 2010 Artificial Intelligence, Lecture 3.5, Page 1

Collision Detection based on Spatial Partitioning

The Traditional Graphics Pipeline

1. Mesh Coloring a.) Assign unique color to each polygon based on the polygon id.

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

To Do. History of Computer Animation. These Lectures. 2D and 3D Animation. Computer Animation. Foundations of Computer Graphics (Spring 2010)

COLLISION DETECTION FOR VIRTUAL PROTOTYPING ENVIRONMENTS

CSE 167: Introduction to Computer Graphics Lecture #19: Wrapping Up. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Objects DO overlap. Objects DO NOT overlap. No calculations needed.

Math 126 Final Examination Autumn CHECK that your exam contains 9 problems on 10 pages.

Spatial Data Structures for Computer Graphics

Kinematics: Intro. Kinematics is study of motion

Spring 2010: Lecture 9. Ashutosh Saxena. Ashutosh Saxena

Without fully opening the exam, check that you have pages 1 through 11.

Geometric data structures:

Spatial Data Structures

Transcription:

Collision processing Different types of collisions Collision of a simulated deformable structure with a kinematic structure (easier) Collision with a rigid moving object, the ground, etc. Collision object can even be deforming as long as its deformation is kinematic (i.e. scripted), not simulated Self collision within a deformable structure (harder) Also includes collision between 2+ deformable structures CS838 Advanced Modeling and Simulation

Collision processing Different types of collisions Collision of a simulated deformable structure with a kinematic structure (easier) Collision with a rigid moving object, the ground, etc. Collision object can even be deforming as long as its deformation is kinematic (i.e. scripted), not simulated Self collision within a deformable structure (harder) Also includes collision between 2+ deformable structures CS838 Advanced Modeling and Simulation

Collision processing Typically partitioned into two tasks/phases Collision detection Detect if an interpenetration event occurred Localize such events, in space and time (If required) determine depth and direction of collision Collision response (or resolution) Attempt to resolve and fix all collisions, and/or Try to make collision less severe (but tolerate some), and/or Take steps to prevent collisions in the imminent future CS838 Advanced Modeling and Simulation

Collision processing Typically partitioned into two tasks/phases Collision detection Detect if an interpenetration event occurred Localize such events, in space and time (If required) determine depth and direction of collision The exact nature of collision detection depends on how we expect to use that information in the response stage! Collision response (or resolution) Attempt to resolve and fix all collisions, and/or Try to make collision less severe (but tolerate some), and/or Take steps to prevent collisions in the imminent future CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance to the collision target is small Increase strength of repulsion force as distance decreases (or as interpenetration starts to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance to the collision target is small Increase strength of repulsion force as distance decreases (or as interpenetration starts to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance to the collision target is small Increase strength of repulsion force as distance decreases (or as interpenetration starts to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance to the collision target is small Increase strength of repulsion force as distance decreases (or as interpenetration starts to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance to the collision target is small Increase strength of repulsion force as distance decreases (or as interpenetration starts to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance to the collision target is small Increase strength of repulsion force as distance decreases (or as interpenetration starts to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance to the collision target is small Increase strength of repulsion force as distance decreases (or as interpenetration starts to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance to the collision target is small Increase strength of repulsion force as distance decreases (or as interpenetration starts to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Penalty-based methods Detect proximity to collision objects and apply a repulsive penalty force when the distance Requirements to the collision for the detection stage: target Detection is small of static proximity (not just collision) Increase Estimation strength of of proximity repulsion or collision distance force as (such distance that forces decreases can be accordingly scaled) (or Estimation of collision direction as interpenetration starts (such that forces can be accordingly oriented) to occur) Does not strictly enforce a collision-free state, but attempts to prevent it, and lessen the degree of collision CS838 Advanced Modeling and Simulation

Collision response (general approaches) Impulse-based methods Usually attempt to guarantee that no collision is produced or left untreated, at any time Starting from a collision-free state at time t*, the system is advanced to time t*+dt Collisions that occurred in the interval [t*,t*+dt] are localized (in space and time) An impulse is applied to instantaneously correct the object trajectory and prevent (or fix) any collision events CS838 Advanced Modeling and Simulation

Collision response (general approaches) Impulse-based methods Usually attempt to guarantee that no collision is produced or left untreated, at any time Starting from a collision-free state at time t*, the system is advanced to time t*+dt Collisions that occurred in the interval [t*,t*+dt] are localized (in space and time) An impulse is applied to instantaneously correct the object trajectory and prevent (or fix) any collision events CS838 Advanced Modeling and Simulation

Collision response (general approaches) Impulse-based methods Usually attempt to guarantee that no collision is produced or left untreated, at any time Starting from a collision-free state at time t*, the system is advanced to time t*+dt Collisions that occurred in the interval [t*,t*+dt] are localized (in space and time) An impulse is applied to instantaneously correct the object trajectory and prevent (or fix) any collision events CS838 Advanced Modeling and Simulation

Collision response (general approaches) Impulse-based methods Can be structured to provide guarantees of noninterpenetration (makes other parts of the simulation simpler and easier) Capable of enforcing tight contact, instead of modeling a large, artificial thickness for the collision object Not guaranteed to succeed, especially with conflicting nonphysical constraints Relatively slow and expensive CS838 Advanced Modeling and Simulation

Collision response (general approaches) Impulse-based methods Can be structured to provide guarantees of noninterpenetration (makes other parts of the simulation simpler and easier) Capable of enforcing tight Requirements for the detection stage: contact, Detection instead of of modeling moving collisions a (not just static) large, artificial Estimation thickness of the exact for time/location of every the collision impact object event Not guaranteed to succeed, especially with conflicting nonphysical constraints Relatively slow and expensive CS838 Advanced Modeling and Simulation

Collision response (general approaches) Continuous time collisions Most physically justified technique : handle one collision event at a time, in the order they occur Can be structured to pursue full avoidance of collisions, while not requiring collision objects to be thickened Response can be formulated in terms of simple and intuitive penalty forces Disadvantage : May lead to very small time steps CS838 Advanced Modeling and Simulation

Collision response (general approaches) Continuous time collisions Most physically justified technique : handle one collision event at a time, in the order they occur Can be structured to pursue full avoidance of collisions, while not requiring collision objects to be thickened Response can be formulated in terms of simple and intuitive penalty forces Disadvantage : May lead to very small time steps CS838 Advanced Modeling and Simulation

Collision response (general approaches) Continuous time collisions Most physically justified technique : handle one collision event at a time, in the order they occur Can be structured to pursue full avoidance of collisions, while not requiring collision objects to be thickened Response can be formulated in terms of simple and intuitive penalty forces Disadvantage : May lead to very small time steps CS838 Advanced Modeling and Simulation

Collision response (general approaches) Continuous time collisions Most physically justified technique : handle one collision event at a time, in the order they occur Can be structured to pursue full avoidance of collisions, while not requiring collision objects to be thickened Response can be formulated in terms of simple and intuitive penalty forces Disadvantage : May lead to very small time steps CS838 Advanced Modeling and Simulation

Collision response (general approaches) Continuous time collisions Most physically justified technique : handle one collision event at a time, in the order they occur Can be structured to pursue full avoidance of collisions, while not requiring collision objects to be thickened Response can be formulated in terms of simple and intuitive penalty forces Disadvantage : May lead to very small time steps CS838 Advanced Modeling and Simulation

Collision detection (for kinematic objects) Simplest case: Collision object is rigid We can pre-process the object into a levelset Query : Is a point x* colliding with the object? Yes, if and only if Query : Is a point x* within a distance D of the object? Yes, if and only if Query : What is the direction of the collision (i.e. what is the shortest way out?) Given by the vector Query : What point on the surface of the object is closest to x*? Given as CS838 Advanced Modeling and Simulation

Represent a curve in 2D (or, a surface in 3D) as the zero isocontour of a (continuous) function, i.e. e.g. C = {(x.y) R 2 : φ(x, y) =0} circle x 2 + y 2 = R 2 {(x, y) :φ(x, y) =0} where φ(x, y) =x 2 + y 2 R 2 z =0 CS838 Advanced Modeling and Simulation

φ(x, y) < 0, if (x, y) isinsidec φ(x, y) > 0, if (x, y) is outside C φ(x, y) =0, if (x, y) is on C and φ(x, y) = distance of (x, y) from C 0.1 0.6 0.9 0.1 0.3 0.5 1.5 1.1 0.6 CS838 Advanced Modeling and Simulation

Collision detection (for kinematic objects) Simplest case: Collision object is rigid We can pre-process the object into a levelset Query : Is a point x* colliding with the object? Yes, if and only if Query : Is a point x* within a distance D of the object? Yes, if and only if Query : What is the direction of the collision (i.e. what is the shortest way out?) Given by the vector Query : What point on the surface of the object is closest to x*? Given as φ(x ) < 0 CS838 Advanced Modeling and Simulation

Collision detection (for kinematic objects) Simplest case: Collision object is rigid We can pre-process the object into a levelset Query : Is a point x* colliding with the object? Yes, if and only if Query : Is a point x* within a distance D of the object? Yes, if and only if Query : What is the direction of the collision (i.e. what is the shortest way out?) Given by the vector Query : What point on the surface of the object is closest to x*? Given as φ(x ) < 0 φ(x ) <D CS838 Advanced Modeling and Simulation

Collision detection (for kinematic objects) Simplest case: Collision object is rigid We can pre-process the object into a levelset Query : Is a point x* colliding with the object? Yes, if and only if Query : Is a point x* within a distance D of the object? Yes, if and only if Query : What is the direction of the collision (i.e. what is the shortest way out?) Given by the vector Query : What point on the surface of the object is closest to x*? Given as φ(x ) < 0 φ(x ) <D φ(x ) CS838 Advanced Modeling and Simulation

Collision detection (for kinematic objects) Simplest case: Collision object is rigid We can pre-process the object into a levelset Query : Is a point x* colliding with the object? Yes, if and only if Query : Is a point x* within a distance D of the object? Yes, if and only if Query : What is the direction of the collision (i.e. what is the shortest way out?) Given by the vector φ(x ) < 0 φ(x ) <D φ(x ) Query : What point on the surface of the object is closest to x*? Given as x surface = x φ(x ) φ(x ) CS838 Advanced Modeling and Simulation

Collision detection (for simulated objects) Cannot (easily and efficiently) convert into levelsets to facilitate O(1) collision queries Sometimes we seek collisions between open surfaces, which do not have an interior to describe as a levelset If simulation contains N primitives (particles, segments, triangles, etc) there is a potential for O(N^2) candidate intersection pairs Brute force check would require O(N^2) cost Every simulation step ideally requires O(N) effort (e.g. with Forward Euler, or BE with fixed CG iterations) Ideally the detection cost should not exceed O(N) by much Popular approach : Using axis-aligned bounding box (AABB) queries to accelerate collision detection CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

? CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

?? CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

?? CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

CS838 Advanced Modeling and Simulation

?? CS838 Advanced Modeling and Simulation

Collision detection (for simulated objects) Popular approach : Using axis-aligned bounding box (AABB) queries to accelerate collision detection Prunes away most of the faraway collisions Cost to check one primitive, against a box B-tree hierarchy with k leaves : O(logk) in the best case Cost will increase if the box hierarchy is not optimally constructed (i.e. if we chose to merge faraway boxes) Quality of hierarchy will degrade as object moves : May choose to re-build the hierarchy from scratch every few time steps KD-Tree or Quad-/Oct-trees can be used to generate box hierarchies CS838 Advanced Modeling and Simulation