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

Similar documents
Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

Lecture 30 of 41. Animation 3 of 3: Inverse Kinematics Control & Ragdoll Physics

Lecture 30 of 41. Animation 3 of 3: Inverse Kinematics Control & Ragdoll Physics

Lecture 21 of 41. Animation Basics Lab 4: Modeling & Rigging in Maya

Lecture 6 of 41. Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses

Lecture 6 of 41. Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses

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

Lecture 7 of 41. Viewing 4 of 4: Culling and Clipping Lab 1b: Flash Intro

Lecture 26 of 41. Picking Videos 5: More CGA

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

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

GEOMETRIC TOOLS FOR COMPUTER GRAPHICS

Geometric Transformations

Collision handling: detection and response

Animation. CS 4620 Lecture 33. Cornell CS4620 Fall Kavita Bala

Principles of Computer Game Design and Implementation. Revision Lecture

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

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

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

Collision and Proximity Queries

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

Spatial Data Structures

Lecture 16 of 41. Transparency, Painter s Algorithm, & Z-Buffer Lab 3a: Shading & Transparency

Simulation (last lecture and this one)

Lecture 31of 41. Ray Tracing, Part 1 of 2: Intersections, Ray Trees & Recursion

Lecture 31of 41. Ray Tracing, Part 1 of 2: Intersections, Ray Trees & Recursion

IMAGE-BASED RENDERING AND ANIMATION

Computer Animation II

MODELING AND HIERARCHY

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

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

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Acceleration Data Structures

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

Spatial Data Structures

Spatial Data Structures

Collision processing

Technical Game Development II. [using materials provided by Mark Claypool] IMGD 4000 (D 08) 1. What is game physics and why is it important?

Course Title: Computer Graphics Course no: CSC209

Quaternions and Rotations

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala)

Spatial Data Structures

Collision Detection based on Spatial Partitioning

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

CS535 Fall Department of Computer Science Purdue University

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

Intersection Acceleration

COMPUTER ANIMATION 3 KEYFRAME ANIMATION, RIGGING, SKINNING AND CHARACTER ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

2D/3D Geometric Transformations and Scene Graphs

Quaternions and Rotations

Lab 2A Finding Position and Interpolation with Quaternions

CSE 165: 3D User Interaction. Lecture #5: Selection

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

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

Kinematics and Orientations

Simulation in Computer Graphics. Deformable Objects. Matthias Teschner. Computer Science Department University of Freiburg

Game Mathematics. (12 Week Lesson Plan)

Ray Tracing Acceleration. CS 4620 Lecture 20

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

Quaternions and Rotations

Cloth Simulation. COMP 768 Presentation Zhen Wei

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

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

Topic 10: Scene Management, Particle Systems and Normal Mapping. CITS4242: Game Design and Multimedia

Quaternions and Rotations

CS770/870 Spring 2017 Animation Basics

CS770/870 Spring 2017 Animation Basics

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Advanced Computer Graphics Transformations. Matthias Teschner

Computer Graphics Ray Casting. Matthias Teschner

CS 532: 3D Computer Vision 14 th Set of Notes

12.1 Quaternions and Rotations

Spatial Data Structures

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

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

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Bounding Volume Hierarchies

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

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3

Virtual Environments

Cylinder Collision. Reddy Sambavaram 9/07/2007

Cloth Animation with Collision Detection

CSE 167: Introduction to Computer Graphics Lecture 11: Scene Graph 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Planning in Mobile Robotics

CS 475 / CS 675 Computer Graphics. Lecture 16 : Interpolation for Animation

Transformations Week 9, Lecture 18

G&V QUALIFIER SPRING 2010

T6: Position-Based Simulation Methods in Computer Graphics. Jan Bender Miles Macklin Matthias Müller

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

CS354 Computer Graphics Rotations and Quaternions

Lesson 05. Mid Phase. Collision Detection

3D Modeling: Solid Models

ROSE-HULMAN INSTITUTE OF TECHNOLOGY

Lecture 15 of 41. Scene Graphs: State Videos 1: CGA Shorts, Demos

Engineering Real- Time Applications with Wild Magic

Geometric and Solid Modeling. Problems

Motivation. Parametric Curves (later Surfaces) Outline. Tangents, Normals, Binormals. Arclength. Advanced Computer Graphics (Fall 2010)

Transcription:

Collision Handling Part 1 of 2: Separating Axes, Oriented Bounding Boxes William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public mirror web site: http://www.kddresearch.org/courses/cis636 Instructor home page: http://www.cis.ksu.edu/~bhsu Readings: Today: 2.4.3, 8.1, Eberly 2 e see http://bit.ly/ieuq45; GL handout Next class: Chapter 6, esp. 6.1, Eberly 2 e Wikipedia, Collision Detection: http://bit.ly/14rfzg 2 Lecture Outline Reading for Last Class: Chapter 10, 13, 17.3 17.5, Eberly 2 e Reading for Today: 2.4.3, 8.1, Eberly 2 e, GL handout Reading for Next Class: Chapter 6, Esp. 6.1, Eberly 2 e Last Time: Quaternions Concluded How quaternions work properties, matrix equivalence, arithmetic Composing rotations by quaternion multiplication Incremental rotation and error issues Videos 4: Modeling & Simulation, Visualization; VR/VE/VA/AR Virtual reality, environments, artifacts (VR/VE/VA); augmented reality Relationship among visualization, simulation, & animation Today: Collision Detection Part 1 of 2 Test-intersection queries vs. find-intersection queries Static: stationary objects (both not moving) Dynamic: moving objects (one or both) Distance vs. intersection methods

3 Where We Are 4 Acknowledgements: Quaternions, Collision Handling Rick Parent Professor Department of Computer Science and Engineering Ohio State University http://www.cse.ohio-state.edu/~parent/ David C. Brogan Visiting Assistant Professor, Computer Science Department, University of Virginia http://www.cs.virginia.edu/~dbrogan/ Susquehanna International Group (SIG) http://www.sig.com Steve Rotenberg Visiting Lecturer Graphics Lab University of California San Diego CEO/Chief Scientist, PixelActive http://graphics.ucsd.edu

5 Review [1]: Fixed Angles & Euler Angles Rotation about x axis (Roll) x Rotation about y axis (Pitch) 2006 Wikipedia, Flight Dynamics http://bit.ly/gvaqcx y z Rotation about z axis (Yaw) Adapted from slides 2007 2011 R. Parent, Ohio State University CSE 682 (Computer Animation), http://bit.ly/feuesy CSE 683/684A (Computer Animation Algorithms & Techniques), http://bit.ly/f8myky 6 Review [2]: Axis-Angle to Quaternion Conversion Adapted from slides 2000 2004 D. Brogan, University of Virginia CS 445/645,, http://bit.ly/h9ahrg

7 Review [3]: Quaternion to RM Conversion Adapted from slides 2000 2004 D. Brogan, University of Virginia CS 445/645,, http://bit.ly/h9ahrg 8 Review [4]: Advantage Interpolation Hint: see http://youtu.be/-jbkkv2v8eu Adapted from slides 2000 2004 D. Brogan, University of Virginia CS 445/645,, http://bit.ly/h9ahrg

9 Interpolating Quaternions [1]: Lerp 10 Interpolating Quaternions [2]: Slerp

11 Interpolating Quaternions [3]: Slerp Optimization 12 Review [5]: Dynamics & Kinematics Dynamics: Study of Motion & Changes in Motion Forward: model forces over time to find state, e.g., Given: initial position p 0, velocity v 0, gravitational constants Calculate: position p t at time t Inverse: given state and constraints, calculate forces, e.g., Given: desired position p t at time t, gravitational constants Calculate: position p 0, velocity v 0 needed Wikipedia: http://bit.ly/hh43dx (see also: Analytical dynamics ) For non-particle objects: rigid-body dynamics ( http://bit.ly/dlvejg) Kinematics: Study of Motion without Regard to Causative Forces Modeling systems e.g., articulated figure Forward: from angles to position (http://bit.ly/eh2d1c) Inverse: finding angles given desired position ( http://bit.ly/hsytb0) Wikipedia: http://bit.ly/hr8r2u Forward Kinematics 2009 Wikipedia

