Presentation is loading. Please wait.

Presentation is loading. Please wait.

Simplifying Polygonal Surfaces with Quadric Error Metrics Michael Garland University of Illinois at Urbana-Champaign November 1999 Michael Garland University.

Similar presentations


Presentation on theme: "Simplifying Polygonal Surfaces with Quadric Error Metrics Michael Garland University of Illinois at Urbana-Champaign November 1999 Michael Garland University."— Presentation transcript:

1 Simplifying Polygonal Surfaces with Quadric Error Metrics Michael Garland University of Illinois at Urbana-Champaign November 1999 Michael Garland University of Illinois at Urbana-Champaign November 1999

2 The Problem of Detail Graphics systems are awash in model data very detailed CAD databasesvery detailed CAD databases high-precision surface scanshigh-precision surface scans Available resources are always constrained CPU, space, graphics speed, network bandwidthCPU, space, graphics speed, network bandwidth We need economical models want the minimum level of detail (LOD) requiredwant the minimum level of detail (LOD) required detail requirements are dictated by contextdetail requirements are dictated by context Graphics systems are awash in model data very detailed CAD databasesvery detailed CAD databases high-precision surface scanshigh-precision surface scans Available resources are always constrained CPU, space, graphics speed, network bandwidthCPU, space, graphics speed, network bandwidth We need economical models want the minimum level of detail (LOD) requiredwant the minimum level of detail (LOD) required detail requirements are dictated by contextdetail requirements are dictated by context

3 A Non-Economical Model 424,376 triangles 60,000 triangles

4 Polygonal Surface Models Model composed of sets of vertices and trianglessets of vertices and triangles –all polygons are pre-triangulated other attributes (e.g., color)other attributes (e.g., color) These are very widely supported almost only hardware primitivealmost only hardware primitive near-universal in softwarenear-universal in software Other representations exist but they don’t solve the problembut they don’t solve the problem many applications want polygonsmany applications want polygons

5 Automatic Surface Simplification

6 Produce approximations with fewer triangles should be as similar as possible to originalshould be as similar as possible to original want computationally efficient processwant computationally efficient process Need criteria for assessing similarity of models for display, visual similarity is the ultimate goalfor display, visual similarity is the ultimate goal similarity of shape is often used insteadsimilarity of shape is often used instead –generally easier to compute –lends itself more to applications other than display Produce approximations with fewer triangles should be as similar as possible to originalshould be as similar as possible to original want computationally efficient processwant computationally efficient process Need criteria for assessing similarity of models for display, visual similarity is the ultimate goalfor display, visual similarity is the ultimate goal similarity of shape is often used insteadsimilarity of shape is often used instead –generally easier to compute –lends itself more to applications other than display

7 Related Topics Function approximation curves & height fields (e.g., terrains)curves & height fields (e.g., terrains) Geometry compression simplification is a kind of lossy compressionsimplification is a kind of lossy compression Surface smoothing reduces geometric complexity of shapereduces geometric complexity of shape Mesh generation for finite element analysis (e.g., solving PDE’s)for finite element analysis (e.g., solving PDE’s) Function approximation curves & height fields (e.g., terrains)curves & height fields (e.g., terrains) Geometry compression simplification is a kind of lossy compressionsimplification is a kind of lossy compression Surface smoothing reduces geometric complexity of shapereduces geometric complexity of shape Mesh generation for finite element analysis (e.g., solving PDE’s)for finite element analysis (e.g., solving PDE’s)

8 My Assumptions About Input Mesh connectivity is consistent corners which coincide in space share verticescorners which coincide in space share vertices Surface 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 consistent normal orientation not requiredconsistent normal orientation not required Application domain does not rely on topology vs. medical imaging — hole in the lung mattersvs. medical imaging — hole in the lung matters Mesh connectivity is consistent corners which coincide in space share verticescorners which coincide in space share vertices Surface 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 consistent normal orientation not requiredconsistent normal orientation not required Application domain does not rely on topology vs. medical imaging — hole in the lung mattersvs. medical imaging — hole in the lung matters

9 Key Features of My Surface Simplification Algorithm An effective algorithm for practical use simple to implementsimple to implement fast simplification (10,000 faces in 1 second)fast simplification (10,000 faces in 1 second) high quality approximationshigh quality approximations Implicitly simplifies topology all decisions are based on geometric criteriaall decisions are based on geometric criteria Can manage surface properties color, texture, etc.color, texture, etc. An effective algorithm for practical use simple to implementsimple to implement fast simplification (10,000 faces in 1 second)fast simplification (10,000 faces in 1 second) high quality approximationshigh quality approximations Implicitly simplifies topology all decisions are based on geometric criteriaall decisions are based on geometric criteria Can manage surface properties color, texture, etc.color, texture, etc.

