Title: Surface Reconstruction and Distance Fields
1Surface Reconstruction and Distance Fields
2Surface Representation
- Parametric
- Triangular mesh, Bezier surfaces, NURBS
- Implicit
- Represented as a function f(x,y,z) 0
- Volumetric representation
- One important implicit function
- is the distance function
3Distance Field
- Define an implicit function D(p) distance to
the surface at point p
- D(x,y) distance to
- surface
- gt 0 outside the surface
- lt 0 inside the surface
- 0 on the surface
Use interpolation to compute distance at an
arbitrary point
4Distance Field
- Computing distance field
- For a triangular mesh minimum of distance to
each of the triangles - Fast marching methods can be used to compute
distance fields quickly (Sethian99) - Can compute quickly using graphics hardware (Hoff
et al Hoff99) - Could use an octree instead of a uniform grid
- Adaptively sampled distance fields (Frisken00)
5Graphics Hardware-based computation
- Consider the 2D case
- Define distance functions for primitives (point,
line, polygons)
TENT
CONE
6Graphics Hardware-based computation
- Distance function for a polygon a collection of
cones and tents - Render the distance function using graphics
hardware - The Z-buffer holds the distance field
- For 3D distance field , refer to the paper
Hoff99.
7Pros and Cons
- Advantages
- Fast operations
- Point classification does a point lie on,
inside or outside surface ? Check the sign of the
distance function at that point - Union, Intersection, complement
- Independent of topology
- Topology can change during operations on distance
fields - Disadvantages
- Enumerating points on the surface
- Locating neighbours
8Boolean Operations
Min DistA, Dist B 0
Max DistA, Dist B 0
9Surface Reconstruction
- Objective obtain a triangular mesh
representation - To extract the surface
- Compute the zero-set p D(p) 0
10Distance-field based Surface reconstruction
- Marching Cubes Lorensen87
- Extended Marching Cubes Kobbelt01
- Dual Contouring Ju02
11Marching Cubes
- Given the distance field grid,
- Reconstruct the surface within each grid cell
- Once done with one cell (cube), march to the
next.
12Marching Cubes
- Determine the topology of surface within the cube
handle actual intersection later - Each vertex of the cube is assigned a 1 if it
lies outside the surface, 0 if inside - 256 cases in all, can be reduced to 15 by
symmetry - Can enumerate different cases and store them in a
table - Use an index into the table
13Marching Cubes
For details, refer to the original paper
Lorensen87
14Marching Cubes
D2 gt 0
D1 lt 0
15Marching Cubes
- Handle each cell independently
- Because intersection points along grid edges are
consistent between adjacent cells - Reconstructed surface matches at cell boundaries
and doesnt leave holes
16Extended Marching Cubes Kobbelt et al. 2001
- Marching cubes in general cannot reconstruct very
sharp features and result in aliasing artifacts - Problem normals dont converge
- Extended marching cubes (EMC) can reconstruct
sharp features
17Extended Marching Cubes
- Detect if a cell contains a sharp feature
- If not use standard Marching Cubes
- Else use the method described next
- Instead of storing distance D at each grid point
- Store DX, DY, DZ, distances along X, Y Z axes
- Also store normals
- Axis-aligned distances provide exact intersection
points - Normals are used to reconstruct sharp features
18Extended Marching Cubes
Y
D2Y gt 0
X
Surface
D1Y lt 0
D3X gt 0
D1X lt 0
19Extended Marching Cubes
normal
normal
20Extended Marching Cubes
- This works only if there is atmost one sharp
feature. - The above method positions a vertex at the
minimizer of the quadratic error function (QEF) - Ex S (ni (x pi))2
Where pi and ni correspond to the intersections
and unit normals
21Dual Contouring Ju et al. 2002
- Use QEF criterion to position a vertex within
each cell - For each edge that exhibits a sign change,
generate a quad connecting the minimizing
vertices of the four cells sharing that edge
-
-
-
22Dual Contouring
- No need to explicitly test for features
- Mesh produced by dual contouring is dual to the
mesh produced by marching cubes method - Vertices correspond to faces and vice-versa
- Mesh have better aspect ratios
- Mesh vertices are allowed to move freely within
the grid cells instead of being constrained to
lie on the edges of the grid.
23Dual Contouring
24Applications CSG Modeling
25(No Transcript)
26Point Cloud reconstruction
- Given a cloud of points, define a distance field
(Hoppe et al Hoppe92) - Estimate normal and hence the tangent plane at
each point in the cloud - Distance from a point in the cloud is defined to
be the distance from its tangent plane - Distance at each grid point is the minimum of
distance from all the points in the cloud - Once the distance field has been computed,
extract the surface using any of the contouring
methods we have discussed (MC, EMC or dual
contouring)
27Point Cloud reconstruction
Cloud of 200 K points
28References
- Lorensen87 W. Lorensen, H.Cline, Marching
Cubes a high resolution 3D surface
reconstruction algorithm SIGGRAPH 87 - Kobbelt01 Leif P. Kobbelt, Mario Botsch, Ulrich
Schwanecke, Hans-Peter Seidel, Feature Sensitive
Surface Extraction from Volume Data, SIGGRAPH 01
- Ju02 Ju T., Losasso F., Schaefer S. and Warren
J., Dual Contouring of Hermite Data, SIGGRAPH
02 - Hoff99 K. Hoff, T. Culver, J. Keyser, M.Lin, D.
Manocha, Fast Computation of generalized Voronoi
diagrams using graphics hardware, SIGGRAPH 99
29References
- Frisken00 Perry and Frisken, "Adaptively
Sampled Distance Fields (ADFs) Representing
Shape for Computer Graphics", SIGGRAPH 2000 - Hoppe92 H. Hoppe, T. DeRose, T. Duchamp, J.
McDonald, and W. Stuetzle. Surface reconstruction
from unorganized points. SIGGRAPH '92 - Sethian99 J.A. Sethian, Level Set Methods and
Fast Marching Methods Evolving Interfaces in
Computational Geometry, Fluid Mechanics, Computer
Vision, and Materials Science 1999