13 Review [6]: Visualization & Simulation Deepwater Horizon Oil Spill (20 Apr 2010) http://bit.ly/9qhax4 120-day images 2010 NOAA, http://1.usa.gov/c02xuq 120-day simulation using 06 Apr 1996 weather conditions 120-day simulation using 17 Apr 1997 weather conditions 120-day simulation using 15 Apr 1993 weather conditions 132-day simulation using 2010 conditions 2010 National Center for Supercomputing Applications (NCSA) http://youtu.be/pe-1g_476na Wilhelmson et al. (2004) http://youtu.be/egumu0ns1yi http://avl.ncsa.illinois.edu http://bit.ly/ea8pxn 14 Review [7]: Virtual Reality (VR) Virtual Reality: Computer-Simulated Environments Physical Presence: Real & Imaginary Hardware: User Interface Head-mounted display (HMD), gloves see PopOptics goggles (left) VR glasses, wand, etc. see NCSA CAVE (right) Virtual Reality, Wikipedia: http://bit.ly/favnep Image 2007 National Air & Space Museum CAVE (Cave Automatic Virtual Environment) Image 2009 D. Pape HowStuffWorks article: http://bit.ly/feqxnk 2009 J. Strickland Wikipedia: http://bit.ly/dknenu

15 Review [8]: Virtual Environments (VE) Virtual Environment: Part of Virtual Reality Experience Other Parts Virtual artifacts (VA): simulated objects http://bit.ly/hsksyx Intelligent agents, artificial & real http://bit.ly/y2gqk Experientia 2006 M. Vanderbeeken et al., http://bit.ly/hzfaqx Second Life 2003 2011 Linden Labs, Inc., http://bit.ly/wbvol Image 2006 Philips Design We Are Arcade 2011 D. Grossett et al., http://bit.ly/ftalju World of Warcraft: Cataclysm review 2011 J. Greer, http://bit.ly/eenhxt World of Warcraft 2001 2011 Blizzard Entertainment, Inc., http://bit.ly/2qvpyf 16 Review [9]: Augmented Reality (AR) Augmented Reality: Computer-Generated (CG) Sensory Overlay Added to Physical, Real-World Environment Wikipedia, Google Goggles: http://bit.ly/grrmls 40 Best Augmented Reality iphone Applications, 2010 iphoneness.com, http://bit.ly/2qt35y MyNav 2010 Winfield & Co. http://bit.ly/dltir7 Bing Maps 2010 2011 Microsoft Corporation http://bit.ly/a9uvit 2010 TED Talks

17 Acknowledgements: Intersections, Containment Eberly 1 e David H. Eberly Chief Technology Officer Geometric Tools, LLC http://www.geometrictools.com http://bit.ly/enkbfs Today s material: View Frustum clipping 2.4.3, p. 70 77, 2 e 3.4.3, p. 93 99, & 3.7.2, p. 133 136, 1 e Collision detection: separating axes 8.1, p. 393 443, 2 e 6.4. p. 203 214, 1 e Later: Distance methods Chapter 14, p. 639 679, 2 e 2.6, p. 38 77, 1 e Intersection methods Chapter 15, p. 681 717, 2 e 6.2 6.5, p. 188 243, 1 e 3D Game Engine Design 2000 D. H. Eberly See http://bit.ly/ieuq45 for second edition table of contents (TOC) 18 View Frustum Clipping: Triangle Splitting 3D Game Engine Design 2000 D. H. Eberly See http://bit.ly/ieuq45 for second edition table of contents (TOC)

19 Collision Handling: Detection vs. Response 20 Collision Detection [1]: Technical Problem Defined

21 Collision Detection [2]: Intersections Testing vs. Finding 22 Collision Detection [3]: Queries Test- vs. Find-Intersection Test-Intersection: Determine If Objects Intersect Static: test whether they do at given instant Dynamic: test whether they intersect at any point along trajectories Find-Intersection: Determine Intersection (or Contact) Set of Objects Static: intersection set (compare: A B) Dynamic: contact time (interval of overlap), sets (depends on time) Adapted from 3D Game Engine Design 2000 D. H. Eberly See http://bit.ly/ieuq45 for second edition table of contents (TOC)

23 Collision Detection [3]: Queries Distance vs. Intersection Distance-Based Parametric representation of object boundaries/interiors Want: closest points on two objects (to see whether they intersect) Use: constrained minimization to solve for closest points Intersection-Based Also uses parametric representation Want: overlapping subset of interior of two objects General approach: equate objects, solve for parameters Use one of two kinds of solution methods Analytical (when feasible to solve exactly e.g., OBBs) Numerical (approximate region of overlap) Solving for parameters in equation Harder to compute than distance-based; use only when needed Adapted from 3D Game Engine Design 2000 D. H. Eberly See http://bit.ly/ieuq45 for second edition table of contents (TOC) 24 Collision Detection [4]: Primitives