10 Fundamental Operation: Edge Contraction A single edge contraction (v 1,v 2 )  v’ is performed by moving v 1 and v 2 to position v’moving v 1 and v 2 to position v’ replacing all occurrences of v 2 with v 1replacing all occurrences of v 2 with v 1 removing v 2 and all degenerate trianglesremoving v 2 and all degenerate triangles A single edge contraction (v 1,v 2 )  v’ is performed by moving v 1 and v 2 to position v’moving v 1 and v 2 to position v’ replacing all occurrences of v 2 with v 1replacing all occurrences of v 2 with v 1 removing v 2 and all degenerate trianglesremoving v 2 and all degenerate triangles v1v1 v1v1 v2v2 v2v2 v’

11 Overview of Algorithm Preprocessing phase: model cleanup enforce vertex sharingenforce vertex sharing triangulate & remove degenerate facestriangulate & remove degenerate faces Iteratively contract vertex pairs (i.e., edges) simple greedy techniquesimple greedy technique rank edges by “cost” of contractionrank edges by “cost” of contraction maintain proposed contractions in a heapmaintain proposed contractions in a heap at each iteration, contract minimum cost edgeat each iteration, contract minimum cost edge Preprocessing phase: model cleanup enforce vertex sharingenforce vertex sharing triangulate & remove degenerate facestriangulate & remove degenerate faces Iteratively contract vertex pairs (i.e., edges) simple greedy techniquesimple greedy technique rank edges by “cost” of contractionrank edges by “cost” of contraction maintain proposed contractions in a heapmaintain proposed contractions in a heap at each iteration, contract minimum cost edgeat each iteration, contract minimum cost edge

12 Measuring Cost of Contractions Cost should reflect geometric error introduced error between current & original (vs. last iteration)error between current & original (vs. last iteration) also want this to be fairly cheap to computealso want this to be fairly cheap to compute various contraction-based algorithms differ here [Guéziec 95; Hoppe 96; Lindstrom-Turk 98; Ronfard-Rossignac 96]various contraction-based algorithms differ here [Guéziec 95; Hoppe 96; Lindstrom-Turk 98; Ronfard-Rossignac 96] Must address two interrelated problems what is the best contraction to perform?what is the best contraction to perform? what is the best position v’ for remaining vertex?what is the best position v’ for remaining vertex? Cost should reflect geometric error introduced error between current & original (vs. last iteration)error between current & original (vs. last iteration) also want this to be fairly cheap to computealso want this to be fairly cheap to compute various contraction-based algorithms differ here [Guéziec 95; Hoppe 96; Lindstrom-Turk 98; Ronfard-Rossignac 96]various contraction-based algorithms differ here [Guéziec 95; Hoppe 96; Lindstrom-Turk 98; Ronfard-Rossignac 96] Must address two interrelated problems what is the best contraction to perform?what is the best contraction to perform? what is the best position v’ for remaining vertex?what is the best position v’ for remaining vertex?

13 How I Measure Error Each vertex has a (conceptual) set of planes error  sum of squared distances to planes in seterror  sum of squared distances to planes in set Initialize with planes of incident faces consequently, all initial errors are 0consequently, all initial errors are 0 When contracting pair, use union of plane sets planes(v’) = planes(v 1 )  planes(v 2 )planes(v’) = planes(v 1 )  planes(v 2 ) Each vertex has a (conceptual) set of planes error  sum of squared distances to planes in seterror  sum of squared distances to planes in set Initialize with planes of incident faces consequently, all initial errors are 0consequently, all initial errors are 0 When contracting pair, use union of plane sets planes(v’) = planes(v 1 )  planes(v 2 )planes(v’) = planes(v 1 )  planes(v 2 )

14 A Simple Example: Contraction & “Planes” in 2D Lines defined by neighboring segments determine position of new vertexdetermine position of new vertex accumulate lines for ever larger areasaccumulate lines for ever larger areas Lines defined by neighboring segments determine position of new vertexdetermine position of new vertex accumulate lines for ever larger areasaccumulate lines for ever larger areas v1v1 v1v1 v2v2 v2v2 v’

