scalable, high-quality mesh simplification michael garland eric shaffer university of illinois at...

19
Scalable, High-Quality Mesh Simplification Michael Garland Michael Garland Eric Shaffer Eric Shaffer University of Illinois at Urbana–Champaign University of Illinois at Urbana–Champaign

Upload: archibald-baldric-day

Post on 03-Jan-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Scalable, High-QualityMesh Simplification

Michael GarlandMichael Garland

Eric ShafferEric ShafferUniversity of Illinois at Urbana–University of Illinois at Urbana–ChampaignChampaign

Michael GarlandMichael Garland

Eric ShafferEric ShafferUniversity of Illinois at Urbana–University of Illinois at Urbana–ChampaignChampaign

Page 2: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Typical Simplification Problem

1,765,388 1,765,388 facesfaces 420,000 faces420,000 faces 80,000 faces80,000 faces

Page 3: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

One Common Solution

Greedy iterative contractionGreedy iterative contraction• edges (or vertex pairs) are most common, faces also edges (or vertex pairs) are most common, faces also

usedused

Starting with the original model, iterativelyStarting with the original model, iteratively• rank all edges with some cost metricrank all edges with some cost metric• contract minimum cost edgecontract minimum cost edge• update edge costsupdate edge costs

Greedy iterative contractionGreedy iterative contraction• edges (or vertex pairs) are most common, faces also edges (or vertex pairs) are most common, faces also

usedused

Starting with the original model, iterativelyStarting with the original model, iteratively• rank all edges with some cost metricrank all edges with some cost metric• contract minimum cost edgecontract minimum cost edge• update edge costsupdate edge costs

Page 4: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Quadric Error Metric

Given a plane, we can define a Given a plane, we can define a quadricquadric Q QGiven a plane, we can define a Given a plane, we can define a quadricquadric Q Q

measuring squared distance of point to planemeasuring squared distance of point to planemeasuring squared distance of point to planemeasuring squared distance of point to plane

( )

a ab ac x x

Q x y z ab b bc y ad bd cd y d

ac bc c z z

v ( )

a ab ac x x

Q x y z ab b bc y ad bd cd y d

ac bc c z z

v

T T( )Q c v v Av b vT T( )Q c v v Av b v

T( , , ) ( , , )Q c d d A b nn nT( , , ) ( , , )Q c d d A b nn n

Page 5: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Quadric Error Metric

Sum of quadrics represents set of planesSum of quadrics represents set of planes

Each voxel has an associated quadricEach voxel has an associated quadric• sum of quadrics for faces with corner in voxelsum of quadrics for faces with corner in voxel

• find find representative pointrepresentative point vv** minimizing minimizing QQ((vv**))

Sum of quadrics represents set of planesSum of quadrics represents set of planes

Each voxel has an associated quadricEach voxel has an associated quadric• sum of quadrics for faces with corner in voxelsum of quadrics for faces with corner in voxel

• find find representative pointrepresentative point vv** minimizing minimizing QQ((vv**))

T( ) ( ) ( )i i i ii i i

d Q Q

n v v vT( ) ( ) ( )i i i ii i i

d Q Q

n v v v

* *( )Q v Av b* *( )Q v Av b

Page 6: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Fails on Large Models

Massive meshes becoming more Massive meshes becoming more commoncommon• DOE ASCI ProgramDOE ASCI Program

– isosurface data, ~500M trianglesisosurface data, ~500M triangles

• Stanford Digital Michelangelo ProjectStanford Digital Michelangelo Project– range scan data, up to 1B trianglesrange scan data, up to 1B triangles

• Traditional simplification methods fail!Traditional simplification methods fail!

Massive meshes becoming more Massive meshes becoming more commoncommon• DOE ASCI ProgramDOE ASCI Program

– isosurface data, ~500M trianglesisosurface data, ~500M triangles

• Stanford Digital Michelangelo ProjectStanford Digital Michelangelo Project– range scan data, up to 1B trianglesrange scan data, up to 1B triangles

• Traditional simplification methods fail!Traditional simplification methods fail!

8.2 million triangles @ 2 mm resolution

Page 7: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Why Traditional Methods Fail

Have Have input sensitiveinput sensitive memory requirements memory requirements• load entire model + auxiliary structures into load entire model + auxiliary structures into

