Bounding Volume Hierarchies

Similar documents
Real-Time Collision Detection for Dynamic Virtual Environments

Collision Detection with Bounding Volume Hierarchies

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

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

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

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

Lesson 05. Mid Phase. Collision Detection

Intersection Acceleration

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

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

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

Collision and Proximity Queries

Collision Detection based on Spatial Partitioning

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

Dynamic Collision Detection

Spatial Data Structures

Spatial Data Structures

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

Comparing Sphere-Tree Generators and Hierarchy Updates for Deformable Objects Collision Detection

Efficient Collision Detection Using a Dual Bounding Volume Hierarchy

Acceleration Data Structures

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

Computer Graphics Ray Casting. Matthias Teschner

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Spatial Data Structures and Speed-Up Techniques. Ulf Assarsson Department of Computer Science and Engineering Chalmers University of Technology

Recall: Inside Triangle Test

Collision Detection for Deformable Objects

Hierarchy Accelerated Stochastic Collision Detection

Simulation (last lecture and this one)

Kinetic Bounding Volume Hierarchies for Deformable Objects

Deformable and Fracturing Objects

Spatial Data Structures

Exploiting Local Orientation Similarity for Efficient Ray Traversal of Hair and Fur

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

Adaptive Bounding Volume Hierarchies For Deformable Surface Models. Master of Science Thesis in Complex Adaptive Systems FADI BITAR

Collision Detection of Point Clouds

Motivation. Culling Don t draw what you can t see! What can t we see? Low-level Culling

CS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella

Spatial Data Structures

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Spatial Data Structures

Efficient Updates of Bounding Sphere Hierarchies for Geometrically Deformable Models

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

MCCD: Multi-Core Collision Detection between Deformable Models using Front-Based Decomposition

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

Ray Tracing Acceleration. CS 4620 Lecture 20

Spatial Data Structures and Acceleration Algorithms

Accelerated Raytracing

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

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

Kinetic BV Hierarchies and Collision Detection

The Construction of Balanced Bounding-Volume Hierarchies using Spatial Object Median Splitting Method for Collision Detection

Speeding up your game

Bounding Volume Hierarchies. CS 6965 Fall 2011

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

Ray Tracing Acceleration. CS 4620 Lecture 22

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

Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

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

Dynamic Bounding Volume Hierarchies. Erin Catto, Blizzard Entertainment

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

Acceleration Data Structures. Michael Doggett Department of Computer Science Lund university

Adaptive Continuous Collision Detection for Cloth Models Using a Skipping Frame Session *

Real-Time Collision Detection Between Cloth And Skinned Avatars. Using OBB

Hierarchical Techniques in Collision Detection for Cloth Animation

Collision Detection of Triangle Meshes using GPU

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

Acceleration Structures. CS 6965 Fall 2011

Kinetic Bounding Volume Hierarchies for Deformable Objects

Exact distance computation for deformable objects

Fast Computation of Tight Fitting Oriented Bounding Boxes

Optimized Continuous Collision Detection for Deformable Triangle Meshes

CS535 Fall Department of Computer Science Purdue University

Balanced Hierarchies for Collision Detection between Fracturing Objects

Efficient Collision Detection Using Bounding Volume Hierarchies of k-dops Λ

CS 4649/7649 Robot Intelligence: Planning

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

Collision Detection. Pu Jiantao.

Deformable Proximity Queries and their Application in Mobile Manipulation Planning

Virtual Reality in Assembly Simulation

Ray Intersection Acceleration

Geometric data structures:

INFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!

Lecture 4 - Real-time Ray Tracing

CMSC 425: Lecture 10 Geometric Data Structures for Games: Index Structures Tuesday, Feb 26, 2013

Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

improving raytracing speed

An Interruptible Algorithm for Collision Detection between Deformable Objects

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

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome!

Multi-Core Collision Detection between Deformable Models

Self-intersection Removal in Triangular Mesh Offsetting

B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes

Stackless BVH Collision Detection for Physical Simulation

Technical Section. Tribox bounds for three-dimensional objects

Improved Collision Detection in StarLogo Nova S.B., C.S. MIT, S.B., Math MIT, 2014