15 How I Measure Error Why base error on planes? faster, but less accurate, than distance-to-facefaster, but less accurate, than distance-to-face simple linear system for minimum-error positionsimple linear system for minimum-error position efficient implicit representation; no sets requiredefficient implicit representation; no sets required drawback: unlike surface, planes are infinitedrawback: unlike surface, planes are infinite Related error metrics Ronfard & Rossignac — max vs. sumRonfard & Rossignac — max vs. sum Lindstrom & Turk — similar form; volume-basedLindstrom & Turk — similar form; volume-based Why base error on planes? faster, but less accurate, than distance-to-facefaster, but less accurate, than distance-to-face simple linear system for minimum-error positionsimple linear system for minimum-error position efficient implicit representation; no sets requiredefficient implicit representation; no sets required drawback: unlike surface, planes are infinitedrawback: unlike surface, planes are infinite Related error metrics Ronfard & Rossignac — max vs. sumRonfard & Rossignac — max vs. sum Lindstrom & Turk — similar form; volume-basedLindstrom & Turk — similar form; volume-based

16 The Quadric Error Metric Given a plane, we can define a quadric Q measuring squared distance to the plane as

17 The Quadric Error Metric Sum of quadrics represents set of planes Each vertex has an associated quadric error(v i ) = Q i (v i )error(v i ) = Q i (v i ) sum quadrics when contracting (v i, v j )  v’sum quadrics when contracting (v i, v j )  v’ cost of contraction is Q(v’)cost of contraction is Q(v’) Sum of quadrics represents set of planes Each vertex has an associated quadric error(v i ) = Q i (v i )error(v i ) = Q i (v i ) sum quadrics when contracting (v i, v j )  v’sum quadrics when contracting (v i, v j )  v’ cost of contraction is Q(v’)cost of contraction is Q(v’)

18 The Quadric Error Metric Sum of endpoint quadrics determines v’ fixed placement: select v 1 or v 2fixed placement: select v 1 or v 2 optimal placement: choose v’ minimizing Q(v’)optimal placement: choose v’ minimizing Q(v’) fixed placement is faster but lower qualityfixed placement is faster but lower quality fallback to fixed placement if A is non-invertiblefallback to fixed placement if A is non-invertible Sum of endpoint quadrics determines v’ fixed placement: select v 1 or v 2fixed placement: select v 1 or v 2 optimal placement: choose v’ minimizing Q(v’)optimal placement: choose v’ minimizing Q(v’) fixed placement is faster but lower qualityfixed placement is faster but lower quality fallback to fixed placement if A is non-invertiblefallback to fixed placement if A is non-invertible

19 Sample Model: Scanned Bunny 69,451 faces 1000 faces 100 faces Total simplification time: 7 seconds 200 MHz PentiumPro; excludes input–output time200 MHz PentiumPro; excludes input–output time Shape preserved at 1000 faces; gross structure at 100 Total simplification time: 7 seconds 200 MHz PentiumPro; excludes input–output time200 MHz PentiumPro; excludes input–output time Shape preserved at 1000 faces; gross structure at 100

20 Demo

21 Visualizing Quadrics in 3-D Quadric isosurfaces are always ellipsoids (maybe degenerate)are always ellipsoids (maybe degenerate) centered around verticescentered around vertices characterize shapecharacterize shape stretch in least- curved directionsstretch in least- curved directions

22 Quadrics and Surface Curvature For quadrics on differentiable manifold limit of infinitely subdivided polygonal surfacelimit of infinitely subdivided polygonal surface integrate quadrics in a small neighborhoodintegrate quadrics in a small neighborhood Can prove that in the limit eigenvectors of A are principal directionseigenvectors of A are principal directions eigenvalues of A  squared principal curvatureseigenvalues of A  squared principal curvatures algorithm which minimizes quadric error will produce optimal aspect ratios [Heckbert–Garland 99]algorithm which minimizes quadric error will produce optimal aspect ratios [Heckbert–Garland 99] For quadrics on differentiable manifold limit of infinitely subdivided polygonal surfacelimit of infinitely subdivided polygonal surface integrate quadrics in a small neighborhoodintegrate quadrics in a small neighborhood Can prove that in the limit eigenvectors of A are principal directionseigenvectors of A are principal directions eigenvalues of A  squared principal curvatureseigenvalues of A  squared principal curvatures algorithm which minimizes quadric error will produce optimal aspect ratios [Heckbert–Garland 99]algorithm which minimizes quadric error will produce optimal aspect ratios [Heckbert–Garland 99]

