Title: OutofCore Surface Simplification
1Out-of-Core Algorithms for Scientific
Visualization and Computer Graphics
- Out-of-Core Surface Simplification
- Peter Lindstrom
- Center for Applied Scientific Computing
- Lawrence Livermore National Laboratory
- This work was performed under the auspices of the
U.S. Department of Energy by - University of California, Lawrence Livermore
National Laboratory under Contract W-7405-Eng-48.
2Talk Overview
- introduction
- spatial clustering
- surface segmentation
- streaming
- summary
3Introduction
- geometric datasets are growing rapidly in size
- millions to billions of geometric primitives now
common - sources simulations, 3D scanning, modeling
software, - managing large datasets is difficult
- data exceeds resources for storage and
transmission - gigabytes to terabytes of raw data
- conventional processing and visualization methods
do not scale - assume random access, in-core storage of entire
dataset - new approaches to large-data processing needed
4Large-Data Example 1
- Richtmeyer-Meshkov instability simulation at LLNL
- 2K3 voxels, 27,000 time steps, 470 million
triangle isosurface
5Large-Data Example 2
- Digital Michelangelo project
- ¼ millimeter resolution range scan 370 million
triangles
6Large-Data Example 3
- Visible Human project
- ? millimeter resolution scan over 100 billion
voxels
7Managing Large Data
- one solution to large-data problem
simplification - approximate dataset with fewer primitives while
satisfying error tolerance or size constraint - enables levels of detail, multiresolution
representations, progressive/adaptive/view-depende
nt refinement
8Levels of Detail for VisualizationPerceived
Detail Decreases with Distance
100
10
2
9Triangle Mesh Simplification
- most surfaces are represented as triangle meshes
- common triangle mesh coarsening operations
- vertex removal (Schroeder et al. 92)
- edge collapse (Hoppe et al. 93)
- half-edge collapse (Kobbelt et al. 98)
- triangle collapse (Hamann 94)
- vertex pair contraction (Garland Heckbert 97)
- vertex clustering (Rossignac Borrel 93)
- all operations instances of vertex set
partitioning - (except general vertex removal)
10Vertex Set Partitioning
- partition vertices into disjoint sets (clusters)
- V V1 È V2 È È Vn
- collapse each set into single (possibly new)
vertex - Vi vi
- discard degenerate triangles
- surviving triangles span three different
clusters - variations between simplification operations
- legality of partitions (e.g. clusters must be
edge-connected) - vertex positioning (e.g. subsampling vs.
optimization)
11Examples of Vertex Set Partitions
- uniform partitions (spatial clustering on 3D
grid) - adaptive partitions (error-driven edge collapse)
12The Dilemma
- surface simplification can reduce data size,
but... - simplification traditionally done in-core
- load entire surface mesh into memory
- queue up sequence of fine-grained coarsening
operations (e.g. vertex removal, edge collapse)
in order of least error - proceed by iteratively coarsening mesh
- memory O(n) storage, random (i.e. incoherent)
access - running time O(n log n)
- example in-core simplification of 1
billion-triangle mesh - 80 GB of RAM, 10 days to simplify using
efficient method - conclusion does not scale well
13Out-of-Core Simplification
- recent research focused on external memory
methods - key concepts data segmentation,
coherent/sequential access, disk-based algorithms
(e.g. B-trees, external sorts) - simplification of arbitrarily large surfaces now
possible - three distinct approaches to out-of-core
simplification - spatial clustering
- Lindstrom 00, Lindstrom Silva 01, Shaffer
Garland 01,Fei et al. 02, Garland Shaffer
02 - surface segmentation
- El-Sana Chiang 00, Prince 00, Bernardini et
al. 02,Choudhury Watson 02, Cignoni et al.
03 - streaming
- Wu Kobbelt 03, Isenburg et al. 03
14Talk Overview
- introduction
- spatial clustering
- surface segmentation
- streaming
- summary
15Spatial Clustering
- idea partition space that surface lies in into
3D cells - vertex set partitions given geometrically by cell
containment - no topological constraints or considerations
- cell geometry can be adapted to surface
- e.g. smaller cells in detailed regions, adapt
cell shape to surface - simplest partition uniform 3D Cartesian grid
16OoCS Uniform Spatial ClusteringLindstrom 00
- algorithm overview
- partition space using a fixed 3D rectilinear grid
- sparse data structure (hash table) represents
occupied cells - position vertices by minimizing quadric error
- weighted sum of squared distances to set of
planes - keep triangles whose vertices fall in three
different cells
17OoCS Algorithm
- 1. for each triangle t in Tin
- 2. compute quadric matrix Qt ntntT
- 3. for each vertex v of t
- 4. map v to cluster cell c
- 5. add Qt to Qc
- 6. if t not degenerate, add t to Tout
- 7. for each cluster c
- 8. compute vertex xc from Qc
- 9. add xc to Xout
1. for each triangle t in Tin 2. compute quadric
matrix Qt ntntT 3. for each vertex v of
t 4. map v to cluster cell c 5. add Qt to
Qc 6. if t not degenerate, add t to Tout 7. for
each cluster c 8. compute vertex xc from
Qc 9. add xc to Xout
18OoCS Algorithm
- algorithm characteristics
- features
- fast linear-time, single-pass algorithm
- reads arbitrarily large triangle soup stream
sequentially - drawbacks
- requires enough core memory to store simplified
mesh - connectivity oblivious ? non-manifold meshes
- non-adaptive partitions yield poor quality
- basis for many out-of-core spatial clustering
methods
19OoCS ResultsSt. Matthew Statue (close-up view)
simplified 3.1M triangles
original 390M triangles
dataset courtesy of the Digital Michelangelo
Project
20OoCS ResultsMesh Quality
21OoCS ResultsResource Usage
- simplification speed
- processes 400K triangles per second on desktop PC
- less than one hour to simplify billion-triangle
mesh - memory requirements
- 6372 bytes per output triangle (depends on hash
table load) - compare with 80 bytes per input triangle for
typical in-core method - allows 15 million-triangle simplified mesh on 1GB
RAM computer
22Output Sensitive Methods
- OoCS handles arbitrarily large inputs, but
- output size limited by available RAM
- what if simplified mesh is not accurate enough?
- cannot use finer grid because of memory
constraints - disk cheaper, orders of magnitude larger than RAM
- so can we use disk instead of RAM during
simplification? - yes, but we must avoid slow random accesses!
23OoCSx Memory Insensitive Clustering Lindstrom
Silva 01
- achieve coherent disk access via external sort
- only random access in OoCS is to clusters
quadric information (via in-core hash lookup) - sort quadric information on disk, then process
sequentially
24OoCSx Algorithm Overview
- simplification
- scan input mesh
- read triangles, compute plane equations
- output cluster ID, plane equation for each vertex
- output non-degenerate triangles to triangle file
- sort plane equation file on cluster ID
- compute cluster quadrics, output optimal vertices
- re-indexing
- sort triangle file on given vertex field
- scan and replace cluster ID with vertex ID
- repeat for each of three vertex fields
25OoCSx Results
- simplification speed
- 30-70K triangles per second (vs. 400K for OoCS)
- resource usage
- temporary disk 5 times size of input mesh
- depends on external sort used
- memory arbitrarily little (specified by user)
- 4 MB used in current implementation
26Drawbacks of Uniform Spatial Clustering
- uniform grid not well adapted to surface features
- spatial proximity does not imply well-shaped
clusters - uneven and/or disconnected surface patches
frequent - fixed-resolution grid limits size of smallest
feature preserved
27Adaptive Spatial ClusteringShaffer Garland 01
- idea analyze mesh and repartition space
- accumulate quadrics on uniform grid in first pass
(as in OoCS) - use PCA of primal/dual quadrics to determine
better partitions - construct BSP-tree top-down for arbitrary convex
cells - recluster mesh on irregular grid in second pass
28Adaptive Spatial Clustering
- algorithm characteristics
- features
- higher quality, better distribution of triangles
than uniform spatial clustering - drawbacks
- higher grid resolution (thus more memory) needed
in first pass - still output sensitive memory requirements
29Adaptive Spatial Clustering Results
original
uniform
adaptive
uniform
adaptive
images courtesy of Eric Shaffer and Michael
Garland
30Other Spatial Clustering Methods
- Fei et al. 02a (SIGGRAPH 2002 tech. sketch)
- simplification sensitive to translation of
cluster grid - degree of sensitivity (DOS) depends on amount of
surface detail - estimate local DOS by clustering on two
interlaced grids - use more detail in regions of high DOS
- Fei et al. 02b (Computer Graphics Forum 2002)
- following initial uniform clustering pass, use
per-cell quadric error to determine which cells
to refine/coarsen - introduce split planes based on PCA of quadric
matrices - additional pass(es) used to incrementally,
adaptively refine/coarsen mesh - more memory efficient but slower adaptation than
inShaffer Garland 01
31Talk Overview
- introduction
- spatial clustering
- surface segmentation
- streaming
- summary
32Surface Segmentation
- idea segment surface into small, disjoint
patches - ensure patches small enough to fit in-core
- simplify each patch using in-core method (e.g.
edge collapse) - stitch together simplified patches
- repeat if necessary
33Vertex Set Partitioning usingSurface Segmentation
V
34Uniform Spatial Surface SegmentationBernardini
et al. 02
- surface segmentation on a uniform rectilinear
grid - 3D grid partitions mesh into small patches
- simplify patches in-core to given error tolerance
- must leave patch boundaries intact to allow
future merging - stitch patches together along common boundaries
- displace grid by half a grid cell in each
direction - repeat procedure to coarsen patch seams
- features
- fairly easy to implement, higher quality than
spatial clustering - drawbacks
- two orders of magnitude slower than spatial
clustering - outputs only single level of detail
35OEMM Adaptive Surface Segmentation Cignoni et
al. 03
- octree-based external memory mesh data structure
- rectilinear octree grid segments surface
- general data structure for out-of-core mesh
processing - not only for simplification
figure courtesy of Paolo Cignoni
36OEMM Overview
- similar approach to Bernardini et al. 02, but
- octree grid adapts in resolution to better match
surface detail - siblings merged when triangle count drops below
limit - by loading grid cells that neighbor current
patch, edges can be collapsed across patch
boundaries - no need to keep patch boundaries at full
resolution - outputs progressive mesh, e.g. for view-dependent
rendering
37OEMM Results
- speed
- one-time OEMM construction 10K triangles per
second - simplification 10K triangles per second
- quality
38Error-Driven Surface SegmentationEl-Sana
Chiang 00
- disk-based implementation of edge collapse
- uses B-tree disk data structure to index mesh,
priority queue - simplification done in batches by loading pieces
of mesh - surface patches given by faces spanned by edges
to be collapsed
figure courtesy of El-Sana Chiang
39Error-Driven Surface Segmentation
- algorithm overview
- compute mesh connectivity, initialize priority
queue on disk - for each batch of lowest-error edges
- dequeue edges and load incident faces into RAM
- merge faces into larger patches whenever possible
- collapse edges, recompute errors, write back to
disk - repeat until desired accuracy/size reached
- features
- entirely error-driven surface segmentation
- drawbacks
- limited scalability patches small when
input-to-RAM ratio large - non-trivial error metrics may force out-of-order
edge collapses
40Other Surface Segmentation Methods
- Prince 00
- extension of Hoppe 98 terrain simp. to arbitrary
surfaces - uses octree partition and edge collapse
- contrary to Cignoni et al. 03, patch boundaries
frozen - 1K triangles per second simplification speed
reported - Choudhury Watson 02
- simplification in reverse (i.e. refinement from
coarse to fine) - segments surface into face clusters via binary
splitting - face clusters grouped together on disk
- increased refinement yields increased locality of
reference - hence virtual memory disk access possible with
little thrashing
41Talk Overview
- introduction
- spatial clustering
- surface segmentation
- streaming
- summary
42Streaming
- mesh as a sequential stream of triangles
- read/write one triangle at a time, process mesh
in single pass - build up indexed submesh in finite in-core stream
buffer - fixed-size sliding window over mesh triangle
list - perform conventional in-core processing on
buffer - e.g. error-driven edge collapse
- supports most simplification operators
- requires coherent linear layout of mesh triangles
to ensure buffer contains sufficiently large and
connected mesh patches - most large meshes already fairly coherent,
otherwise - geometric (external) sort
- topological sort/region growing (e.g. Isenburg
Gumhold 03)
43Stream Buffer Properties
- stream boundary
- one or more loops of edges that divide mesh into
processed and unprocessed regions - indexed triangles read frominput boundary,
written to output boundary (may be the same) - stream boundary sweepscontinuouslyover mesh
- therefore no stitching needed,unlike
conventional surface segmentation
processed region
bufferedregion
output boundary
input boundary
unprocessed region
44Advancing Stream Boundary
45Stream-Based Spatial ClusteringIsenburg et al.
03
- algorithm overview
- spatial clustering on uniform grid (as in OoCS)
- compressed mesh stream provides geometry,
connectivity - maintain only cells intersected by stream
boundary - compute and output cluster vertex when boundary
exits cell - create new cluster if boundary re-enters cell
- maintain small temporary in-corebuffer of
surviving triangles adjacentto input boundary - output triangle as soon as its verticeshave been
output - collapse only edge-connected layers
- clustering reduced to edge collapse,i.e.
collapse all edges whose verticesfall in the
same cell
46Stream-Based Spatial Clustering
- algorithm characteristics
- features
- streams input and output through small in-core
buffer - connectivity information available, therefore
quality improved - surface boundaries preserved
- edge-connected clustering reduces pinching and
other non-manifold cases - drawbacks
- cluster grid not adaptive
- but easily could be, e.g. as in Shaffer Garland
01 - non-manifolds still possible
- as in unconstrained edge collapse methods
47Stream-Based Spatial Clustering
ResultsTopological Quality
OoCS 3,366 of 33,053 vertices non-manifold
Stream-Based 897 of 35,134 vertices non-manifold
48Stream-Based Spatial Clustering ResultsResource
Usage
- memory usage
- simplifying St. Matthew from 373M to 23M
triangles - OoCS 3,282 MB of RAM
- stream-based clustering 121 MB (27 times less)
- simplification speed (compressed mesh input)
- OoCS 67 minutes
- stream-based clustering 83 minutes
- overhead due to maintaining per-cell cluster trees
49Stream-Based Edge CollapseWu Kobbelt 03
- algorithm overview
- read coherent triangle soup
- reconstruct connectivity in-core usinggeometric
hashing on vertex coordinates - use fixed-size in-core triangle buffer
- interleave batches of read, decimate, and write
operations - collapse edges not adjacent to input/output
stream boundaries - avoid priority queues using multiple choice
selection - choose best of N randomly selected candidates
figure courtesy of Leif Kobbelt
50Stream-Based Edge Collapse
- algorithm characteristics
- features
- out-of-core error-driven edge collapse with no
stitching artifacts - fast 30K triangles per second
- easy to implement
- can specify exact target size or error tolerance
- fixed target size implies nearly uniform
coarsening - drawbacks
- geometric hashing adds overhead
- cannot distinguish stream boundary from surface
boundary - surface boundaries not simplified until entire
mesh read - may clog stream buffer
51Stream-Based Edge CollapseIsenburg et al. 03
- algorithm overview
- extension of Wu Kobbelt 03
- reads compressed mesh instead of triangle soup
- no geometric hashing needed ? faster execution
- 50-70K triangles per second on this 2 GHz laptop
- stream and surface boundariesdistinguished ?
less memory and/orhigher quality - 100 MB to simplify St. Matthew
- output triangle order chosen topreserve mesh
coherence forsubsequent stream-based processing
52Talk Overview
- introduction
- spatial clustering
- surface segmentation
- streaming
- summary
53Summary of Simplification Methods
- spatial clustering
- clusters vertices based on spatial proximity
- adaptive space partitioning possible
- features
- very fast (50400K triangles per second)
- simple to implement
- drawbacks
- low quality results
- topology not preserved, non-manifold simplices
possible - use when
- time or space is at a premium
- topology simplification is desired
54Summary (continued)
- surface segmentation
- clusters vertices primarily based on error
- iterative simplification lends itself to
progressive mesh output - features
- high quality results
- can preserve topology
- drawbacks
- rather slow (1-10K triangles per second)
- must implement iterative method plus external
memory support - use when
- quality is more important than speed
- progressive streaming or view-dependent rendering
is needed
55Summary (continued)
- streaming
- clusters vertices either based on spatial or
error-based criteria - features
- mesh quality governed by size of user-specified
stream buffer - low memory requirements
- weakly input sensitive O(?n)
- fast and highly parallelizable via pipelining
- delay between input and output small
- single-pass, linear time complexity
- works well in tandem with other out-of-core
processing,e.g. compression, denoising,
analysis, - drawbacks
- not obvious how to process multiresolution meshes
(progressive streaming)
56Future Work
- improved spatial clustering methods
- metric spaces other than Euclidean
- cluster based on surface geometry (normals,
curvature) - hybrid methods
- Garland Shaffer 02
- first-phase spatial clustering using quadric
error metric - pass quadric information to second-phase edge
collapse - efficient construction of stream-based
representations - alternatives to conventional simplification
- out-of-core remeshing and similar techniques
57Acknowledgements
- thanks to
- the LLNL ASCI VIEWS team for datasets and support
- the Digital Michelangelo Project for sharing
their datasets - Yi-Jen Chiang, Paolo Cignoni, Jihad El-Sana,
Michael Garland, Hugues Hoppe, and Leif Kobbelt
for contributing figures and images - Eric Shaffer for providing simplified meshes
58References
- F. Bernardini et al. Building a Digital Model
of Michelangelos Florentine Pietà. Computer
Graphics and Applications 22(1) 2002, pp. 59-67. - P. Choudhury B. Watson. Completely Adaptive
Simplification of Massive Meshes. Northwestern
University tech. report CS-02-09, 2002. - P. Cignoni et al. External Memory Management
and Simplification of Huge Meshes. Transactions
on Vis. and Computer Graphics 9(4) 2003, pp.
525-537. - J. El-Sana Y.-J. Chiang. External Memory
View-Dependent Simplification. Computer
Graphics Forum 19(3) 2000, pp. 139-150. - Fei et al. An Adaptive Sampling Scheme for
Out-of-Core Simplification. Computer Graphics
Forum 21(2) 2002, pp. 111-119. - Fei et al. Detail Calibration for Out-of-Core
Model Simplification through Interlaced
Sampling. SIGGRAPH 2002 tech. sketch, p. 166. - M. Garland E. Shaffer. A Multiphase Approach
to Efficient Surface Simplification.
Visualization 02, pp. 117-124. - H. Hoppe. Smooth View-Dependent Level-of-Detail
Control and its Application to Terrain
Rendering. Visualization 98, pp. 35-42.
59References (continued)
- M. Isenburg et al. Large Mesh Simplification
using Processing Sequences. Visualization 03,
to appear. - P. Lindstrom. Out-of-Core Simplification of
Large Polygonal Models. SIGGRAPH 2000, pp.
259-262. - P. Lindstrom C. T. Silva. A Memory
Insensitive Technique for Large Model
Simplification. Visualization 01, pp. 121-126. - C. Prince. Progressive Meshes for Large Models
of Arbitrary Topology. Masters Thesis,
University of Washington, 2000. - J. Wu L. Kobbelt. A Stream Algorithm for the
Decimation of Massive Meshes. Graphics
Interface 03, pp. 185-192.