EDAN30 Photorealistic Computer Graphics. Seminar 2, Bounding Volume Hierarchy. Magnus Andersson, PhD student

Spatial Data Structures and Acceleration Algorithms

An iterative, octree-based algorithm for distance computation between polyhedra with complex surfaces 1

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Transcription:

Tutorial: Real-Time Collision Detection for Dynamic Virtual Environments Bounding Volume Hierarchies Stefan Kimmerle WSI/GRIS University of Tübingen Outline Introduction Bounding Volume Types Hierarchy Hierarchy Construction Hierarchy Update Hierarchy Traversal Comparison Rigid-Deformable Objects Examples and Conclusion

Introduction Problem of Collision Detection: Object representations in simulation environments do not consider impenetrability. Collision Detection: Detection of interpenetrating objects. The problem is encountered in computer-aided design and machining (CAD/CAM), robotics, automation, manufacturing, computer graphics, animation and computer simulated environments. Introduction

Introduction Definition of Bounding Volume Hierarchy (BVH): Each node of a tree is associated with a subset of primitives of the objects together with a bounding volume (BV) that encloses this subset with the smallest instance of some specified class of shape. Introduction Use these BVs as simplified surface representation for fast approximate collision detection test: Examples of BVs: Spheres Discrete oriented polytopes (k-dops) Axis-aligned bounding boxes (AABB) Object-oriented bounding boxes (OBB) Check bounding volumes to get the information whether bounded objects could interfere. Avoid checking all object primitives against each other. Assumption that collisions between objects are rare.

Outline Introduction Bounding Volume Types Hierarchy Hierarchy Construction Hierarchy Update Hierarchy Traversal Comparison Rigid-Deformable Objects Examples and Conclusion Bounding Volumes Spheres are represented by center and radius r. x r sphere x r 1 x r 2 r 1 r 2 Two spheres do not overlap if r r r r ( x x ) ( x x ) > ( r + r 1 2 1 2 2 1 2)

Bounding Volumes Sphere as bounding volume: sphere good choice bad choice Bounding Volumes Discrete oriented polytopes (k-dop) are a generalization of axis aligned bounding boxes (AABB) defined by k hyperplanes with normals in discrete directions ( n : {0, 1} ). k n k, j ± k-dop is defined by k/2 pairs of min, max values in k directions. y Two k-dops do not overlap, if the intervals in one direction do not overlap. min 1 max 1 min 2 x DOP max 2

Bounding Volumes Different k-dops: 6-DOP (AABB) 14-DOP 18-DOP 26-DOP DOP Bounding Volumes 14-DOP as bounding volume: optimal choice also good choice DOP

Bounding Volumes Object oriented bounding boxes (OBB) can be represented by the principal axes of a set of vertices. These axes have no discrete orientation. They move together with the object. The axes are given by the Eigenvectors of the covariance matrix: Centre of vertices x r i : Covariance matrix: r µ = 1 r n x i n i= 1 n 1 C jk = r n i= 1 x = r i x i µ x x ij ik j, k =1..3 OBB Bounding Volumes OBB overlap test: Α T Β p A T L A and B do not overlap if: p B L L : T L > p A + p B OBB Problem: Find direction of L

Bounding Volumes Principal axes of an object are not always a good choice for the main axes of an OBB! Inhomogeneous vertex distribution can cause bad OBBs. OBB Bounding Volumes Better approximation, higher build and update costs sphere AABB DOP OBB convex hull Smaller computational costs for overlap test

Outline Introduction Bounding Volume Types Hierarchy Hierarchy Construction Hierarchy Update Hierarchy Traversal Comparison Rigid-Deformable Objects Examples and Conclusion Bounding Volume Hierarchy To further accelerate collision detection: use hierarchy over bounding volumes nodes contain bounding volume information leaves additionally contain information on object primitives

