Title: Efficient MaxNorm Distance Computation and Reliable Voxelization
1Efficient Max-Norm Distance Computation and
Reliable Voxelization
- Gokul Varadhan
- Young J. Kim
- Dinesh Manocha
- University of North Carolina at Chapel Hill
Shankar Krishnan Suhas Diggavi ATT Labs
2Max-Norm (l8)
D8(x) max (x, y, z)
- Applications
- Markov decision processes Tsitsiklis et al. 96,
Guestrin et al. 2001 - Discrete objects in supercover model Andres et
al. 96 - Image analysis Lindquist 99
- Dynamics and control systems Zhou et al. 96,
Ghaoui 99 - Tolerance analysis and NC machining Requicha 93,
Farin et al. 2002 - Volume graphics Wang Kaufman 94, Sramek
Kaufman 99
3Motivation
- Voxelization
- Represent a scene by a discrete set of voxels
- Reduce to max-norm distance computation
- Applications
- Volume rendering Lorensen Cline 87, Wang
Kaufman 94 - Ray tracing Wang Kaufman 93
- Implicit modeling Kobbelt et al. 2001, Ju et al.
2002 - Shape representation Frisken et al. 2000
- Model repair Nooruddin Turk 2003
4Previous Work
- Distance Computation
- Distance Fields and Voxelization
5Previous Work Distance Computation
- Euclidean
- Survey in Lin et al. 98
- Max-norm
- Voronoi diagram complexity Boissonnat et al. 95,
Koltun Sharir 2002 - Skeleton computation Aichholzer Aurenhammer
96 - 2D Voronoi diagram and VLSI manufacturing
Papadopoulou Lee 2001
6Previous Work Distance Fields and Voxelization
- Curvature Gibson 98, Shekhar et al. 96
- Adaptive Distance Fields Frisken et al. 2000,
Perry Frisken 2001 - Tri-linear interpolation
- Alias-free voxelization Sramek Kaufman 99
7Outline
- l8 Distance Computation
- Problem
- Optimization Framework
- Specialized Algorithms
- Convex Primitives
- Algebraic Primitives
- Triangulated Models
- Complex Models
- Bounding Volume Hierarchy
- Graphics Hardware Approach
- Reliable Voxelization
- Adaptive Distance Field (ADF) Generation
- Results
8Problem
l8 Distance between a point and a primitive
Distance Cube size/2
9Optimization Framework
D8(x) max (x, y)
10Optimization Framework
x lies within R
P
R - x dominating region
11Outline
- l8 Distance Computation
- Problem
- Optimization Framework
- Specialized Algorithms
- Convex Primitives
- Algebraic Primitives
- Triangulated Models
- Complex Models
- Bounding Volume Hierarchy
- Graphics Hardware Approach
- Reliable Voxelization
- Adaptive Distance Field (ADF) Generation
- Results
12Convex Primitives
- Non-linear optimization reduces to convex
optimization - Simpler solution when the query point is inside
the primitive
13Convex Primitives Point inside
- Closest point Q has to lie on the vertex of the
distance cube - Compute directed distance along 4 directions
Q
P
14Convex Primitives Point outside
- Perform convex optimization
- Interior point methods Nesterov Nemirovsky 94
- Quadrics
- Second-order cone program
- Convex polytopes
- Make A 0
- Linear program
15Outline
- l8 Distance Computation
- Problem
- Optimization Framework
- Specialized Algorithms
- Convex Primitives
- Algebraic Primitives
- Triangulated Models
- Complex Models
- Bounding Volume Hierarchy
- Graphics Hardware Approach
- Reliable Voxelization
- Adaptive Distance Field (ADF) Generation
- Results
16Algebraic Primitives
- Equation Solving approach
- Convex as well as non-convex
- Solve for the closest point
17Vertex Case
- Directed distance query
- One of 8 directions ( 1/v3, 1/v3, 1/v3)
-
f(x) 0 x y 0 x z 0
18Edge Case
- Local minima/maxima
- Partial derivative is zero
- Lies on a partitioning plane
f(x) 0 df/dz(x) 0 x y 0
19Face Case
- Two partial derivatives are zero
f(x) 0 df/dy(x) 0 df/dz (x) 0
20Equation Solving
- Solve above equations for each vertex, edge and
face - Solution set is finite in general
- Obtain a set X of feasible values for the closest
point - Calculate min x-p8 x ? X
21Equation Solving
- Quadrics
- Quadratic Equation
- Torus
- Symmetry
- Degree 8 polynomial
22Outline
- l8 Distance Computation
- Problem
- Optimization Framework
- Specialized Algorithms
- Convex Primitives
- Algebraic Primitives
- Triangulated Models
- Complex Models
- Bounding Volume Hierarchy
- Graphics Hardware Approach
- Reliable Voxelization
- Adaptive Distance Field (ADF) Generation
- Results
23Distance Computation for a Triangle
12 partitioning triangles
24Bounding Volume Hierarchy
- Large polyhedral model
- Naïve algorithm
- Minimum over distance to each triangle
- Speed it up using a precomputed bounding volume
hierarchy
25Outline
- l8 Distance Computation
- Problem
- Optimization Framework
- Specialized Algorithms
- Convex Primitives
- Algebraic Primitives
- Triangulated Models
- Complex Models
- Bounding Volume Hierarchy
- Graphics Hardware Approach
- Reliable Voxelization
- Adaptive Distance Field (ADF) Generation
- Results
26Graphics Hardware Approach
- Approach similar to Hoff et al. 1999
- Render 3D polygonal mesh approximation to the
distance functions - Z-buffer holds the distance field
27Distance Field Generation
28Distance Functions
- Non-linear in Euclidean case
- Hyperboloid
- Elliptical cone
- Linear in case of l8
- Collection of polygons
29Distance Function Point
Z
Y
X
30Distance Function Point
Z
Y
X
31Distance Function Point
Z
Y
X
32Distance Function Point
Z
Y
X
33Distance Function Point
Z
Y
X
34Distance Function Edge
Z
Y
X
35Distance Function Edge
Z
Y
X
36Distance Function Triangle
Z
Y
X
37Distance Function Triangle
Z
Y
X
38Non-convex Implicit Primitives
- Triangulate the primitive
- Obtain an estimate using graphics hardware
- Refine estimate using a local non-linear
optimization tool like LOQO.
39Sources of Error
- Total Error
- Tessellation Error
- Approximating a non-convex implicit or curved
primitive by a polygonal mesh - Hardware Precision Error
- Conservative estimates on the distance by
offsetting the distance functions
40Outline
- l8 Distance Computation
- Problem
- Optimization Framework
- Specialized Algorithms
- Convex Primitives
- Algebraic Primitives
- Triangulated Models
- Complex Models
- Bounding Volume Hierarchy
- Graphics Hardware Approach
- Reliable Voxelization
- Adaptive Distance Field (ADF) Generation
- Results
41Reliable Voxelization
- Marching Cubes (MC)
- Accuracy depends on resolution of the grid
- missed components
- unwanted handles, components
- Unreliable voxel-intersection test
- Detects surface by checking sign change
(inside/outside status) - Complex voxels
MC
42Voxel-Intersection Test
- Reduce to max-norm distance computation
- l8 distance at center of voxel lt voxel size/2
43Voxel-Intersection Test
- Exact test
- Non-uniform voxels
- use weighted norm
- x8 max (w1 x, w2 y, w3 z)
- where wi 1/a, 1/b, 1/c, i 1,2,3
- and a, b, c are dimensions of the voxel along
the three coordinate axes
44Outline
- l8 Distance Computation
- Problem
- Optimization Framework
- Specialized Algorithms
- Convex Primitives
- Algebraic Primitives
- Triangulated Models
- Complex Models
- Bounding Volume Hierarchy
- Graphics Hardware Approach
- Reliable Voxelization
- Adaptive Distance Field (ADF) Generation
- Results
45Adaptive Distance Field (ADF) Generation
- Goal
- Bounded two-sided Hausdorff distance
- Cannot provide such a bound if complex voxels
exist
- Given a Hausdorff distance bound e,
- Check if voxel is intersecting using the
voxel-intersection test - if no intersection
- STOP
- if complex voxel or voxel size gt e
- SUBDIVIDE else STOP
- Early termination in Step 2
46Timings Algebraic primitives
- Equation solving approach
- l8 distance query
- 40-50 usec for quadrics
- 1-1.2 msec for torus
- Need to solve few degree 8 polynomials
47Timings Triangulated Models
- 10 usec per triangle
- Hierarchical Approach
- Query time varied from 0.6 6.14 msec
48Timings Graphics Hardware
- SIMD-like capability
- 128 x 128 x 128 uniform grid
- 8 , 2.7, 5.6 secs for wrinkled torus, cup and
spoon
49Results Voxelization
Happy Buddha
Voxelization
Close-up
50Results Voxelization
Dragon
Close-up
Voxelization
51Results Voxelization
- Localized Distance Computation
- Given a point p and distance bound B,
- Cull away primitives whose bounding boxes do not
intersect the cube of length 2B centered at p
52Results ADF Generation
- CAD benchmarks
- 1-5 solids defined using 3-5 Boolean operations
- Generated an adaptive grid based on l8 distance
computation - 15 secs per solid for Hausdorff distance bound e
1/128 - Reconstructed a boundary representation using an
extended dual contouring algorithm Varadhan et
al. 2003
53Prior Voxel-Intersection Tests
- Implicit surfaces
- Lipschitz condition Kalra Barr 1989
- Interval arithmetic Snyder 1992
- Conservative
- Euclidean distance Perry Frisken 2001
- Surface intersects a voxel if
- Euclidean distance lt half diagonal length
- Surface intersects the bounding sphere of the
voxel - Conservative
54Future Work
- Object-object l8 distance computation
- Other applications of max-norm distance
55Ongoing Work CSG Reconstruction
- G. Varadhan, S. Krishnan, Y. Kim, D. Manocha,
Feature-Sensitive Subdivision and Isosurface
Reconstruction, accepted at IEEE Visualization
2003
http//gamma.cs.unc.edu/recons
56Acknowledgements
- ARO Contract DAAD 19-99-1-0162
- NSF Awards ACI-9876914, ACI-0118743
- ONR Contracts N00014-01-1-0067
- Intel Corporation
- Kenny Hoff for his HAVOC software
- Joe Warren and Scot Schaefer for dual contouring
code
57Thank You!
58Optimization Framework
- Assume f(x) 0 represents the interior of the
primitive - Without loss of generality, assume the query
point P is outside the primitive
59Non-linear Optimization
hTx
Minimize
f(x) 0
subject to
gjTx 0, j1,2, , 2(d-1)
and
60Convex Decomposition
- Leaf node in hierarchy obtained by
- Decomposing surface into convex patches
- Convex hull of each patch
- Hierarchy constructed by merging children nodes
and computing their convex hull - Convex hull computation
- Real, Extraneous (virtual) triangles
61Traversal
- Maintain three values
- U Upper bound to the distance from p to the
polyhedron - Ub Upper bound to the distance from p to the
currently visited node - Minimum over distance to all the real triangles
- Lb Lower bound to the distance from p to the
currently visited node - Minimum over distance to all triangles (real
virtual)
62Traversal
- At each node
- if Ub lt U
- U ? Ub
- As we go down the hierarchy, U will decrease and
converge to the actual distance - Culling
- if Lb gt U
- return from the node
63Degenerate Systems
- Degenerate configurations (put an image)
- Solution set not finite
- Special case handling
- Extraneous Solutions
- Back substitution