RAMRAM

Iteratively contract edge of “least cost”Iteratively contract edge of “least cost”• large data structures with poor memory localitylarge data structures with poor memory locality

• takes takes manymany iterations to produce a result iterations to produce a result

An example from Lindstrom & Turk method:An example from Lindstrom & Turk method:• 160 bytes/vertex — removes 1 vertex/iteration160 bytes/vertex — removes 1 vertex/iteration

• 400M input triangles = 30GB + 1 week400M input triangles = 30GB + 1 week

Have Have input sensitiveinput sensitive memory requirements memory requirements• load entire model + auxiliary structures into load entire model + auxiliary structures into

RAMRAM

Iteratively contract edge of “least cost”Iteratively contract edge of “least cost”• large data structures with poor memory localitylarge data structures with poor memory locality

• takes takes manymany iterations to produce a result iterations to produce a result

An example from Lindstrom & Turk method:An example from Lindstrom & Turk method:• 160 bytes/vertex — removes 1 vertex/iteration160 bytes/vertex — removes 1 vertex/iteration

• 400M input triangles = 30GB + 1 week400M input triangles = 30GB + 1 week

Page 8: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Out of Core Simplification

Single pass spatial clusteringSingle pass spatial clustering• partition space into cellspartition space into cells

• merge all vertices within each cellmerge all vertices within each cell

Two common partition typesTwo common partition types• uniform grid uniform grid [Lindstrom 00][Lindstrom 00]

• BSP tree BSP tree [Shaffer & Garland 01][Shaffer & Garland 01]

Single pass spatial clusteringSingle pass spatial clustering• partition space into cellspartition space into cells

• merge all vertices within each cellmerge all vertices within each cell

Two common partition typesTwo common partition types• uniform grid uniform grid [Lindstrom 00][Lindstrom 00]

• BSP tree BSP tree [Shaffer & Garland 01][Shaffer & Garland 01]

Page 9: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

But Gives Low Quality Output

OriginalOriginal Uniform gridUniform grid(1100 faces)(1100 faces)

BSP treeBSP tree(1000 faces)(1000 faces)

Page 10: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Want Truly General Method

Able to process meshes of arbitrary sizeAble to process meshes of arbitrary size• output-sensitive memory usageoutput-sensitive memory usage

• scan through input a minimal number of scan through input a minimal number of timestimes

• like out-of-core clustering methodslike out-of-core clustering methods

Produce high quality approximationsProduce high quality approximations• even at low output resolutionseven at low output resolutions

• like iterative contraction algorithmslike iterative contraction algorithms

Able to process meshes of arbitrary sizeAble to process meshes of arbitrary size• output-sensitive memory usageoutput-sensitive memory usage

• scan through input a minimal number of scan through input a minimal number of timestimes

• like out-of-core clustering methodslike out-of-core clustering methods

Produce high quality approximationsProduce high quality approximations• even at low output resolutionseven at low output resolutions

• like iterative contraction algorithmslike iterative contraction algorithms

Page 11: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Multiphase Method: Do Both!

Phase I: Uniform clusteringPhase I: Uniform clustering• perform out-of-core clustering (uniform grid)perform out-of-core clustering (uniform grid)

• produce intermediate vertices + facesproduce intermediate vertices + faces

• and 1 quadric per vertexand 1 quadric per vertex

Phase II: Iterative edge contractionPhase II: Iterative edge contraction• beginning with quadrics from Phase Ibeginning with quadrics from Phase I

• iteratively contract edge of least cost as beforeiteratively contract edge of least cost as before

Phases are Phases are coupled togethercoupled together by quadrics by quadrics

Phase I: Uniform clusteringPhase I: Uniform clustering• perform out-of-core clustering (uniform grid)perform out-of-core clustering (uniform grid)

• produce intermediate vertices + facesproduce intermediate vertices + faces

• and 1 quadric per vertexand 1 quadric per vertex

Phase II: Iterative edge contractionPhase II: Iterative edge contraction• beginning with quadrics from Phase Ibeginning with quadrics from Phase I

• iteratively contract edge of least cost as beforeiteratively contract edge of least cost as before

Phases are Phases are coupled togethercoupled together by quadrics by quadrics

