23
Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Michael Garland Paul S. Heckbert Paul S. Heckbert Carnegie Mellon University Carnegie Mellon University October 1998 October 1998

Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Embed Size (px)

Citation preview

Page 1: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Simplifying Surfaces with Color and Texture using Quadric Error Metrics

Michael GarlandMichael GarlandPaul S. HeckbertPaul S. Heckbert

Carnegie Mellon UniversityCarnegie Mellon University

October 1998October 1998

Michael GarlandMichael GarlandPaul S. HeckbertPaul S. Heckbert

Carnegie Mellon UniversityCarnegie Mellon University

October 1998October 1998

Page 2: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

OverviewOften want to simplify overly complex modelsOften want to simplify overly complex models• Too much for hardware, or simply over-sampledToo much for hardware, or simply over-sampled

• Common sources: Scanning & ReconstructionCommon sources: Scanning & Reconstruction

Quadric-based simplification Quadric-based simplification [SIGGRAPH 97][SIGGRAPH 97]

• Fast method producing quality resultsFast method producing quality results

• Convenient characterization of error/shapeConvenient characterization of error/shape

Generalization required to handle propertiesGeneralization required to handle properties• Color, texture, surface normals, etc.Color, texture, surface normals, etc.

Often want to simplify overly complex modelsOften want to simplify overly complex models• Too much for hardware, or simply over-sampledToo much for hardware, or simply over-sampled

• Common sources: Scanning & ReconstructionCommon sources: Scanning & Reconstruction

Quadric-based simplification Quadric-based simplification [SIGGRAPH 97][SIGGRAPH 97]

• Fast method producing quality resultsFast method producing quality results

• Convenient characterization of error/shapeConvenient characterization of error/shape

Generalization required to handle propertiesGeneralization required to handle properties• Color, texture, surface normals, etc.Color, texture, surface normals, etc.

Page 3: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Geometric Surface Simplification

1,087,716 faces1,087,716 faces 20,000 faces20,000 faces 1,000 faces1,000 faces

4 sec.4 sec.175 sec.175 sec.

Page 4: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Fundamental Quadric-BasedSimplification AlgorithmIterative edge contractionIterative edge contraction

Quadric error metricQuadric error metric• Each vertex has (conceptual) set of planesEach vertex has (conceptual) set of planes

• Vertex error = sum of squared distances to Vertex error = sum of squared distances to planesplanes

• Combine sets when contracting vertex pairCombine sets when contracting vertex pair

Iterative edge contractionIterative edge contraction

Quadric error metricQuadric error metric• Each vertex has (conceptual) set of planesEach vertex has (conceptual) set of planes

• Vertex error = sum of squared distances to Vertex error = sum of squared distances to planesplanes

• Combine sets when contracting vertex pairCombine sets when contracting vertex pair

Page 5: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Measuring Error with QuadricsGiven 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

Q c( , , )A b

measuring squared distance to given plane asmeasuring squared distance to given plane asmeasuring squared distance to given plane asmeasuring squared distance to given plane as

czyx

bbbzyx

aaaaaaaaa

zyx

cQ

321

332313

232212

131211

2

