surface simplification using quadric error metrics

29
Surface Simplification Using Quadric Error Metrics Michael Garland Michael Garland Paul S. Heckbert Paul S. Heckbert August 1997 August 1997 Carnegi Mellon

Upload: gypsy

Post on 05-Jan-2016

67 views

Category:

Documents


0 download

DESCRIPTION

Surface Simplification Using Quadric Error Metrics. Michael Garland Paul S. Heckbert August 1997. Surface Simplification. Overview. Fast algorithm & good quality approximation Practical trade-off of efficiency and quality Convenient characterization of error/shape Compact & efficient - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Surface Simplification Using Quadric Error Metrics

Surface Simplification Using Quadric Error Metrics

Michael GarlandMichael GarlandPaul S. HeckbertPaul S. Heckbert

August 1997August 1997

Michael GarlandMichael GarlandPaul S. HeckbertPaul S. Heckbert

August 1997August 1997

Carnegie MellonCarnegie Mellon

Page 2: Surface Simplification Using Quadric Error Metrics

Surface Simplification

Page 3: Surface Simplification Using Quadric Error Metrics

OverviewFast algorithm & good quality Fast algorithm & good quality approximationapproximation• Practical trade-off of efficiency and qualityPractical trade-off of efficiency and quality

Convenient characterization of error/shapeConvenient characterization of error/shape• Compact & efficientCompact & efficient

Fairly general surface handlingFairly general surface handling• Simplify non-manifold surfacesSimplify non-manifold surfaces

• Simplify topology as well as geometrySimplify topology as well as geometry

Fast algorithm & good quality Fast algorithm & good quality approximationapproximation• Practical trade-off of efficiency and qualityPractical trade-off of efficiency and quality

Convenient characterization of error/shapeConvenient characterization of error/shape• Compact & efficientCompact & efficient

Fairly general surface handlingFairly general surface handling• Simplify non-manifold surfacesSimplify non-manifold surfaces

• Simplify topology as well as geometrySimplify topology as well as geometry

Page 4: Surface Simplification Using Quadric Error Metrics

Surface Simplification:Our World ViewSimplify overly complex models rapidlySimplify overly complex models rapidly• Minimize error between original and approximateMinimize error between original and approximate

Produce multiresolution models for renderingProduce multiresolution models for rendering• Appearance is paramountAppearance is paramount

– Holes and gaps usually disappear in the distanceHoles and gaps usually disappear in the distance

– Topology can be simplifiedTopology can be simplified

• Want fine-grained operation for altering surfaceWant fine-grained operation for altering surface

Simplify overly complex models rapidlySimplify overly complex models rapidly• Minimize error between original and approximateMinimize error between original and approximate

Produce multiresolution models for renderingProduce multiresolution models for rendering• Appearance is paramountAppearance is paramount

– Holes and gaps usually disappear in the distanceHoles and gaps usually disappear in the distance

– Topology can be simplifiedTopology can be simplified

• Want fine-grained operation for altering surfaceWant fine-grained operation for altering surface

Page 5: Surface Simplification Using Quadric Error Metrics

Assumptions About InputTriangulated model with valid connectivityTriangulated model with valid connectivity• Corners which coincide in space share verticesCorners which coincide in space share vertices

Surface need not have manifold topologySurface need not have manifold topology• Edges can border any number of facesEdges can border any number of faces

• Vertices shared by arbitrary collection of facesVertices shared by arbitrary collection of faces

Application domain does not rely on Application domain does not rely on topologytopology• Medical Imaging: can’t leave out hole in the Medical Imaging: can’t leave out hole in the

heartheart

Triangulated model with valid connectivityTriangulated model with valid connectivity• Corners which coincide in space share verticesCorners which coincide in space share vertices

Surface need not have manifold topologySurface need not have manifold topology• Edges can border any number of facesEdges can border any number of faces

• Vertices shared by arbitrary collection of facesVertices shared by arbitrary collection of faces

Application domain does not rely on Application domain does not rely on topologytopology• Medical Imaging: can’t leave out hole in the Medical Imaging: can’t leave out hole in the