Page 12: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Scalable AlgorithmProducing Quality Results

OriginalOriginal8 million 8 million

facesfaces

Uniform gridUniform grid(46 seconds)(46 seconds)

MultiphaseMultiphase(65 seconds)(65 seconds)

Page 13: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Not Just Two PassesOriginalOriginal

MultiphaseMultiphase

Separate passesSeparate passes

QSlimQSlim

Page 14: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Quality Similar to QSlim

OriginalOriginal QSlimQSlim MultiphaseMultiphase

Page 15: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Time/Error Tradeoff

Page 16: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

What Are Allowable Phases?

Must accept as input:Must accept as input:• vertices + faces + per vertex quadricsvertices + faces + per vertex quadrics

Must produce as output:Must produce as output:• vertices + faces + per vertex quadricsvertices + faces + per vertex quadrics

• input vertices map to output verticesinput vertices map to output vertices– adjacent input vertices either map to the same adjacent input vertices either map to the same

output vertex or adjacent output verticesoutput vertex or adjacent output vertices

• output quadrics are sum of input quadrics for output quadrics are sum of input quadrics for input vertices that map to given output vertexinput vertices that map to given output vertex

Must accept as input:Must accept as input:• vertices + faces + per vertex quadricsvertices + faces + per vertex quadrics

Must produce as output:Must produce as output:• vertices + faces + per vertex quadricsvertices + faces + per vertex quadrics

• input vertices map to output verticesinput vertices map to output vertices– adjacent input vertices either map to the same adjacent input vertices either map to the same

output vertex or adjacent output verticesoutput vertex or adjacent output vertices

• output quadrics are sum of input quadrics for output quadrics are sum of input quadrics for input vertices that map to given output vertexinput vertices that map to given output vertex

Page 17: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Deconstructing Simplification

View simplification as 2-step clusteringView simplification as 2-step clustering• compute partition of vertex setcompute partition of vertex set

• unify vertices within each subsetunify vertices within each subset– compute representative position for each subsetcompute representative position for each subset

This encompasses 2 common methodsThis encompasses 2 common methods• spatial vertex clustering (e.g., uniform grid)spatial vertex clustering (e.g., uniform grid)

• iterative edge (or vertex pair) contractioniterative edge (or vertex pair) contraction

View simplification as 2-step clusteringView simplification as 2-step clustering• compute partition of vertex setcompute partition of vertex set

• unify vertices within each subsetunify vertices within each subset– compute representative position for each subsetcompute representative position for each subset

This encompasses 2 common methodsThis encompasses 2 common methods• spatial vertex clustering (e.g., uniform grid)spatial vertex clustering (e.g., uniform grid)

• iterative edge (or vertex pair) contractioniterative edge (or vertex pair) contraction

Page 18: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Clustering via Contraction

Iterative contraction builds up vertex setsIterative contraction builds up vertex sets• vertices of original are singleton setsvertices of original are singleton sets

• contraction merges two setscontraction merges two sets

Iterative contraction builds up vertex setsIterative contraction builds up vertex sets• vertices of original are singleton setsvertices of original are singleton sets

• contraction merges two setscontraction merges two sets

Page 19: Scalable, High-Quality Mesh Simplification Michael Garland Eric Shaffer University of Illinois at Urbana–Champaign Michael Garland Eric Shaffer University

Where Does This Lead Us?

Any partitioning algorithm is applicableAny partitioning algorithm is applicable• including the usual onesincluding the usual ones

• others like MeTIS, others like MeTIS, kk-means clustering, …-means clustering, …

• key distinction: spatial vs. graph partitioningkey distinction: spatial vs. graph partitioning

Formal separation of two distinct Formal separation of two distinct policiespolicies• how to select a vertex partitionhow to select a vertex partition

• how to select a representative vertexhow to select a representative vertex

Any partitioning algorithm is applicableAny partitioning algorithm is applicable• including the usual onesincluding the usual ones

• others like MeTIS, others like MeTIS, kk-means clustering, …-means clustering, …

• key distinction: spatial vs. graph partitioningkey distinction: spatial vs. graph partitioning

Formal separation of two distinct Formal separation of two distinct policiespolicies• how to select a vertex partitionhow to select a vertex partition

• how to select a representative vertexhow to select a representative vertex