2)( vbvAvv TT

Page 6: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Measuring Error with Quadrics Each vertex has an associated quadricEach vertex has an associated quadric• Measures error at vertexMeasures error at vertex

• Sum quadrics when contracting pairSum quadrics when contracting pair

Sum of endpoint quadrics determines v’Sum of endpoint quadrics determines v’• Fixed placement: select Fixed placement: select vv1 1 or or vv22

• Optimal placement: choose Optimal placement: choose v’v’ minimizing minimizing Q(v’)Q(v’)

Each vertex has an associated quadricEach vertex has an associated quadric• Measures error at vertexMeasures error at vertex

• Sum quadrics when contracting pairSum quadrics when contracting pair

Sum of endpoint quadrics determines v’Sum of endpoint quadrics determines v’• Fixed placement: select Fixed placement: select vv1 1 or or vv22

• Optimal placement: choose Optimal placement: choose v’v’ minimizing minimizing Q(v’)Q(v’)

v A b1 is optimal vertex

Page 7: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

A Simple Example:Contraction & “Planes” in 2DLines defined by neighboring segmentsLines defined by neighboring segments• Determine position of new vertexDetermine position of new vertex

• Error isocontours shown on rightError isocontours shown on right

Lines defined by neighboring segmentsLines defined by neighboring segments• Determine position of new vertexDetermine position of new vertex

• Error isocontours shown on rightError isocontours shown on right

OriginalOriginalOriginalOriginal After 1 StepAfter 1 StepAfter 1 StepAfter 1 Step

vv11vv11vv22vv22

v’v’v’v’

Page 8: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Visualizing Quadrics in 3-DQuadric isosurfacesQuadric isosurfaces

• Are ellipsoidsAre ellipsoids(maybe degenerate)(maybe degenerate)

• Characterize shapeCharacterize shape

• Stretch in least Stretch in least curved directionscurved directions

• Eigenvalues propor-Eigenvalues propor-tional to principal tional to principal curvaturescurvatures

Quadric isosurfacesQuadric isosurfaces

• Are ellipsoidsAre ellipsoids(maybe degenerate)(maybe degenerate)

• Characterize shapeCharacterize shape

• Stretch in least Stretch in least curved directionscurved directions

• Eigenvalues propor-Eigenvalues propor-tional to principal tional to principal curvaturescurvatures

Page 9: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Quadrics Give Good Results,But Ignores AttributesFundamental algorithm works wellFundamental algorithm works well• Simple to implement & simplification is fastSimple to implement & simplification is fast

• High quality approximationsHigh quality approximations

• Quadrics record useful information about shapeQuadrics record useful information about shape

But many models have additional But many models have additional propertiesproperties• Color, texture, normals, etc.Color, texture, normals, etc.

• Need to simplify these as wellNeed to simplify these as well

Fundamental algorithm works wellFundamental algorithm works well• Simple to implement & simplification is fastSimple to implement & simplification is fast

• High quality approximationsHigh quality approximations

• Quadrics record useful information about shapeQuadrics record useful information about shape

But many models have additional But many models have additional propertiesproperties• Color, texture, normals, etc.Color, texture, normals, etc.

• Need to simplify these as wellNeed to simplify these as well

Page 10: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Gouraud Shaded Surface:Single RGB Value Per Vertex

Surface geometrySurface geometry Radiosity solutionRadiosity solution

Page 11: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Surface Properties asVertex AttributesEach vertex has a set of propertiesEach vertex has a set of properties• Each property has Each property has oneone unique value per vertex unique value per vertex

• Attributes are linearly interpolated over facesAttributes are linearly interpolated over faces

• Primary example: one RGB color per vertexPrimary example: one RGB color per vertex

Can’t treat geometry & color separatelyCan’t treat geometry & color separately• Position and color are correlatedPosition and color are correlated

• Optimal position may lie off the surfaceOptimal position may lie off the surface

• Must synthesize new color for this positionMust synthesize new color for this position

Each vertex has a set of propertiesEach vertex has a set of properties• Each property has Each property has oneone unique value per vertex unique value per vertex

• Attributes are linearly interpolated over facesAttributes are linearly interpolated over faces

• Primary example: one RGB color per vertexPrimary example: one RGB color per vertex

Can’t treat geometry & color separatelyCan’t treat geometry & color separately• Position and color are correlatedPosition and color are correlated

• Optimal position may lie off the surfaceOptimal position may lie off the surface

• Must synthesize new color for this positionMust synthesize new color for this position

Page 12: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Vertex Attributes BecomeAdded DimensionsTreat each vertex as a 6-vector [x y z r g b]Treat each vertex as a 6-vector [x y z r g b]• Assume this 6-D space is EuclideanAssume this 6-D space is Euclidean

– Of course, color space is only roughly Of course, color space is only roughly EuclideanEuclidean

• Scale Scale xyzxyz space to unit cube for consistency space to unit cube for consistency

Triangle determines a 2-plane in 6-D spaceTriangle determines a 2-plane in 6-D space• Can measure squared distance to this planeCan measure squared distance to this plane

• Distance along all perpendicular directionsDistance along all perpendicular directions

– Generalized Pythagorean TheoremGeneralized Pythagorean Theorem

Treat each vertex as a 6-vector [x y z r g b]Treat each vertex as a 6-vector [x y z r g b]• Assume this 6-D space is EuclideanAssume this 6-D space is Euclidean

– Of course, color space is only roughly Of course, color space is only roughly EuclideanEuclidean

• Scale Scale xyzxyz space to unit cube for consistency space to unit cube for consistency

Triangle determines a 2-plane in 6-D spaceTriangle determines a 2-plane in 6-D space• Can measure squared distance to this planeCan measure squared distance to this plane

• Distance along all perpendicular directionsDistance along all perpendicular directions

– Generalized Pythagorean TheoremGeneralized Pythagorean Theorem

Page 13: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Generalized Quadric Metric

Squared distance to 2-plane has same form:Squared distance to 2-plane has same form:

• A:A: 6x6 matrix 6x6 matrix v,b:v,b: 6-vectors 6-vectors c:c: scalar (for scalar (for RGB)RGB)

• Underlying algorithm remains the sameUnderlying algorithm remains the same

May want to selectively weight channelsMay want to selectively weight channels• Relative importance of space & colorRelative importance of space & color

• Relative importance of red & greenRelative importance of red & green

Squared distance to 2-plane has same form:Squared distance to 2-plane has same form:

• A:A: 6x6 matrix 6x6 matrix v,b:v,b: 6-vectors 6-vectors c:c: scalar (for scalar (for RGB)RGB)

• Underlying algorithm remains the sameUnderlying algorithm remains the same

May want to selectively weight channelsMay want to selectively weight channels• Relative importance of space & colorRelative importance of space & color

• Relative importance of red & greenRelative importance of red & green

Q c( )v v Av b v T T2

Page 14: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Generalized Quadric MetricCommon property typesCommon property types

VertexVertexDimensionDimension

• ColorColor [x y z r g b][x y z r g b] 6x6 quadrics6x6 quadrics

• TextureTexture [x y z s t][x y z s t] 5x5 5x5 quadricsquadrics

• NormalNormal [x y z u v w][x y z u v w] 6x6 6x6 quadricsquadrics

• Color+NormalColor+Normal [x y z r g b u v w][x y z r g b u v w] 9x9 9x9 quadricsquadrics

Common property typesCommon property types

VertexVertexDimensionDimension

• ColorColor [x y z r g b][x y z r g b] 6x6 quadrics6x6 quadrics

• TextureTexture [x y z s t][x y z s t] 5x5 5x5 quadricsquadrics

• NormalNormal [x y z u v w][x y z u v w] 6x6 6x6 quadricsquadrics

• Color+NormalColor+Normal [x y z r g b u v w][x y z r g b u v w] 9x9 9x9 quadricsquadrics

Page 15: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Simplifying the Dragon Model

50,761 faces50,761 faces 10,000 faces10,000 faces

20 sec.20 sec.

Page 16: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Simplifying the Dragon Model

50,761 faces50,761 faces 1,500 faces1,500 faces

23 sec.23 sec.

Page 17: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Simplified Dragon Mesh

50,761 faces50,761 faces 1,500 faces1,500 faces

23 sec.23 sec.

Page 18: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

A Sample Textured Surface

Page 19: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Simplifying Geometry Only:Same Texture Coordinates

Page 20: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Simplifying with xyzst Quadrics;New Texture Coordinates

Page 21: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Related WorkFairly few algorithms address attributesFairly few algorithms address attributes• Re-sampling height field attributes Re-sampling height field attributes

• Mesh optimization methods Mesh optimization methods [Hoppe 96][Hoppe 96]

• Attribute map preservation Attribute map preservation [Cohen et al 98][Cohen et al 98]

In comparison, our algorithm isIn comparison, our algorithm is• Not limited to simple height field re-samplingNot limited to simple height field re-sampling

• Faster than other general algorithmsFaster than other general algorithms

• Still capable of producing quality resultsStill capable of producing quality results

Fairly few algorithms address attributesFairly few algorithms address attributes• Re-sampling height field attributes Re-sampling height field attributes

• Mesh optimization methods Mesh optimization methods [Hoppe 96][Hoppe 96]

• Attribute map preservation Attribute map preservation [Cohen et al 98][Cohen et al 98]

In comparison, our algorithm isIn comparison, our algorithm is• Not limited to simple height field re-samplingNot limited to simple height field re-sampling

• Faster than other general algorithmsFaster than other general algorithms

• Still capable of producing quality resultsStill capable of producing quality results

Page 22: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

SummaryGeneralized quadric metricGeneralized quadric metric• Handles surfaces with per vertex attributesHandles surfaces with per vertex attributes

• Rapidly produces quality approximationsRapidly produces quality approximations

Future workFuture work• Handling attribute discontinuitiesHandling attribute discontinuities

• Other attribute typesOther attribute types

• Attribute characteristics necessary for Attribute characteristics necessary for successsuccess

Generalized quadric metricGeneralized quadric metric• Handles surfaces with per vertex attributesHandles surfaces with per vertex attributes

• Rapidly produces quality approximationsRapidly produces quality approximations

Future workFuture work• Handling attribute discontinuitiesHandling attribute discontinuities

• Other attribute typesOther attribute types

• Attribute characteristics necessary for Attribute characteristics necessary for successsuccess

Page 23: Simplifying Surfaces with Color and Texture using Quadric Error Metrics Michael Garland Paul S. Heckbert Carnegie Mellon University October 1998 Michael

Further Details OnlineOnline papers,Online papers,

Sample models,Sample models,

Experimental codeExperimental code

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

Online papers,Online papers,

Sample models,Sample models,

Experimental codeExperimental code

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