heartheart

Page 6: Surface Simplification Using Quadric Error Metrics

Our Basic Operation:Vertex Pair ContractionContract vertex pair Contract vertex pair (v(v11,v,v22) ) v’ v’

• Move vMove v11 and v and v22 to position v’ to position v’

• Replace all occurrences of vReplace all occurrences of v22 with v with v11

• Remove vRemove v22 and degenerate triangles and degenerate triangles

• Typically, we contract edges, as others have Typically, we contract edges, as others have donedone

Contract vertex pair Contract vertex pair (v(v11,v,v22) ) v’ v’

• Move vMove v11 and v and v22 to position v’ to position v’

• Replace all occurrences of vReplace all occurrences of v22 with v with v11

• Remove vRemove v22 and degenerate triangles and degenerate triangles

• Typically, we contract edges, as others have Typically, we contract edges, as others have donedone

Page 7: Surface Simplification Using Quadric Error Metrics

300300

Simplifying a Cow inUnder One Second

5,8045,804

800800

100100

Page 8: Surface Simplification Using Quadric Error Metrics

How We Measure ErrorMeasure error at current verticesMeasure error at current vertices

For a given point v, measure sum of squared For a given point v, measure sum of squared distances to associated set of planesdistances to associated set of planes

• Each vertex v has an associated set of planesEach vertex v has an associated set of planes

– Initialize with planes of incident faces in Initialize with planes of incident faces in originaloriginal

– Merge sets when contracting pairsMerge sets when contracting pairs

– Initial error of each vertex is 0Initial error of each vertex is 0

Measure error at current verticesMeasure error at current vertices

For a given point v, measure sum of squared For a given point v, measure sum of squared distances to associated set of planesdistances to associated set of planes

• Each vertex v has an associated set of planesEach vertex v has an associated set of planes

– Initialize with planes of incident faces in Initialize with planes of incident faces in originaloriginal

– Merge sets when contracting pairsMerge sets when contracting pairs

– Initial error of each vertex is 0Initial error of each vertex is 0

Page 9: Surface Simplification Using Quadric Error Metrics

How We Measure ErrorFor a given point v, measure sum of squared For a given point v, measure sum of squared distances to associated set of planesdistances to associated set of planes• Locally, distance to plane equals distance to faceLocally, distance to plane equals distance to face

• More efficient & compact than distance to faceMore efficient & compact than distance to face

• Vertex’s set of planes records its historyVertex’s set of planes records its history

– Ronfard & Rossignac stored these sets explicitlyRonfard & Rossignac stored these sets explicitly

– We track them implicitly using quadricsWe track them implicitly using quadrics

For a given point v, measure sum of squared For a given point v, measure sum of squared distances to associated set of planesdistances to associated set of planes• Locally, distance to plane equals distance to faceLocally, distance to plane equals distance to face

• More efficient & compact than distance to faceMore efficient & compact than distance to face

• Vertex’s set of planes records its historyVertex’s set of planes records its history

– Ronfard & Rossignac stored these sets explicitlyRonfard & Rossignac stored these sets explicitly

– We track them implicitly using quadricsWe track them implicitly using quadrics

Page 10: Surface Simplification Using Quadric Error Metrics

Measuring Error With Quadrics

• Each plane p defines a quadric matrix KEach plane p defines a quadric matrix Kpp

• Set of planes represented by sum of quadricsSet of planes represented by sum of quadrics

• Each plane p defines a quadric matrix KEach plane p defines a quadric matrix Kpp

• Set of planes represented by sum of quadricsSet of planes represented by sum of quadrics