Hierarchy Construction Parameters Bounding volume Type of tree (binary, 4-ary, k-d-tree, ) Bottom-up/top-down Heuristic to subdivide/group object primitives or bounding volumes How many primitives in each leaf of the BV tree Goals Balanced tree Tight-fitting bounding volumes Minimal redundancy (primitives in more than one BV per level) Hierarchy Construction Bottom-Up Start with object-representing primitives Fit a bounding volume to given number of primitives Group primitives and bounding volumes recursively Stop in case of a single bounding volume at a hierarchy level Top-Down Start with object Fit a bounding volume to the object Split object and bounding volume recursively according to heuristic Stop, if all bounding volumes in a level contain less than n primitives

Hierarchy Construction Top-Down Node-split: Split k-dop using heuristic: Try to minimize volume of children (Zachmann VRST02). Split along the longest side of the k-dop (Mezger et al. WSCG03). The splitting continues until n single elements remain per leaf. Hierarchy Construction Bottom-Up Node-grouping: Group nodes using heuristic: Try to get round-shaped patches by improving a shape factor for the area (Volino et al. CGF94). Group until all elements are grouped and the root node of the hierarchy is reached.

Hierarchy Update Updating is necessary in each time step due to movement/deformation of simulated object. Difference between rigid and deformable objects: For rigid objects: transformations can be applied to complete object. For deformable objects: all BVs need to be updates separately. Update is possible top-down or bottom-up. To avoid a complete update of all nodes in each step, different update strategies have been proposed. Hierarchy Update Some object transformations can be simply applied to all elements of the bounding-volume tree: Spheres Translation, rotation sphere Discrete Orientation Polytopes Translation, no rotation (discrete orientations of k hyperplanes for all objects) DOP Object-Oriented Bounding Boxes Translation, rotation (box orientations are not fixed) OBB

Hierarchy Update Larsson and Akenine-Möller (EG 2001): If many deep nodes are reached, bottom-up update is faster. For only some deep nodes reached, top-down update is faster. -> Update top half of hierarchy bottom-up -> only if non-updated nodes are reached update them topdown. Reduction of unnecessarily updated nodes! Leaf information of vertices/faces has to be stored also in internal nodes -> higher memory requirements. Hierarchy Update Mezger et al. (WSCG 2003): Inflate bounding volumes by a certain distance depending on velocity. Update is only necessary if enclosed objects moved farther than that distance. -> Fewer updates necessary. -> More false positive collisions of BVs. v

Hierarchy Traversal Binary trees: Object a 0 a Object b 1 2 b c 3 4 5 6 d e f g Collision test: Minimize probability of intersection as fast as possible: Test node with smaller volume against the children of the node with larger volume. 1a 5b 0a 2b 6d 2a 6b 2c 6e Hierarchy Traversal 4-ary Trees: Object a 0 a Object b 3 4 5 6 d e f g Collision test: 0a Higher order trees: Fewer nodes Total update costs are lower 3a 4a 5a 6a 6d 6e 6f 6g Recursion depth during overlap tests is lower, therefore lower memory requirements on stack

Outline Introduction Bounding Volume Types Hierarchy Hierarchy Construction Hierarchy Update Hierarchy Traversal Comparison Rigid-Deformable Objects Examples and Conclusion Comparison Collision Detection for Rigid and Deformable Objects Rigid Objects: use OBBs as they are usually tighter fitting and can be updated by applying translations and rotations. update complete BVH by applying transformations usually small number of collisions occur Deformable Object: use DOPs as update costs are lower than for OBBs update by refitting or rebuilding each BV separately (top-down, bottom-up) high number of collisions may occur Self-collisions need to be detected use higher oder trees (4-ary, 8- ary)

Outline Introduction Bounding Volume Types Hierarchy Hierarchy Construction Hierarchy Update Hierarchy Traversal Comparison Rigid-Deformable Objects Examples and Conclusion Example

Example Conclusions BVHs are well-suited for animations or interactive applications, since updating can be done very efficiently. BVHs can be used to detect self-collisions of deformable objects while applying additional heuristics to accelerate this process. BVHs work with triangles or tetrahedrons which allow for a more sophisticated collision response compared to a pure vertex-based response. Optimal BVH and BV dependent on application (collision or proximity detection) and type of objects (rigid / deformable object)

Thank you Thank you! Thanks to Matthias Teschner (University of Freiburg) and Johannes Mezger (University of Tübingen) for contributions to the slides!