The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Distance Fields Avneesh Sud COMP 290-058, Fall 2003.

Slides:



Advertisements
Similar presentations
Computer Graphics - Rasterization -
Advertisements

COMP 175 | COMPUTER GRAPHICS Remco Chang1/6103b – Shapes Lecture 03b: Shapes COMP 175: Computer Graphics February 3, 2015.
Complete Motion Planning
Motion Planning for Point Robots CS 659 Kris Hauser.
Closest Point Transform: The Characteristics/Scan Conversion Algorithm Sean Mauch Caltech April, 2003.
The Voronoi Diagram David Johnson. Voronoi Diagram Creates a roadmap that maximizes clearance –Can be difficult to compute –We saw an approximation in.
Discrete Geometry Tutorial 2 1
DESIGN OF A GENERIC PATH PATH PLANNING SYSTEM AILAB Path Planning Workgroup.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
CPSC 335 Geometric Data Structures in Computer Modeling and GIS Dr. Marina L. Gavrilova Assistant Professor Dept of Comp. Science, University of Calgary,
lecture 4 : Isosurface Extraction
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Fast C-obstacle Query Computation for Motion Planning Liang-Jun Zhang 12/13/2005 Liang-Jun Zhang 1 Young.
Numerical geometry of non-rigid shapes
UNC Chapel Hill M. C. Lin References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics.
Adapted from: CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware Naga K. Govindaraju, Stephane.
Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware Kenneth E. Hoff III, Tim Culver, John Keyser, Ming Lin, and Dinesh Manocha University.
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
Navigation and Motion Planning for Robots Speaker: Praveen Guddeti CSE 976, April 24, 2002.
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Randomized Motion Planning for Car-like Robots with C-PRM Guang Song, Nancy M. Amato Department of Computer Science Texas A&M University College Station,
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
CS 326A: Motion Planning Basic Motion Planning for a Point Robot.
Chapter 5: Path Planning Hadi Moradi. Motivation Need to choose a path for the end effector that avoids collisions and singularities Collisions are easy.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Constraint-Based Motion Planning using Voronoi Diagrams Maxim Garber and Ming C. Lin Department of Computer.
Randomized Planning for Short Inspection Paths Tim Danner and Lydia E. Kavraki 2000 Presented by Dongkyu, Choi On the day of 28 th May 2003 CS326a: Motion.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Geometric Computations on GPU: Proximity Queries Avneesh Sud &Dinesh Manocha.
CSE 681 Ray Tracing Implicit Surfaces. CSE 681 Overview Similar to CSG –Combine primitive objects to form complex object Primitives are “density fields”
Hidden Surface Removal
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
Graphics Graphics Korea University cgvr.korea.ac.kr Creating Virtual World I 김 창 헌 Department of Computer Science Korea University
© Manfred Huber Autonomous Robots Robot Path Planning.
CS 551/651 Advanced Computer Graphics Warping and Morphing Spring 2002.
Algorithms for Triangulations of a 3D Point Set Géza Kós Computer and Automation Research Institute Hungarian Academy of Sciences Budapest, Kende u
Marching Cubes: A High Resolution 3D Surface Construction Algorithm William E. Lorenson Harvey E. Cline General Electric Company Corporate Research and.
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Shape Analysis and Retrieval Structural Shape Descriptors Notes courtesy of Funk et al., SIGGRAPH 2004.
Path Planning for a Point Robot
Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces (1996) L. Kavraki, P. Švestka, J.-C. Latombe, M. Overmars.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
Quick-CULLIDE: Efficient Inter- and Intra- Object Collision Culling using Graphics Hardware Naga K. Govindaraju, Ming C. Lin, Dinesh Manocha University.
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Voronoi Diagram (Supplemental)
Binary Space Partitioning Trees Ray Casting Depth Buffering
Extraction and remeshing of ellipsoidal representations from mesh data Patricio Simari Karan Singh.
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2015.
UNC Chapel Hill M. C. Lin Introduction to Motion Planning Applications Overview of the Problem Basics – Planning for Point Robot –Visibility Graphs –Roadmap.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
CHAPTER 5 CONTOURING. 5.3 CONTOURING Fig 5.7. Relationship between color banding and contouring Contour line (isoline): the same scalar value, or isovalue.
Robotics Chapter 5 – Path and Trajectory Planning
Computer Graphics I, Fall 2010 Implementation II.
Autonomous Robots Robot Path Planning (3) © Manfred Huber 2008.
CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware Presented by Marcus Parker By Naga K. Govindaraju,
Data Visualization Fall The Data as a Quantity Quantities can be classified in two categories: Intrinsically continuous (scientific visualization,
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
Computer Graphics Implementation II
Kenneth E. Hoff III, Tim Culver, John Keyser,
Morphing and Shape Processing
3D Object Representations
References Additional lecture notes for 2/18/02.
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
GPGPU: Distance Fields
Craig Schroeder October 26, 2004
Implementation II Ed Angel Professor Emeritus of Computer Science
References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics of Surfaces 1998.
Introduction to Computer Graphics with WebGL
Implementation II Ed Angel Professor Emeritus of Computer Science
Classic Motion Planning Methods
Presentation transcript:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Distance Fields Avneesh Sud COMP , Fall 2003

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 2 Overview WHAT are Distance Fields? HOW are they computed? WHY do we care?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 3 Overview WHAT are Distance Fields? HOW are they computed? WHY do we care?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 4 Distance Functions A scalar function f:R n -> R representing the distance from an object O to any point P ε R n Object O is called a ‘site’

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 5 Distance Functions: Example Euclidean Distance Function: f(x,y)=√x 2 +y 2 Point in 2D

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 6 Distance Functions: Example Euclidean Distance Function: f(x,y)=√x 2 +y 2 Plot a graph: z=√x 2 +y 2 Cone Points in 2D

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 7 Distance Metrics L p distance metric in k dim p = 1, “Manhattan” or City Block p = 2, Euclidean p =∞, Max-norm

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 8 Distance Fields For a set of sites, the minima of all distance functions representing the distance from a point P ε R n to closest site “Lower Envelope” of all distance functions

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 9 Differential Geometry S = surface moving in a normal direction with unit speed Distance of point X from surface = arrival time of the surface at X S X d

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 10 Differential Geometry Shortest distance from X to point p ε S is orthogonal to S Line segment Xp is a characteristic S must be smooth S X d p

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 11 What is a Voronoi Diagram? Given a collection of geometric primitives, it is a subdivision of space into cells such that all points in a cell are closer to one primitive than to any other Voronoi Site Voronoi Region

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 12 Ordinary Point sites Nearest Euclidean distance Generalized Higher-order site geometry Varying distance metrics Weighted Distances Higher-order Sites

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 13 Voronoi Diagram and Distance Fields “Projection of lower envelope” of distance functions “Lower Envelope” of distance functions Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 14 Voronoi Diagram and Distance Fields “Projection of lower envelope” of distance functions Given one, other can be easily computed Practical methods compute distance fields on a discrete grid

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 15 Related Terminology Distance Transform = Distance Field Closest Point Transform = Feature Transform = Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 16 Why Should We Compute Them? Useful in a wide variety of applications Collision Detection Surface Reconstruction Robot Motion Planning Non-Photorealistic Rendering Surface Simplification Mesh Generation Shape Analysis

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 17 GVD: “Clearance Information” Points with the largest distance values to nearby obstacles Maximally Clear Path Density EstimationNearest Neighbors

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 18 Distance Field: “Proximity Information” Potential Fields – need proximity information to obstacles Distance field of obstacles (and its gradient) used to compute repulsive forces [Khatib86]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 19 Overview WHAT are Distance Fields? HOW are they computed? WHY do we care?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 20 Brute Force Algorithm (Grid) 1.Initially : d p =∞, for all p ε grid 2.for each site m 3. for each grid point p 4. d new = distance to m 5. if |d new |<|d p | 6. d p = d new 7. cp p = closest point on m 8. end 9.end

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 21 Brute-force Algorithm Record ID of the closest site to each sample point Coarse point-sampling result Finer point-sampling result

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 22 Brute Force Algorithm Time Complexity? M sites, grid size N O(MN) Space Complexity? O(N) Immensely Parallelizable!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 23 GPU Based Computation PointLineTriangle HAVOC2D, HAVOC3D [Hoff et al, 99] Evaluate distance at each pixel for all sites Accelerate using graphics hardware Model is polygonal

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 24 HAVOC2D, HAVOC3D Evaluate distance at each pixel for all sites Accelerate using graphics hardware Steps Mesh approximation of Distance Functions Render distance meshes using graphics hardware Readback final buffers GPU Based Computation

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 25 Approximating the Distance Function Depth buffer performs minimum comparison Graphics Hardware performs fast linear interpolation Distance Functions are non- linear Perform linear approximation to Distance Function

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 26 Approximating the Distance Function PointLineTriangle Avoid per-pixel distance evaluation Point-sample the distance function Reconstruct by rendering polygonal mesh

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 27 The Error Bound Error bound is determined by the pixel resolution   farthest distance a point can be from a pixel sample point Close-up of pixel grid

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 28 Meshing the Distance Function Shape of distance function for a 2D point is a cone Need a bounded-error tessellation of the cone

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 29 Rasterization to reconstruct distance values Depth test to perform minimum operator Graphics Hardware Acceleration Perspective, 3/4 viewParallel, top view

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 30 Readback Results Distance Field Depth Buffer Voronoi Regions Color Buffer

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 31 Shape of Distance Functions Sweep apex of cone along higher-order site to obtain the shape of the distance function

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 32 Example Distance Meshes

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 33 Curves Tessellate curve into a polyline Tessellation error is added to meshing error

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 34 3D Voronoi Diagrams Graphics hardware can generate one 2D slice at a time Sweep along 3 rd dimension (Z- axis) computing 1 slice at a time Polygonal model

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 35 Shape of 3D Distance Functions Slices of the distance function for a 3D point site Distance meshes used to approximate slices

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 36 Shape of 3D Distance Functions PointLine segmentTriangle 1 sheet of a hyperboloid Elliptical conePlane

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 37 Advantages Simple idea – efficiently implemented on graphics hardware Extensible to any type of distance function and input set

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 38 Disadvantages Mesh Generation and Tranform Large number of triangles generated Rasterization: Distance mesh can fill entire slice Complexity for M sites and N slices = O(MN) Lot of Fill ! Readback: Stalls the graphics pipeline Unsuitable for interactive applications

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 39 Using Voronoi Information Assume point sites only Compute Voronoi diagram O(M logM) in 2D O(M 2 ) in 3D Scan convert each Voronoi cell, computing closest distance O(N) Edges of Voronoi polygons/polyhedra must be larger than grid spacing

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 40 Characteristics/Scan Conversion Algorithm Use characteristics [Mauch00] 2D algorithm for a piecewise linear curve

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 41 Characteristics/Scan Conversion Algorithm Closest points to a line segment lie within an infinite strip Each strip exactly contains the characteristic curves from that edge Characteristic Curve

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 42 Characteristics/Scan Conversion Algorithm Closest points to a point lie within an infinite wedge Characteristic line for non-smooth points on the manifold lies “between” the normals of surrounding smooth parts

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 43 Edge Strips Positive DistanceNegative Distance

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 44 Vertex Wedges Positive DistanceNegative Distance

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 45 Bounds Compute distance field in a band up to distance d from the curve Compute bounding polygons up to distance d Vertex Edge

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 46 CSC algorithm – 2D 1.Initially: d ij =∞, for all i,j 2.for each edge e 3. p = bounding polygon of e 4. G = scan_convert(p) 5. for each (i, j) ε G 6. d new = distance to e 7. if |d new |<|d ij | 8. d ij = d new 9. cp ij = closest point on e 10. end 11. end 12.for each vertex v 13. … 14.end

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 47 3D Triangle Mesh Sites are triangular faces, edges or vertices Characteristic lines have bounding polyhedra Faces – Triangular PrimsEdge - WedgeVertices – “Cones”

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 48 3D Triangle Mesh Sites are triangular faces, edges or vertices Characteristic lines have bounding polyhedra

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 49 3D Computation Slice polyhedra into polygons Scan convert each polygon Slices of a “cone”

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 50 CSC algorithm – 3D 1.Initially: d ij =∞, for all i,j 2.for each face f 3. p = bounding polyhedron of f 4. … 5.end 6.for each edge e 7.… 8.end 9.for each vertex v 10. … 11.end

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 51 Complexity M sites, N grid cells within distance d of the surface r = ratio of sum of volumes of polyhedra by volume of region within distance d Gives amount of overlap = number of times each cell is written Complexity = O(M +rN) Polyhedra ConstructionScan Conversion

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 52 Complexity For small d, r ≈ 1 For large d, clip bounding polyhedra to keep r small Can increase setup cost of polyhedra construction to O(M 2 )

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 53 Advantages Efficiently exploits surface connectivity, minimizing fill Gives signed distance fields

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 54 Disadvantages Valid for manifold surfaces Cannot evaluate non-linear distance functions on older generations of graphics hardware A large number of polygons may be scan-converted for each slice Saddle points – “Cones” invalid Setup cost

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 55 CSC on graphics hardware Use programmable fragment programs on modern GPUs to compute distance functions at each pixel [Sigg03] Can compute complicated functions at each pixel on current GPUs

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 56 HW-Based CSC Compute entire slice at a time CPU computes slicing polygons GPU computes distance values at each pixel on slice in parallel Model Slice Polyhedra Polygons

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 57 Reducing polygon count Expand triangular prisms to encloses point closest to edges and faces 2D example Bisector

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 58 Reducing polygon count Expand triangular prisms to encloses point closest to edges and faces Fragment program computes closest site Complete Voronoi information is lost 3D example

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 59 Results Stanford Bunny ModelKnot Model

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 60 Advantages Efficient implementation on graphics hardware – exploits parallelism Reduces number of polygons drawn Handles saddle points

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 61 DiFi Fast Distance Field computation using graphics hardware [Sud03] Enhancement over HAVOC Exploits Voronoi diagram properties for culling

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 62 Voronoi Diagram Properties Within a bounded region, all voronoi regions have a bounded volume 9 Sites, 2D

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 63 Voronoi Diagram Properties Within a bounded region, all voronoi regions have a bounded volume As site density increases, average spatial bounds decrease 27 Sites, 2D

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 64 Voronoi Diagram Properties Voronoi regions are connected Valid for all L p norms

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 65 Voronoi Diagram Properties High distance field coherence between adjacent slices Change in distance function between adjacent slices is bounded Distance functions for a point site P i to slice Z j

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 66 Voronoi Diagram Properties High distance field coherence between adjacent slices Change in distance function between adjacent slices is bounded Distance functions for a point site P i to slice Z j+1

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 67 Culling Techniques Use Voronoi region bounds for culling Site Classification Estimating Z-Bounds Estimating XY-Bounds

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 68 Site Culling: Classification For each slice partition the set of sites S1S1 S3S3 Slice j S4S4 S2S2 Sweep Direction X Z S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 69 S4S4 Site Culling: Classification For each slice partition the set of sites, using voronoi region bounds: Slice j S1S1 S2S2 S3S3 X Z Sweep Direction S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 70 Site Culling: Classification For each slice partition the set of sites, using voronoi region bounds: Approaching (A j ) Slice j S1S1 S3S3 S4S4 S2S2 X Z Sweep Direction AjAj S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 71 S4S4 S2S2 Site Culling: Classification For each slice partition the set of sites, using voronoi region bounds: Approaching (A j ) Intersecting (I j ) Slice j S1S1 S3S3 X Z Sweep Direction AjAj IjIj S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 72 S4S4 S2S2 Site Culling: Classification For each slice partition the set of sites, using voronoi region bounds: Approaching (A j ) Intersecting (I j ) Receding (R j ) Slice j S1S1 S3S3 X Z Sweep Direction AjAj IjIj RjRj S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 73 S4S4 S2S2 Site Culling: Classification For each slice partition the set of sites, using voronoi region bounds: Approaching (A j ) Intersecting (I j ) Receding (R j ) Render distance functions for Intersecting sites only Slice j S1S1 S3S3 X Z Sweep Direction AjAj IjIj RjRj S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 74 Coherence Updating I j I j+1 = I j … Slice j+1 S1S1 S3S3 Previously Intersecting S4S4 S2S2 X Z Sweep Direction IjIj S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 75 S4S4 S2S2 Coherence Updating I j I j+1 = I j + (A j – A j+1 ) … Slice j+1 S1S1 S3S3 X Z Sweep Direction Approaching  Intersecting A j -A j+1 S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 76 S4S4 S2S2 Coherence Updating I j I j+1 = I j + (A j – A j+1 ) – (R j+1 – R j ) Slice j+1 S1S1 S3S3 X Z Sweep Direction R j+1 -R j Intersecting  Receding S5S5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 77 S4S4 S2S2 Coherence Updating I j I j+1 = I j + (A j – A j+1 ) – (R j+1 – R j ) Slice j+1 S1S1 S3S3 X Z Sweep Direction S5S5 A j+1 I j+1 R j+1

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 78 Estimating Set Partitions Computing exact set partition = Exact voronoi computation Use hardware based occlusion queries Determine number of visible fragments Compute a set of potentially intersecting sites Î j

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 79 Estimating XY Bounds Monotonic distance functions

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 80 Estimating XY Bounds Monotonic distance functions Voronoi region’s XY extent bounded by depth of distance function

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 81 Estimating XY Bounds Monotonic distance functions Voronoi region’s XY extent bounded by depth of distance function Estimate max depth bounds for each site!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 82 Estimating Depth Bound Render distance function in layers using occlusion query

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 83 Estimating Depth Bound Render distance field in layers using occlusion query

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 84 Estimating Depth Bound Render distance field in layers using occlusion query

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 85 Estimating Depth Bound Render distance field in layers using occlusion query Last visible layer bounds the max depth

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 86 Estimating Depth Bound Render distance field in layers using occlusion query Last visible layer bounds the max depth Gives max depth at end of current slice

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 87 Updating Depth Bound Exploit depth field coherence Given a depth bound for current slice, estimate a bound for next slice

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 88 Complexity Performance depends on amount of occlusion in distance functions Influences estimated bounds r = ratio of estimated Voronoi bounds by actual Voronoi size Complexity O(M+rN ) Worst case: r = M Expected: r = constant Mesh Generation + Transform Rasterization

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 89 Results ModelPolysResolution HAVOC (s) DiFi (s) Shell Charge x126x Head x106x Bunny x126x Cassini x128x times speedup!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 90 Overview WHAT are Distance Fields? HOW are they computed? WHY do we care?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 91 Planning Based on GVD & MAT O’Dunlaing, Sharir and Yap [1983] Canny and Donald [1987] Latombe [1991] Choset, Burdick, et al. [ ] Vleugels and Overmars [1996,1997] Guibas, Holleman and Kavraki [1999] Wilmarth, Amato and Stiller [1999] …… and others ……

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 92 Planning Using GVDs Is a GVD sufficient for path planning? GVD computed in 3D workspace Sufficient for a point robot Use GVD along with other methods

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 93 3-DOF Potential Field Planner with GVD Rigid robot moving on a plane in a dynamic environment [Hoff00] Combines a GVD roadmap with a local (potential field) planner

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 94 Basic Approach Depth Buffer – providing distance function and distance gradient (finite difference) Color Buffer – building Voronoi graphs Combination of Both Compute weighted Voronoi graphs Voronoi vertices used for milestones Weighted edges used for selecting paths Distance values for quick rejection

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 95 Voronoi Boundary For each voxel in discrete GVD, associate a color corresponding to an object ID and a distance value to this obstacle. To extract the boundary, use continuation method similar to iso-surface extraction -- starting from a seed point and step to next by bracketing boundary curves in a 2x2x2 region of sampled points. Can be efficiently performed on modern GPUs using fragment programs

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 96 Constructing Voronoi Roadmap Identify Voronoi vertices Extract Voronoi boundary Build Voronoi graph Select path based on edge weights Incrementally construct Voronoi roadmap local planner (PFF) between milestones quick collision rejection test & exact CD

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 97 Voronoi Roadmap/Graph for Dynamic Environments

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 98 Video (3D View)

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 99 Other Approaches Voronoi based sampling for PRM [Hoff, WAFR00], [Foskey01] Constraint based motion planning [Garber 02] Planning problem formulated as a dynamic simulation problem with constraints Uses distance information for solving constraints

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 100 References (Distance Fields) HAVOC: Hoff et al. Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware SIGGRAPH 1999 CSC: S. Mauch A fast algorithm for computing the closest point and distance transform HW-CSC: Sig et al. Signed Distance Transform Using Graphics Hardware IEEE Vis 2003 DiFi: Sud and Manocha Fast Distance Field Computation Using Graphics Hardware UNC-TR03-026

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 101 References (Planning) Hoff et al. Interactive Motion Planning Using Hardware-Accelerated Computation of Generalized Voronoi Diagrams ICRA 2000 Pisula et al. Randomized Path Planning for a Rigid Body Based on Hardware Accelerated Voronoi Sampling WAFR 2000 Garber and Lin Constraint-Based Motion Planning using Voronoi Diagrams WAFR 2002

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 102 Eikonal Equation Differential geometry S - surface moving in a normal direction with unit speed u(X) – arrival time of S at point X, X ε R n Distance from surface satisfies the Eikonal equation |grad(u)| = 1, u| S = 0

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 103 Eikonal Equation Shortest distance from X to point p ε S is orthogonal to S Line segment Xp is a characteristic of the solution The surface must be C 1

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 104 Polygon Scan Conversion

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL 105 Voronoi Diagram Properties Voronoi regions are connected Valid for L 2, L inf norms Special Case for GPU: Multiple sites lie on same pixel (Voronoi Region  Site) forms a connected region

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Use BB tests to cull away approaching sites (A j ) All approaching sites in slice j+1 are closer than distance field for slice j Use the distance field of slice j as occlusion representation Draw a BB for distance mesh with occlusion query Estimating Z-Bounds

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Use BB tests to cull away approaching sites (A j ) 2.Non-culled sites moved from A j to Î j+1 3.Render Î j+1 using occlusion queries 4.Occluded sites moved from Î j to R j+1 Discarded for all further slices Estimating Z-Bounds