25 Collision Detection [5]: Particle Collisions 26 Collision Detection [6]: Code Basic Components

27 Collision Detection [7]: Code Primitives 28 Collision Detection [8]: Segment vs. Triangle Query

29 Collision Detection [9]: Segment vs. Triangle Solution 30 Collision Detection [10]: Segment vs. Triangle Point Test

31 Collision Detection [11]: Faster Triangle Point Containment 32 Collision Detection [12]: Segmentvs. Mesh

33 Collision Detection [13]: Segment vs. Moving Mesh 34 Collision Detection [14]: Trianglevs. Triangle Query

35 Collision Detection [15]: Trianglevs. Triangle Plane Equations 36 Collision Detection [16]: Trianglevs. Triangle Distances

37 Collision Detection [17]: Trianglevs. Triangle Intersection 38 Collision Detection [18]: Meshvs. Mesh Kinds of Collisions

39 Collision Detection [19]: Moving Mesh vs. Moving Mesh 40 Collision Detection [20]: Moving Meshes: Extrusion

41 Collision Detection [21]: Intersection Issues 42 Static Intersection [1]: Sphere-Swept Volumes Sphere Locus of points in 3-D equidistant from center point Rotational sweep of circle (hollow sphere) or disc (solid ball) Null sweep of sphere (invariant under rotation, translation by 0) Capsule: Translational Sweep of Sphere Along Line Segment Lozenge: Sweep of Sphere Across Rectangle Wikipedia: Sphere http://bit.ly/9owjqi Image 2008 ClipArtOf.com http://bit.ly/ekhe2f Capsule Image 2007 Remotion Wiki http://bit.ly/hueznw Lozenge Image 2011 Jasmin Studio Crafts http://bit.ly/eueopw Adapted from 3D Game Engine Design 2000 D. H. Eberly See http://bit.ly/ieuq45 for second edition table of contents (TOC)

43 Static Intersection [2]: Distance Calculators 3D Game Engine Design 2000 D. H. Eberly See http://bit.ly/ieuq45 for second edition table of contents (TOC) 44 Dynamic Intersection [1]: One Moving Object 3D Game Engine Design 2000 D. H. Eberly See http://bit.ly/ieuq45 for second edition table of contents (TOC)

45 Dynamic Intersection [2]: Two Moving Objects Separating Axes 3D Game Engine Design 2000 D. H. Eberly See http://bit.ly/ieuq45 for second edition table of contents (TOC) 46 Preview: Collision Response & Optimization What Happens After Collision Is Detected? Contact & application of force vs. impact & impulse Compression: deformation of solid Restitution: springing back of solid Friction? Secondary collisions due to changes in trajectories Bouncing? Optimization Spatial partitioning: bounding volume hierarchies (BVHs) revisited Binary space partitioning (BSP) trees k-d trees Quadtrees & octrees Volume graphics: uniform grids and data parallelism

47 Summary Reading for Last Class: Chapter 10, 13, 17.3 17.5, Eberly 2 e Reading for Today: 2.4.3, 8.1, Eberly 2 e, GL handout Reading for Next Class: Chapter 6, Esp. 6.1, Eberly 2 e Last Time: Quaternions Concluded How quaternions work properties, matrix equivalence, arithmetic Composing rotations by quaternion multiplication Incremental rotation and error issues Review: Virtual Reality & Virtual Environments; Augmented Reality Today: Collision Detection Part 1 of 2 Static: stationary objects (both not moving) Dynamic: moving objects (one or both) Test-intersection queries vs. find-intersection queries Distance vs. intersection methods 48 Terminology Visualization Communicating with Images, Diagrams, Animations VR, VE, VA, AR Virtual Reality: computer-simulated environments, objects Virtual Environment: part of VR dealing with surroundings Virtual Artifacts: part of VR dealing with simulated objects Augmented Reality: CG sensory overlay on real-world images Collision Detection Static: stationary objects (both not moving) Dynamic: moving objects (one or both) Queries Test-intersection: determine whether objects do/will intersect Find-intersection: calculate intersection set or contact set, time Parametric methods: use parameters to describe objects Distance-based: constrained minimization (closest points) Intersection-based: solving for parameters in equation