vKv)v(Error pT

Sum of squared distance to a set of planesSum of squared distance to a set of planes• Vertex v has associated set of planesVertex v has associated set of planes

• Planes defined by Planes defined by ax+by+cz+dax+by+cz+d = 0, = 0, aa22+b+b22+c+c22==11

Sum of squared distance to a set of planesSum of squared distance to a set of planes• Vertex v has associated set of planesVertex v has associated set of planes

• Planes defined by Planes defined by ax+by+cz+dax+by+cz+d = 0, = 0, aa22+b+b22+c+c22==11

Page 11: Surface Simplification Using Quadric Error Metrics

A quadric matrix A quadric matrix QQ is a 4x4 symmetric is a 4x4 symmetric matrixmatrix

Assigns real number to every point Assigns real number to every point vv by by vvTTQvQv

A quadric matrix A quadric matrix QQ is a 4x4 symmetric is a 4x4 symmetric matrixmatrix

Assigns real number to every point Assigns real number to every point vv by by vvTTQvQv

What’s a Quadric Error Metric?

1zyx

qqqqqqqqqqqqqqqq

1zyx

44342414

34332313

24232212

14131211

Qvv T

Page 12: Surface Simplification Using Quadric Error Metrics

What’s a Quadric Error Metric?We get a 2We get a 2ndnd degree polynomial in x, y, & z degree polynomial in x, y, & z

Level surface Level surface vvTTQvQv = k is a quadric surface = k is a quadric surface• Ellipsoid, paraboloid, hyperboloid, plane, etc.Ellipsoid, paraboloid, hyperboloid, plane, etc.

We get a 2We get a 2ndnd degree polynomial in x, y, & z degree polynomial in x, y, & z

Level surface Level surface vvTTQvQv = k is a quadric surface = k is a quadric surface• Ellipsoid, paraboloid, hyperboloid, plane, etc.Ellipsoid, paraboloid, hyperboloid, plane, etc.

44342

33

24232

22

1413122

11

qzq2zq

q2yzq2yq

xq2xzq2xyq2xq

Qvv T

Page 13: Surface Simplification Using Quadric Error Metrics

But What Are TheseQuadrics Really Doing?

Almost always ellipsoidsAlmost always ellipsoids• When When QQ is positive definite is positive definite

Characterize error at vertexCharacterize error at vertex• Vertex at center of each Vertex at center of each

ellipsoidellipsoid

• Move it anywhere on ellipsoid Move it anywhere on ellipsoid with constant errorwith constant error

Capture local shape of surfaceCapture local shape of surface• Stretch in least curved directionStretch in least curved direction

Almost always ellipsoidsAlmost always ellipsoids• When When QQ is positive definite is positive definite

Characterize error at vertexCharacterize error at vertex• Vertex at center of each Vertex at center of each

ellipsoidellipsoid

• Move it anywhere on ellipsoid Move it anywhere on ellipsoid with constant errorwith constant error

Capture local shape of surfaceCapture local shape of surface• Stretch in least curved directionStretch in least curved direction

Page 14: Surface Simplification Using Quadric Error Metrics

Algorithm OutlineInitializationInitialization• Compute quadric Compute quadric QQ for each vertex for each vertex

• Select set of valid vertex pairs (edges + non-Select set of valid vertex pairs (edges + non-edges)edges)

• Compute minimal cost candidate for each pairCompute minimal cost candidate for each pair

IterationIteration• Select lowest cost pair (vSelect lowest cost pair (v11,v,v22))

• Contract (vContract (v11,v,v22) — ) — QQ for new vertex is for new vertex is QQ11++QQ22

• Update all pairs involving vUpdate all pairs involving v11 & v & v22

InitializationInitialization• Compute quadric Compute quadric QQ for each vertex for each vertex

• Select set of valid vertex pairs (edges + non-Select set of valid vertex pairs (edges + non-edges)edges)

• Compute minimal cost candidate for each pairCompute minimal cost candidate for each pair

IterationIteration• Select lowest cost pair (vSelect lowest cost pair (v11,v,v22))

• Contract (vContract (v11,v,v22) — ) — QQ for new vertex is for new vertex is QQ11++QQ22

• Update all pairs involving vUpdate all pairs involving v11 & v & v22

Page 15: Surface Simplification Using Quadric Error Metrics

Non-Edge Vertex PairsIn addition to edges, select some non-In addition to edges, select some non-edgesedges• Select pairs separated by less than distance Select pairs separated by less than distance

tt

Allows us to simplify topology of objectAllows us to simplify topology of object

In addition to edges, select some non-In addition to edges, select some non-edgesedges• Select pairs separated by less than distance Select pairs separated by less than distance

tt

Allows us to simplify topology of objectAllows us to simplify topology of object

Page 16: Surface Simplification Using Quadric Error Metrics

Video Clip

Page 17: Surface Simplification Using Quadric Error Metrics

Additional Algorithm DetailsOpen boundaries may be eaten awayOpen boundaries may be eaten away• For each edge with a single incident faceFor each edge with a single incident face

– Find plane through edge perpendicular to faceFind plane through edge perpendicular to face

– Assign large weight & add into endpointsAssign large weight & add into endpoints

Contraction may fold mesh over on itselfContraction may fold mesh over on itself• Check normals before & after; reject if any flipCheck normals before & after; reject if any flip

Error metric dependent on initial meshError metric dependent on initial mesh• Weight quadrics by triangle areaWeight quadrics by triangle area

Open boundaries may be eaten awayOpen boundaries may be eaten away• For each edge with a single incident faceFor each edge with a single incident face

– Find plane through edge perpendicular to faceFind plane through edge perpendicular to face

– Assign large weight & add into endpointsAssign large weight & add into endpoints

Contraction may fold mesh over on itselfContraction may fold mesh over on itself• Check normals before & after; reject if any flipCheck normals before & after; reject if any flip

Error metric dependent on initial meshError metric dependent on initial mesh• Weight quadrics by triangle areaWeight quadrics by triangle area

Page 18: Surface Simplification Using Quadric Error Metrics

Sample Model: Stanford Bunny

69,451 faces 1,000 faces (30 sec)

Page 19: Surface Simplification Using Quadric Error Metrics

Sample Model: Stanford Bunny

69,451 faces 100 faces (30 sec)

Page 20: Surface Simplification Using Quadric Error Metrics

Foot Model With ManySeparate Components

Page 21: Surface Simplification Using Quadric Error Metrics

Foot Model Approximation(Edge Contraction Only)

Holes opening

Toes receding

Page 22: Surface Simplification Using Quadric Error Metrics

Foot Model Approximation(Non-edge Selection)

Page 23: Surface Simplification Using Quadric Error Metrics

Sample Model:Crater Lake Terrain Data

Original 199,114 faces 1,000 faces (54 sec)

Page 24: Surface Simplification Using Quadric Error Metrics

Handling Surfaces WithColored VerticesBefore: v = (x,y,z,1) and Q is a 4x4 Before: v = (x,y,z,1) and Q is a 4x4 matrixmatrix

Now: v = (x,y,z,r,g,b,1) and Q is a 7x7 Now: v = (x,y,z,r,g,b,1) and Q is a 7x7 matrixmatrix

Before: v = (x,y,z,1) and Q is a 4x4 Before: v = (x,y,z,1) and Q is a 4x4 matrixmatrix

Now: v = (x,y,z,r,g,b,1) and Q is a 7x7 Now: v = (x,y,z,r,g,b,1) and Q is a 7x7 matrixmatrix

19,404 faces 1,000 face approximation

Page 25: Surface Simplification Using Quadric Error Metrics

Related Prior WorkVertex clustering Vertex clustering [Rossignac-Borrel 93; Low-Tan 96][Rossignac-Borrel 93; Low-Tan 96]

• Partition space; merge vertices within cellsPartition space; merge vertices within cells

• Fast and general, but comparatively low qualityFast and general, but comparatively low quality

Vertex Decimation Vertex Decimation [Schroeder [Schroeder et alet al 92; Soucy-Laurendeau 92; Soucy-Laurendeau

96]96]

• Remove single vertex; retriangulate neighborhoodRemove single vertex; retriangulate neighborhood

• Comparable or lesser quality & typically slowerComparable or lesser quality & typically slower

• Typically limited to manifold regionsTypically limited to manifold regions

• Less aggressive simplificationLess aggressive simplification

Vertex clustering Vertex clustering [Rossignac-Borrel 93; Low-Tan 96][Rossignac-Borrel 93; Low-Tan 96]

• Partition space; merge vertices within cellsPartition space; merge vertices within cells

• Fast and general, but comparatively low qualityFast and general, but comparatively low quality

Vertex Decimation Vertex Decimation [Schroeder [Schroeder et alet al 92; Soucy-Laurendeau 92; Soucy-Laurendeau

96]96]

• Remove single vertex; retriangulate neighborhoodRemove single vertex; retriangulate neighborhood

• Comparable or lesser quality & typically slowerComparable or lesser quality & typically slower

• Typically limited to manifold regionsTypically limited to manifold regions

• Less aggressive simplificationLess aggressive simplification

Page 26: Surface Simplification Using Quadric Error Metrics

Related Prior WorkEdge Collapse Edge Collapse [Hoppe 96; Guéziec 95; Ronfard-[Hoppe 96; Guéziec 95; Ronfard-

Rossignac 96]Rossignac 96]

• Iteratively contract edges; differ in edge Iteratively contract edges; differ in edge selectionselection

• Some higher quality (e.g., Hoppe 96), but Some higher quality (e.g., Hoppe 96), but significantly slowersignificantly slower

• Some comparable quality (e.g., Ronfard-Some comparable quality (e.g., Ronfard-Rossignac), but not as general or efficientRossignac), but not as general or efficient

Edge Collapse Edge Collapse [Hoppe 96; Guéziec 95; Ronfard-[Hoppe 96; Guéziec 95; Ronfard-

Rossignac 96]Rossignac 96]

• Iteratively contract edges; differ in edge Iteratively contract edges; differ in edge selectionselection

• Some higher quality (e.g., Hoppe 96), but Some higher quality (e.g., Hoppe 96), but significantly slowersignificantly slower

• Some comparable quality (e.g., Ronfard-Some comparable quality (e.g., Ronfard-Rossignac), but not as general or efficientRossignac), but not as general or efficient

Page 27: Surface Simplification Using Quadric Error Metrics

SummaryEfficient algorithm with quality resultsEfficient algorithm with quality results• Simple to implement; fast simplificationSimple to implement; fast simplification

• High quality approximationsHigh quality approximations

• Good compromise between highest quality Good compromise between highest quality and fastest simplificationand fastest simplification

Simplifies both geometry and topologySimplifies both geometry and topology

Can also handle surface properties (e.g., Can also handle surface properties (e.g., color)color)

Efficient algorithm with quality resultsEfficient algorithm with quality results• Simple to implement; fast simplificationSimple to implement; fast simplification

• High quality approximationsHigh quality approximations

• Good compromise between highest quality Good compromise between highest quality and fastest simplificationand fastest simplification

Simplifies both geometry and topologySimplifies both geometry and topology

Can also handle surface properties (e.g., Can also handle surface properties (e.g., color)color)

Page 28: Surface Simplification Using Quadric Error Metrics

Future WorkConstructing multiresolution modelsConstructing multiresolution models• Progressive meshes/simplicial complexesProgressive meshes/simplicial complexes

Quality and reliability joining Quality and reliability joining componentscomponents

Planar regions are simplified rather Planar regions are simplified rather randomlyrandomly• Needs some bias towards good planar Needs some bias towards good planar

meshesmeshes

Constructing multiresolution modelsConstructing multiresolution models• Progressive meshes/simplicial complexesProgressive meshes/simplicial complexes

Quality and reliability joining Quality and reliability joining componentscomponents

Planar regions are simplified rather Planar regions are simplified rather randomlyrandomly• Needs some bias towards good planar Needs some bias towards good planar

meshesmeshes

Page 29: Surface Simplification Using Quadric Error Metrics

Further Details & Free StuffFree sample implementation,Free sample implementation,

further information,further information,

available now …available now …

http://www.cs.cmu.edu/~garland/http://www.cs.cmu.edu/~garland/quadrics/quadrics/

Free sample implementation,Free sample implementation,

further information,further information,

available now …available now …

http://www.cs.cmu.edu/~garland/http://www.cs.cmu.edu/~garland/quadrics/quadrics/