Rasterization Pipeline Geometric Modeling Lighting & Materials

Total Page:16

File Type:pdf, Size:1020Kb

Rasterization Pipeline Geometric Modeling Lighting & Materials Course Roadmap Rasterization Pipeline Rasterization Core Concepts Transforms & Projection • Sampling Texture Mapping • Antialiasing Visibility, Shading, Overall Pipeline • Transforms Geometric Modeling Intro to Geometry Curves and Surfaces Core Concepts Meshes and Geometry Processing • Splines, Bezier Curves • Topological Mesh Representations Today: Ray-Tracing & Acceleration • Subdivision, Geometry Processing Lighting & Materials Cameras & Imaging CS184/284A Ren Ng Lecture 10: Intro to Ray-Tracing & Accelerating Ray-Scene Intersection Computer Graphics and Imaging UC Berkeley CS184/284A Basic Ray-Tracing Algorithm Ray Casting Appel 1968 - Ray casting 1. Generate an image by casting one ray per pixel 2. Check for shadows by sending a ray to the light CS184/284A Ren Ng Ray Casting - Generating Eye Rays Pinhole Camera Model eye ray closest scene (starts at eye and intersection point goes through pixel) note: more intersection points eye point image plane light source CS184/284A Ren Ng Ray Casting - Shading Pixels (Local Only) Pinhole Camera Model eye ray (starts at eye and goes through pixel) eye point image plane perform shading calculation here to compute color of pixel light source (e.g. Blinn Phong model) CS184/284A Ren Ng Discussion: Ray Casting vs Rasterization Remember: • Rasterization: 4x4 perspective matrix, project triangles to 2D screen, rasterize pixels • Ray Casting: shoot rays through pixels into scene, intersect with triangles Discussion topics: • Will they make the same picture? • Which algorithm is faster, when? • Other pros/cons? When would you use each algorithm, and why? CS184/284A Ren Ng Recursive Ray Tracing “An improved Illumination model for shaded display” T. Whitted, CACM 1980 Time: • VAX 11/780 (1979) 74m • PC (2006) 6s • GPU (2012) 1/30s Spheres and Checkerboard, T. Whitted, 1979 CS184/284A Ren Ng Recursive Ray Tracing eye point image plane light source CS184/284A Ren Ng Recursive Ray Tracing Mirror ray (specular reflection) eye point image plane light source CS184/284A Ren Ng Recursive Ray Tracing Refractive rays (specular transmission) eye point image plane light source CS184/284A Ren Ng Recursive Ray Tracing eye point image plane Shadow rays light source CS184/284A Ren Ng Recursive Ray Tracing secondary rays primary ray eye point image plane shadow rays light source • Trace secondary rays recursively until hit a non-specular surface (or max desired levels of recursion) • At each hit point, trace shadow rays to test light visibility (no contribution if blocked) • Final pixel color is weighted sum of contributions along rays, as shown • Gives more sophisticated effects (e.g. specular reflection, refraction, shadows), but we will go much further to derive a physically-based illumination model CS184/284A Ren Ng Recursive Ray Tracing CS184/284A Ren Ng Ray-Surface Intersection Ray Intersection With Triangle Mesh Why? • Rendering: visibility, shadows, lighting … • Geometry: inside/outside test How to compute? Let’s break this down: • Simple idea: just intersect ray with each triangle • Simple, but slow (accelerate next time) • Note: can have 0, 1 or multiple intersections CS184/284A Ren Ng Ray Equation Ray is defined by its origin and a direction vector Example: Ray equation: 0 t< 1 point along ray “time” origin unit direction CS184/284A Ren Ng Plane Equation Plane is defined by normal vector and a point on plane Example: r(t)=o + t d, 0 t< 1 p :(p p0) N =0 r(t)=o + t d, 0 t< − · 1 Plane Equation:ax +r(tby)=+o +czt d,+0 d pt<=0:(p p0) N =0 1− · p :(p p0) N =0 ax + by + cz + d =0 − · Set p = r(t) and solve for t ax + by + cz + d =0 Set p = r(t) and solve for t all points on plane any pointSet(normalpp= vectorr(tp)0 and) N solve=( for(pot +p0)t dN =(po +0)t dNp=00) N =0 − · − · − · − · CS184/284A (p p0) N =(o + t d p0) N =0 Ren Ngp0 o) N − · − · p0 o)t =N − · p0 o) N d N t = − · t = − · · d N d N · · Ray Intersection With Plane Ray equation: r(t)=o + t d, 0 t< 1 p :(p p0) N =0 −Plane· equation:r(t)=o + t d, 0 t< r(t)=o + t d, 0 t< ax + by + cz + d =0 1 r(t)=p :(op+ t dp,)0 N t<=0 1 0 1 p :(p p0) N =0 p :(p p0) NSet=0p =−r(t) and· solve for t − · ax + by + cz + d =0 − · ax + by +(pczSolve+p0d) =0 Nfor=( intersectiono + t d p0) N =0 − · Set p−= r(t·) and solveax for t+ by + cz + d =0 Set p =pr0 (t)o and) N solve for t t(p= p−0) N· =(o + t d p0) N =0 Set p = r(t) and solve for t (p p−0) Nd ·=(N o + t d p−0) N·=0 · p0 o) N − · t = −− · · (p0 o) N d N (p p0) N =(o + t d p0) N =0 t = − · r(t)=oCheck:+ t d, 0 t< d N · 1 − · − · p :(p· p0) N =0 p0 o) N CS184/284A − · Ren Ng t = − · ax + by + cz + d =0 d N Set p = r(t) and solve for t · (p p0) N =(o + t d p0) N =0 − · − · p0 o) N t = − · d N · Ray Intersection With Triangle Triangle is in a plane • Ray-plane intersection • Test if hit point is inside triangle (Assignment 1!) Many ways to optimize… CS184/284A Ren Ng Can Optimize: e.g. Möller Trumbore Algorithm CS184/284A Ren Ng p :(p c)2 R2 =0 − − (o + t d c)2 R2 =0 Ray Intersection With Sphere − − 2 Ray: r(t)=o + t d, 0 t< at + bt+ c =0, where 1 2 2 pp:(:(pp cc))2 RR2 =0=0 p :(p p0) N =0 2 2 a = d d− − Sphere:−p :(·p pc:()2p Rc2)=0R =0 p :(·−p c−)2 R2 =0 ax + by +pcz:(+p d−=0c)2 −−R2 =0− b = 2(o −c) d − − − − · 2 2 Set p = r(t) and solve for t ((oo++ttdd cc))2 RR2 =0=02 Solve for intersection:2 2 c =(o c−) (o − c) R (o + t d(o +c)t2d Rc2)=0R =0 (o +−−t d· c−)−2 R−2 =0 (p (po0)+ tNd=(−co)2+−t−Rd2 =0p−0) N =0 − − − · − · 2 − − at2 + bt+ c =0, where p0 o) N at +bbt+pbc2=04,acwhere t = 2 − · 2 at2 + btat+ +c =0dbt+N, wherec =0, where t a==at−d ±+dbt+−c =0, where at2 + bt+ c =0· , where a = d ·d 2a a = d ad= d d b =a 2(=·od dc) d a = d ·d · b = 2(o −·c) ·d b = 2(·ob =c 2() od c) d b = 2(−o ·c) d 2 − · cc=(=(oo cc)) ((oo cc)) RR2 b = 2(o −c) ·d 2 − −· ·− − c =(o c−=(c) o·(o c)c)(o R2c) R c =(−o ·c) −(o −c) R2 c =(o −c) ·(o−−c)· −R−2 − − · − − 2 − · − − b pb2 4ac CS184/284A t = −b ±pb −4Renac Ng 2b pb2 4ac t = − ± −2 b pb 4ac b 22aapb 4ac t = −b t±=pb−2 −±4ac − t = − ± − t = − ± 2a − 2a 2a 2a Ray Intersection With Implicit Surface Ray: r(t)=o + t d, 0 t< 1 p :(p p0) N =0 p : f(p)=0 − · p : f(p)=0 ax + byGeneral+ cz + d implicit=0 surface: Set p = r(t) and solve forf(ot+ t d)=0 Substitute ray equation: f(o + t d)=0 (p p0) N =(o + t d p0) N =0 Solve− ·for real, positive− roots· p0 o) N t = − · d N · CS184/284A Ren Ng Accelerating Ray-Surface Intersection Ray Tracing – Performance Challenges Simple ray-scene intersection • Exhaustively test ray-intersection with every object Problem: • Exhaustive algorithm = #pixels ⨉ #objects • Very slow! CS184/284A Ren Ng Ray Tracing – Performance Challenges Jun Yan, Tracy Renderer San Miguel Scene, 10.7M triangles Ray Tracing – Performance Challenges Deussen et al; Pharr & Humphreys, PBRT Plant Ecosystem, 20M triangles Pre-Class Discussion: Accelerating Ray-Scene Intersection ~1 million pixels, ~20 million triangles Deussen et al; Pharr & Humphreys, PBRT In pairs, brainstorm accelerations, small or big ideas. Write down 3-4 ideas. Pre-Class Discussion: Accelerating Ray-Scene Intersection Brainstorm 3 or 4 accelerations, small or big ideas. • Subdivide the world • If recursive, truncate the perhaps using an octtree number of recursions, and estimate the tail of • Raycasting for a group computation of pixels at a time • Parallelize raycasting • Something like • Do every second ray, and mipmapping, LOD -- interpolate further away, simpler • Sort triangles from front to geometry back • Bounding box • Ray-marching until in proximity CS184/284A Ren Ng Bounding Volumes Bounding Volumes Quick way to avoid intersections: bound complex object with a simple volume • Object is fully contained in the volume • If it doesn’t hit the volume, it doesn’t hit the object • So test bvol first, then test object if it hits CS184/284A Ren Ng Ray-Intersection With Box Could intersect with 6 faces individually Better way: box is the intersection of 3 slabs CS184/284A Ren Ng Ray Intersection with Axis-Aligned Box 2D example; 3D is the same! Compute intersections with slabs and take intersection of tmin/tmax intervals tmax x0 x1 y0 y1 x0 x1 y0 y1 x x y y − − − − − − tmax0 − 1 − 0 − 1 tmax tmin tmin o, d o, d o, d o, d o, d o, d tmin x0 x1 y0 y1 x x y y x x y y − − − 0 − 1 − 0 − 1 0 − 1 − 0 − 1 Note: tmin < 0 x0 x1 x0y0 x1y1 y0 y1 x0 x1 x0y0 x1y1 y0 y1 x0 x1 x y0 x y1 y y − − − − − − − − − − − − − −0 − −1 − 0 − 1 Intersections with x planes Intersections with y planes Final intersection result How do we know when the ray misses the box? r(t)=o + t d, 0 t< 1 p :(p p0) N =0 Optimize Ray-Plane Intersection− For· Axis-Aligned Planes? ax + by + cz + d =0 Set p = r(t) and solve for t (p p0) N =(o + t d p0) N =0 − · − · r(t)=o + t d,(p00 t<o) N t = − 1· p :(p p0) N =0 General − · d N ax + by + cz + d =0 · Set p =3 subtractions,r(t) and solve 6 multiplies, for t 1 division (p r(tp)=0) oN+=(t d,o0+ tt<d p0) N =0 − · −1 · p0 o) N p :(p p0) N =0 t = − · − · d N Perpendicular (p0ax +oby) +Ncz + d =0 · p0x ox t = − · Set p ==r(t) andt solve= for t − to x-axis d N ) dx · (p p0) N =(o + t d p0) N =0 − · − · p0 o) N1 subtraction, 1 division t = − · d N · CS184/284A Ren Ng Uniform Spatial Partitions (Grids) Preprocess – Build Acceleration Grid 1.
Recommended publications
  • Fast Oriented Bounding Box Optimization on the Rotation Group SO(3, R)
    Fast oriented bounding box optimization on the rotation group SO(3; R) CHIA-TCHE CHANG1, BASTIEN GORISSEN2;3 and SAMUEL MELCHIOR1;2 1Universite´ catholique de Louvain, Department of Mathematical Engineering (INMA) 2Universite´ catholique de Louvain, Applied Mechanics Division (MEMA) 3Cenaero An exact algorithm to compute an optimal 3D oriented bounding box was published in 1985 by Joseph O’Rourke, but it is slow and extremely hard C b to implement. In this article we propose a new approach, where the com- Xb putation of the minimal-volume OBB is formulated as an unconstrained b b optimization problem on the rotation group SO(3; R). It is solved using a hybrid method combining the genetic and Nelder-Mead algorithms. This b b method is analyzed and then compared to the current state-of-the-art tech- b b X b niques. It is shown to be either faster or more reliable for any accuracy. Categories and Subject Descriptors: I.3.5 [Computer Graphics]: Compu- b b b tational Geometry and Object Modeling—Geometric algorithms; Object b b representations; G.1.6 [Numerical Analysis]: Optimization—Global op- eξ b timization; Unconstrained optimization b b b b General Terms: Algorithms, Performance, Experimentation b Additional Key Words and Phrases: Computational geometry, optimization, b ex b manifolds, bounding box b b ∆ξ ∆η 1. INTRODUCTION This article deals with the problem of finding the minimum-volume oriented bounding box (OBB) of a given finite set of N points, 3 denoted by R . The problem consists in finding the cuboid, Fig. 1. Illustration of some of the notation used throughout the article.
    [Show full text]
  • Parallel Construction of Bounding Volumes
    SIGRAD 2010 Parallel Construction of Bounding Volumes Mattias Karlsson, Olov Winberg and Thomas Larsson Mälardalen University, Sweden Abstract This paper presents techniques for speeding up commonly used algorithms for bounding volume construction using Intel’s SIMD SSE instructions. A case study is presented, which shows that speed-ups between 7–9 can be reached in the computation of k-DOPs. For the computation of tight fitting spheres, a speed-up factor of approximately 4 is obtained. In addition, it is shown how multi-core CPUs can be used to speed up the algorithms further. Categories and Subject Descriptors (according to ACM CCS): I.3.6 [Computer Graphics]: Methodology and techniques—Graphics data structures and data types 1. Introduction pute [MKE03, LAM06]. As Sections 2–4 show, the SIMD vectorization of the algorithms leads to generous speed-ups, A bounding volume (BV) is a shape that encloses a set of ge- despite that the SSE registers are only four floats wide. In ometric primitives. Usually, simple convex shapes are used addition, the algorithms can be parallelized further by ex- as BVs, such as spheres and boxes. Ideally, the computa- ploiting multi-core processors, as shown in Section 5. tion of the BV dimensions results in a minimum volume (or area) shape. The purpose of the BV is to provide a simple approximation of a more complicated shape, which can be 2. Fast SIMD computation of k-DOPs used to speed up geometric queries. In computer graphics, A k-DOP is a convex polytope enclosing another object such ∗ BVs are used extensively to accelerate, e.g., view frustum as a complex polygon mesh [KHM 98].
    [Show full text]
  • Bounding Volume Hierarchies
    Simulation in Computer Graphics Bounding Volume Hierarchies Matthias Teschner Outline Introduction Bounding volumes BV Hierarchies of bounding volumes BVH Generation and update of BVs Design issues of BVHs Performance University of Freiburg – Computer Science Department – 2 Motivation Detection of interpenetrating objects Object representations in simulation environments do not consider impenetrability Aspects Polygonal, non-polygonal surface Convex, non-convex Rigid, deformable Collision information University of Freiburg – Computer Science Department – 3 Example Collision detection is an essential part of physically realistic dynamic simulations In each time step Detect collisions Resolve collisions [UNC, Univ of Iowa] Compute dynamics University of Freiburg – Computer Science Department – 4 Outline Introduction Bounding volumes BV Hierarchies of bounding volumes BVH Generation and update of BVs Design issues of BVHs Performance University of Freiburg – Computer Science Department – 5 Motivation Collision detection for polygonal models is in Simple bounding volumes – encapsulating geometrically complex objects – can accelerate the detection of collisions No overlapping bounding volumes Overlapping bounding volumes → No collision → Objects could interfere University of Freiburg – Computer Science Department – 6 Examples and Characteristics Discrete- Axis-aligned Oriented Sphere orientation bounding box bounding box polytope Desired characteristics Efficient intersection test, memory efficient Efficient generation
    [Show full text]
  • Graphics Pipeline and Rasterization
    Graphics Pipeline & Rasterization Image removed due to copyright restrictions. MIT EECS 6.837 – Matusik 1 How Do We Render Interactively? • Use graphics hardware, via OpenGL or DirectX – OpenGL is multi-platform, DirectX is MS only OpenGL rendering Our ray tracer © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 2 How Do We Render Interactively? • Use graphics hardware, via OpenGL or DirectX – OpenGL is multi-platform, DirectX is MS only OpenGL rendering Our ray tracer © Khronos Group. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. • Most global effects available in ray tracing will be sacrificed for speed, but some can be approximated 3 Ray Casting vs. GPUs for Triangles Ray Casting For each pixel (ray) For each triangle Does ray hit triangle? Keep closest hit Scene primitives Pixel raster 4 Ray Casting vs. GPUs for Triangles Ray Casting GPU For each pixel (ray) For each triangle For each triangle For each pixel Does ray hit triangle? Does triangle cover pixel? Keep closest hit Keep closest hit Scene primitives Pixel raster Scene primitives Pixel raster 5 Ray Casting vs. GPUs for Triangles Ray Casting GPU For each pixel (ray) For each triangle For each triangle For each pixel Does ray hit triangle? Does triangle cover pixel? Keep closest hit Keep closest hit Scene primitives It’s just a different orderPixel raster of the loops!
    [Show full text]
  • Efficient Collision Detection Using Bounding Volume Hierarchies of K
    Efficient Collision Detection Using Bounding Volume £ Hierarchies of k -DOPs Þ Ü ß James T. Klosowski Ý Martin Held Joseph S.B. Mitchell Henry Sowizral Karel Zikan k Abstract – Collision detection is of paramount importance for many applications in computer graphics and visual- ization. Typically, the input to a collision detection algorithm is a large number of geometric objects comprising an environment, together with a set of objects moving within the environment. In addition to determining accurately the contacts that occur between pairs of objects, one needs also to do so at real-time rates. Applications such as haptic force-feedback can require over 1000 collision queries per second. In this paper, we develop and analyze a method, based on bounding-volume hierarchies, for efficient collision detection for objects moving within highly complex environments. Our choice of bounding volume is to use a “discrete orientation polytope” (“k -dop”), a convex polytope whose facets are determined by halfspaces whose outward normals come from a small fixed set of k orientations. We compare a variety of methods for constructing hierarchies (“BV- k trees”) of bounding k -dops. Further, we propose algorithms for maintaining an effective BV-tree of -dops for moving objects, as they rotate, and for performing fast collision detection using BV-trees of the moving objects and of the environment. Our algorithms have been implemented and tested. We provide experimental evidence showing that our approach yields substantially faster collision detection than previous methods. Index Terms – Collision detection, intersection searching, bounding volume hierarchies, discrete orientation poly- topes, bounding boxes, virtual reality, virtual environments.
    [Show full text]
  • Parallel Reinsertion for Bounding Volume Hierarchy Optimization
    EUROGRAPHICS 2018 / D. Gutierrez and A. Sheffer Volume 37 (2018), Number 2 (Guest Editors) Parallel Reinsertion for Bounding Volume Hierarchy Optimization D. Meister and J. Bittner Czech Technical University in Prague, Faculty of Electrical Engineering Figure 1: An illustration of our parallel insertion-based BVH optimization. For each node (the input node), we search for the best position leading to the highest reduction of the SAH cost for reinsertion (the output node) in parallel. The input and output nodes together with the corresponding path are highlighted with the same color. Notice that some nodes might be shared by multiple paths. We move the nodes to the new positions in parallel while taking care of potential conflicts of these operations. Abstract We present a novel highly parallel method for optimizing bounding volume hierarchies (BVH) targeting contemporary GPU architectures. The core of our method is based on the insertion-based BVH optimization that is known to achieve excellent results in terms of the SAH cost. The original algorithm is, however, inherently sequential: no efficient parallel version of the method exists, which limits its practical utility. We reformulate the algorithm while exploiting the observation that there is no need to remove the nodes from the BVH prior to finding their optimized positions in the tree. We can search for the optimized positions for all nodes in parallel while simultaneously tracking the corresponding SAH cost reduction. We update in parallel all nodes for which better position was found while efficiently handling potential conflicts during these updates. We implemented our algorithm in CUDA and evaluated the resulting BVH in the context of the GPU ray tracing.
    [Show full text]
  • Hierarchical Bounding Volumes Grids Octrees BSP Trees Hierarchical
    Spatial Data Structures HHiieerraarrcchhiiccaall BBoouunnddiinngg VVoolluummeess GGrriiddss OOccttrreeeess BBSSPP TTrreeeess 11/7/02 Speeding Up Computations • Ray Tracing – Spend a lot of time doing ray object intersection tests • Hidden Surface Removal – painters algorithm – Sorting polygons front to back • Collision between objects – Quickly determine if two objects collide Spatial data-structures n2 computations 3 Speeding Up Computations • Ray Tracing – Spend a lot of time doing ray object intersection tests • Hidden Surface Removal – painters algorithm – Sorting polygons front to back • Collision between objects – Quickly determine if two objects collide Spatial data-structures n2 computations 3 Speeding Up Computations • Ray Tracing – Spend a lot of time doing ray object intersection tests • Hidden Surface Removal – painters algorithm – Sorting polygons front to back • Collision between objects – Quickly determine if two objects collide Spatial data-structures n2 computations 3 Speeding Up Computations • Ray Tracing – Spend a lot of time doing ray object intersection tests • Hidden Surface Removal – painters algorithm – Sorting polygons front to back • Collision between objects – Quickly determine if two objects collide Spatial data-structures n2 computations 3 Speeding Up Computations • Ray Tracing – Spend a lot of time doing ray object intersection tests • Hidden Surface Removal – painters algorithm – Sorting polygons front to back • Collision between objects – Quickly determine if two objects collide Spatial data-structures n2 computations 3 Spatial Data Structures • We’ll look at – Hierarchical bounding volumes – Grids – Octrees – K-d trees and BSP trees • Good data structures can give speed up ray tracing by 10x or 100x 4 Bounding Volumes • Wrap things that are hard to check for intersection in things that are easy to check – Example: wrap a complicated polygonal mesh in a box – Ray can’t hit the real object unless it hits the box – Adds some overhead, but generally pays for itself.
    [Show full text]
  • Ray Tracing Acceleration(光线跟踪加速)
    Computer Graphics Shi-Min Hu Tsinghua University Ray Tracing Acceleration(光线跟踪加速) • Ray Tracing – As we mentioned in previous course, ray tracing is one of the most important techniques in computer graphics. Using ray tracing techniques, we could generate impressive images including a lot of visual effects, such as hard/soft shadows, transparence(透明), translucence(半透明), reflection, refraction, texture and so on. Recursive Ray Tracing Recursive Ray Tracing IntersectColor( vBeginPoint, vDirection) { Determine IntersectPoint; Color = ambient color; for each light Color += local shading term; if(surface is reflective) color += reflect Coefficient * IntersectColor(IntersecPoint, Reflect Ray); else if ( surface is refractive) color += refract Coefficient * IntersectColor(IntersecPoint, Refract Ray); return color; } • Effects of ray tracing Ray Tracing Acceleration • Motivation (Limitation of ray tracing) – The common property of all ray tracing techniques is their high time and space complexity.(时空复杂性高) – They spend much time repeatedly for visibility computations, or doing ray object intersection testing(主要时间用于可见性计算和求交测试) Ray Tracing Acceleration • How to accelerate? – We will look at spatial(空间的) data structures • Hierarchical (层次性) Bounding Volumes (包围盒) • Uniform Grids (均匀格点) • Quadtree/Octree (四叉树/八叉树) • K-d tree / BSP tree (空间二分树) – Good spatial data structures could speed up ray tracing by 10-100 times Ray Intersection – Given a model, and a ray direction, as shown in the right figure, how to test whether the ray intersect with the model,
    [Show full text]
  • Collision Detection • Collision Detection Is an Essential Part of Physically Realistic Dynamic Simulations
    Motivation - Dynamic Simulation ETH Zurich ETH Zurich Collision Detection • Collision detection is an essential part of physically realistic dynamic simulations. • For each time step: •compute dynamics • detect collisions • resolve collisions Stefan Gottschalk, UNC Jim Cremer, Univ of Iowa M Teschner – Collision Detection 1 M Teschner – Collision Detection 2 Motivation - Biomedical Simulation Motivation - Path Planning ETH Zurich ETH Zurich • Dysfunction of the hip joint due to reoriented femoral head • Restricted range of motion in hip joint Stefan Gottschalk, UNC • Simulation of the range of motion to decide whether a reorienting Jean-Claude Latombe, Stanford Univ osteotomy of the proximal femur can improve the range of motion Planning a path for the torus • Triangulated surface representation of the bone structure involves collision detection tests. -> collision detection problem M Teschner – Collision Detection 3 M Teschner – Collision Detection 4 1 Motivation Motivation - Robotics ETH Zurich Molecular Motion, Protein Folding ETH Zurich Sanchez, Latombe, Stanford Univ Singh, Latombe, Brutlag, Stanford Univ • Collision detection is required to coordinate all tasks for all robots • Computation of low-energy states for designed drug molecules •Can be time-critical in case of a break-down M Teschner – Collision Detection 5 M Teschner – Collision Detection 6 Outline Bounding Volumes ETH Zurich ETH Zurich Bounding Volumes Simplified conservative surface representation for fast approximative collision detection test Hierarchies of Bounding Volumes • Spheres • Axis-aligned bounding boxes (ABB) Spatial Partitioning • Object-oriented bounding boxes (OBB) • Discrete orientation polytopes (k-DOPs) Distance Fields Collision Detection • Avoid checking all object primitives. for Deformable Objects • Check bounding volumes to get the information whether objects could interfere.
    [Show full text]
  • Collision Detection for Point Cloud Models with Bounding Spheres Hierarchies
    The International Journal of Virtual Reality, 2012, 11(2):37-43 37 Collision Detection for Point Cloud Models With Bounding Spheres Hierarchies Mauro Figueiredo1, João Pereira2, João Oliveira3and Bruno Araújo2 1CIMA-Centro de Investigação Marinha e Ambiental, Instituto Superior de Engenharia, Universidade do Algarve, Portugal 2IST/INESC-ID, Rua Alves Redol, 9, 1000-029 Lisboa 3C3i - Centro Interdisciplinar de Investigação e Inovação, Instituto Politécnico de Portalegre, Portugal1 BSH organizes spatially its geometry, grouping neighboring Abstract² Point cloud models are a common shape represen- points. tation for several reasons. Three-dimensional scanning devices Results show that the collision detection algorithm for point are widely used nowadays and points are an attractive primitive cloud models uses effectively the bounding sphere hierarchy to for rendering complex geometry. Nevertheless, there is not much find intersections between point cloud models at interactive literature on collision detection for point cloud models. rates. In addition, unlike CAD objects which typically contain This paper presents a novel collision detection algorithm for object hierarchies and are already segmented into surface large point cloud models using voxels, octrees and bounding groups, point data sets derived from laser scanned data do not spheres hierarchies (BSH). The scene graph is divided in voxels. The objects of each voxel are organized intoan octree. Due to the have such information thus presenting computational issues. high number of points in the scene, each non-empty cell of the The octree was used for this purpose to address these issues and octree is organized in a bounding sphere hierarchy, based on an it is a solution that adapts to point sets derived from different R-tree hierarchy like structure.
    [Show full text]
  • Analyzing Performance of Bounding Volume
    ANALYZING PERFORMANCE OF BOUNDING VOLUME HIERARCHIES FOR RAY TRACING by KEVIN W. BEICK A THESIS Presented to the Department of Computer and Information Science and the Robert D. Clark Honors College in partial fulfillment of the requirements for the degree of Bachelor of Arts December 2014 Acknowledgements I would like to thank Professor Childs for providing guidance and encouraging me to achieve my full potential as well as for being flexible and accommodating despite having many other duties throughout this process that started well over a year ago. I would also like to thank Matthew Larsen for providing me with some starter code, sharing his knowledge and directing me towards useful resources and Professor Hopkins for her willingness to serve as my CHC Representative on such short notice. iii Table of Contents Introduction 1 Computer Graphics 1 Rasterization 2 Ray Tracing 3 Bounding Volume Hierarchies 6 Related Works 9 Experiment Overview 14 BVH Variants 14 Test Cases 15 Analyzing Performance 16 Construction Algorithms 17 Results and Analysis 20 Summary and Conclusion 25 Data Tables 27 Primary Rays - Ray Trace Depth: 1, Opacity: 0.0 28 Secondary Rays - Ray Trace Depth: 2, Opacity: 0.0 29 Secondary Rays - Ray Trace Depth: 1, Opacity: 0.5 30 References 31 iv List of Figures Figure 1: A simple illustration of ray tracing’s intersection detection. 4 Figure 2: An example of a bounding volume hierarchy, using rectangles as bounding volumes. 7 Figure 3: A rendering of one of the five input geometries processed during the ray tracing tests. 15 Figure 4: A graph of BVH build times.
    [Show full text]
  • Algorithms for Two-Box Covering
    Algorithms for Two-Box Covering Esther M. Arkin Gill Barequet Joseph S. B. Mitchell Dept. of Applied Mathematics Dept. of Computer Science Dept. of Applied Mathematics and Statistics The Technion—Israel Institute and Statistics Stony Brook University of Technology Stony Brook University Stony Brook, NY 11794 Haifa 32000, Israel Stony Brook, NY 11794 ABSTRACT 1. INTRODUCTION We study the problem of covering a set of points or polyhe- A common method of preprocessing spatial data for ef- dra in <3 with two axis-aligned boxes in order to minimize ¯cient manipulation and queries is to construct a spatial a function of the measures of the two boxes, such as the sum hierarchy, such as a bounding volume tree (BV-tree). Var- or the maximum of their volumes. This 2-box cover problem ious types of BV-trees have been widely used in computer arises naturally in the construction of bounding volume hi- graphics and animation (e.g., for collision detection, visibil- erarchies, as well as in shape approximation and clustering. ity culling, and nearest neighbor searching) and in spatial Existing algorithms solve the min-max version of the exact databases (e.g., for GIS and data mining). In order to be problem in quadratic time. Our results are more general, maximally e®ective at allowing pruning during a search of addressing min-max, min-sum and other versions. Our re- the hierarchy, it is important that the bounding volumes ¯t sults give the ¯rst approximation schemes for the problem, the data as tightly as possible. In a top-down construction which run in nearly linear time, as well as some new exact of the BV-tree, each step requires that one compute a good algorithms.
    [Show full text]