23 Sample Model: Dental Mold 424,376 faces 60,000 faces 50 sec

24 Sample Model: Dental Mold 424,376 faces 8000 faces 55 sec

25 Sample Model: Dental Mold 424,376 faces 1000 faces 56 sec

26 Sample Model: Turbine Blade 1,765,388 faces 420,000 faces 217 sec

27 Sample Model: Turbine Blade 1,765,388 faces 80,000 faces 300 sec

28 Sample Model: Turbine Blade 1,765,388 faces 310 sec 8000 faces

29 Summary: Quadric-Based Simplification An effective simplification technique good compromise between highest quality and fastest simplificationgood compromise between highest quality and fastest simplification uses efficient characterization of local shapeuses efficient characterization of local shape proven connection to surface curvature and optimal triangle shapeproven connection to surface curvature and optimal triangle shape Currently in real-world use scanned data, CAD, VR, medical imaging …scanned data, CAD, VR, medical imaging … An effective simplification technique good compromise between highest quality and fastest simplificationgood compromise between highest quality and fastest simplification uses efficient characterization of local shapeuses efficient characterization of local shape proven connection to surface curvature and optimal triangle shapeproven connection to surface curvature and optimal triangle shape Currently in real-world use scanned data, CAD, VR, medical imaging …scanned data, CAD, VR, medical imaging …

30 Future Directions Broader applicability non-rigid surfaces (i.e., for animation)non-rigid surfaces (i.e., for animation) extremely large datasets of 10 9 or more trianglesextremely large datasets of 10 9 or more triangles other model types: tetrahedral meshs, splines, …other model types: tetrahedral meshs, splines, … alternative multiresolution representationsalternative multiresolution representations Higher quality approximations more effective topological simplificationmore effective topological simplification good performance at extreme levelsgood performance at extreme levels better analysis of resulting approximation qualitybetter analysis of resulting approximation quality Broader applicability non-rigid surfaces (i.e., for animation)non-rigid surfaces (i.e., for animation) extremely large datasets of 10 9 or more trianglesextremely large datasets of 10 9 or more triangles other model types: tetrahedral meshs, splines, …other model types: tetrahedral meshs, splines, … alternative multiresolution representationsalternative multiresolution representations Higher quality approximations more effective topological simplificationmore effective topological simplification good performance at extreme levelsgood performance at extreme levels better analysis of resulting approximation qualitybetter analysis of resulting approximation quality

31 Acknowledgements Funded in part by National Science FoundationNational Science Foundation Schlumberger FoundationSchlumberger Foundation Sample models courtesy of Stanford graphics lab — bunnyStanford graphics lab — bunny Iris Development — dental moldIris Development — dental mold Viewpoint DataLabs — dragonViewpoint DataLabs — dragon GE/KitWare — turbine bladeGE/KitWare — turbine blade Andrew Willmott — radiosity solutionAndrew Willmott — radiosity solution Funded in part by National Science FoundationNational Science Foundation Schlumberger FoundationSchlumberger Foundation Sample models courtesy of Stanford graphics lab — bunnyStanford graphics lab — bunny Iris Development — dental moldIris Development — dental mold Viewpoint DataLabs — dragonViewpoint DataLabs — dragon GE/KitWare — turbine bladeGE/KitWare — turbine blade Andrew Willmott — radiosity solutionAndrew Willmott — radiosity solution

32 Further Details Available Online Free sample implementation, example surface models, example surface models, related papers. related papers. http://www.uiuc.edu/~garland/http://www.uiuc.edu/~garland/

33 Optimal Approximations Achieve given error with fewest triangles no mesh with fewer triangles meets error limitno mesh with fewer triangles meets error limit Computationally feasible for curves O(n) for functions of one variableO(n) for functions of one variable but O(n 2 log n) for plane curvesbut O(n 2 log n) for plane curves Intractable for surfaces NP-hard to find optimal height field [Agarwal–Suri 94]NP-hard to find optimal height field [Agarwal–Suri 94] must also be the case for surfacesmust also be the case for surfaces


Download ppt "Simplifying Polygonal Surfaces with Quadric Error Metrics Michael Garland University of Illinois at Urbana-Champaign November 1999 Michael Garland University."

Similar presentations


Ads by Google