58
Measuring Simplification Error Jonathan Cohen Computer Science Department Johns Hopkins University <[email protected]> http://www.cs.jhu.edu/~cohen

Measuring Simplification Error Jonathan Cohen Computer Science Department Johns Hopkins University cohen

Embed Size (px)

Citation preview

Measuring Simplification Error

Measuring Simplification Error

Jonathan Cohen

Computer Science DepartmentJohns Hopkins University

<[email protected]>http://www.cs.jhu.edu/~cohen

Why Measure Error?

• * Guide simplification process– Making better choices produces better

simplifications

• Know quality of results– Object-space error bounds describes quality

• Know when to show a particular LOD– Which LOD for a given screen-space error

• * Balance quality for large environments– What error bound for a given polygon count

Geometric Error Measures

• Promote accurate 3D shape preservation

• Also preserves screen-space shape– Silhouettes– Pixel coverage

Ford Bronco Model

TriangleTriangles: s:

41,855 41,855 27,970 27,970 20,922 20,922 12,939 12,939 8,385 8,385 4,7664,766

courtesy of Division and Viewpointcourtesy of Division and Viewpoint

Performing Simplification

• Measure cost of possible operations according to error measure– Crucial to simplification quality

• Place operations in queue according to error

• Perform operations in queue– After each operation, re-evaluate error

of operations in neighborhood

Classifying Geometric Error Metrics

• Vertex-vertex distance• Vertex-plane distance• Point-surface distance• Surface-surface distance

Vertex-Vertex Distance

• E = max( dist(v1,v3) , dist(v2,v3) ) • Measures the maximum distance

travelled by merging vertices• Appropriate during topology changes

– Rossignac and Borrel 93,– Luebke and Erikson 97

• Loose for topology-preserving collapses

vv11vv22

vv33

Minimizing/Propagating Error

• Error spheres record error at each vertex– Guaranteed bound, but very conservative

• Minimum location lies on edge– Not always at the center

Vertex-Plane Distance

• Store set of planes with each vertex– Error based on distance from vertex to planes– When vertices are merged, merge sets

• Ronfard and Rossignac 96– Store plane sets– Compute max distance

• Error Quadrics - Garland and Heckbert 96– Store quadratic form (symmetric 4x4 matrix)– Compute sum of square distances

aa bb cc

aa

bb

cc

Minimizing/Propagating Error• Minimal position found by solving

4x4 linear system• Error propagated by summing

4x4 matrices of merged vertices

Error quadrics visualized as ellipsoids (Garland/Heckbert 1997)

Memoryless Simplification• Don’t measure error from original

mesh– Measure from the current mesh– Incremental rather than total error– Lindstrom/Turk 98

• New minimization process– Preserve volume and area as

simplification progresses

• Low error demonstrated after-the-fact– Metro - Cignoni et al. 96

Point-Surface Distance

• Used in Hoppe 93 and 96• Map point set to closest points

on simplified surface• Compute sum of square

distances

Minimizing/Propagating Error• Error is minimized by solving a

linear least squares system• Propagation is unnecessary

– Error always measured from original, high-resolution points

– Slows down as more points associated with simplified mesh region

Surface-Surface Distance

• Bound maximum distance between input and simplified surfaces– Tolerance Volumes - Guéziec 96– Simplification Envelopes -

Cohen/Varshney 96– Hausdorf Distance - Klein 96– Mapping Distance - Bajaj/Schikore 96,

Cohen et al. 97

Minimizing/Propagating Error

• Minimum position need not lie on edge• Bounding volume covers surface, not

just vertices• Simplified mesh volume always

contains original mesh

Vertex-Vertex != Surface-Surface

• Error is zero at vertices and exterior edges

• Error is non-zero everywhere else– Be careful! – Not captured by vertex-

vertex or vertex-plane metrics

Edge swapEdge swap

Screen-space Geometric Error

w

d

r

LOD

eye

viewing plane

p

)2tan(2

d

r

w

rp

Attribute Error Metrics

• Attributes include colors, normals, and texture coordinates

• Promote accuracy of final pixel colors

Classifying Attribute Error Metrics

• Vertex-vertex distance

• Vertex-plane distance

• Point-surface distance

• Surface-surface distance

• Image-driven metric

• Perceptually-based metric

Vertex-Vertex Distance

• GAPS point clouds - Erikson/Manocha 98

– Measure sum of square distances from vertex to its constituent vertices (area-weighted)

– Used for colors, normals, and texture coordinates

• Normal cones

– Luebke/Erikson 97, Xia et al. 97

Vertex-Plane Distance

• Higher-dimensional error quadrics– Garland and Heckbert 98

– Vertices live in higher-dimensional position + attribute space

– Planes defined in this space

• Multiple attribute quadrics– Hoppe 99

– Decouples affects of position and attributes

– Reduces storage and computational complexity

Point-Surface Distance• Extension of geometric point-surface

distance

– Hoppe 96

• Geometric correspondences found between original surface samples and simplified surface

• Sum of square attribute distances minimized

• Used primarily for vertex colors

Surface-Surface Distance

• Bajaj / Schikore 96– Geometric projections provide

local mappings– Maximum distance of scalar

attributes measured over surface

Image-driven Simplification

• Measure error by rendering– Compare resulting images– Lindstrom/Turk 2000

• Captures attribute and shading error, as well as texture content

12 cameras used to capture quality of bunny simplification (Lindstrom/Turk 2000)

Perceptually-guided Simplification• Use contrast sensitivity function to guide

simplification– Gives some handle on perceptibility– Williams et al. 2003

• Measure contrast and spatial frequency of changes induced by operation

Lit, textured model Texture contrast Lit texture contrast

Screen-space Attribute Error?

• Normal error controls dynamic refinement around highlights– Xia et al. 97, Klein 98– Doesn’t allow more simplification as

objects recede• Color control?• Texture coordinates work like

geometric error – Cohen et al. 98

• Perceptual metrics can weigh relative importance of color, normal, textures, lighting and silhouettes – for a price

Appearance Preserving Simplification

• Preserve three appearance attributes:– Surface Position– Surface Curvature– Material Color

• Each may require different sampling

Normals Undersampled

13,433 triangles 1,749 triangles10 pixel surface deviation

Normals Properly Sampled

13,433 triangles 1,749 triangles, 10 pixel deviation

v1, c1, n1

v = vertex coordinate = (x,y,z)c = color = (r,g,b)n = normal = (nx,ny,nz)

v2, c2, n2

v3, c3, n3

Traditional Polygonal Representation

Traditional Simplification

• Filters surface position, colors, and normals

• Must filter all three equally

texture map

normal map

v1, t1

v2, t2

v3, t3

v = vertex coordinate = (x,y,z)t = texture coordinate = (u,v)c = color = (r,g,b)n = normal vector = (nx,ny,nz)

c1

c2

c3

n1

n2n3

Decoupled Representation

Decoupled Approach

• Simplification filters surface position and texture coordinates

• Color and normal attributes filtered per-pixel (mip-mapping, etc.)

Sample Normal Map

polygonal surface patch normal map

Normal Map vs. Bump Map

• Normal map– Absolute normals in object space– Constant as object is simplified

• Same normal map okay for all LODs

• Bump map– Perturbations of triangle normal– Changes as object is simplified

• Need different bump map for each LOD

Texture Deviation Metric

• Distance between corresponding 3D points– Same 2D texture coordinates

– Projects at run time to 2D pixel deviation

• Intuitive error tolerance specification– Pixels of deviation for both surface

position and texture error!

Point Correspondence

mesh Mmesh Mii mesh Mmesh Mi+1i+1

2D texture domain2D texture domain

(i+1)(i+1)stst edge collapse edge collapse

XXii XXi+1i+1

xxei,i+1(x) = dist(Xi, Xi+1)

Ei,i+1 = max ei,i+1(x) xP

P

Hardware Requirements

• Texture and normal (or bump) map capability– Bandwidth for attribute map lookups– Per-pixel lighting computation

• Demonstrated originally on PixelFlow

• Possible on most modern graphics hardware

Model Requirements• Parameterized model• Ideal parameterization

– Each patch fills [0,1] texture space– Allows each patch to simplify to 2 triangles– Allows equal texture resolution along patch

boundaries– Allows standard mip-mapping

• Acceptable parameterization– Each patch occupies simple polygon in

texture space– Simplification limited by polygon sides– Mip-mapping problematic

• Want to minimize required resolution

APS Level-of-detail Hierarchy

model courtesy of Stanford and Caltech

7,809 tris

3,905 tris

1,951 tris

975 tris

488 tris

250,000 TrisOriginal

62,000 TrisPhong Shading

3 pixel error

250,000 TrisOriginal

62,000 TrisNormal Map

3 pixel error

250,000 TrisOriginal

8,000 TrisPhong Shading

15 pixel error

250,000 TrisOriginal

8,000 TrisNormal Map

15 pixel error

250,000 TrisOriginal

1,000 TrisPhong Shading

78 pixel error

250,000 TrisOriginal

1,000 TrisNormal Map

78 pixel error

Conclusions• Geometric error measured in object-space

– Used during simplification and at run-time

• Attribute error measured in attribute space– Used during simplification, and more limited use

at run-time

• Appearance-preserving simplification captures attributes and simplifies geometry– Texture deviation used during simplification and

at run-time (same as geometric error)– Attributes “simplified” using mip-mapping

References– Bajaj, Chandrajit and Daniel Schikore. Error-bounded

Reduction of Triangle Meshes with Multivariate Data. SPIE. vol. 2656. 1996. pp. 34-45.

– Cohen, Jonathan, Dinesh Manocha, and Marc Olano. Simplifying Polygonal Models using Successive Mappings. Proceedings of IEEE Visualization '97. pp. 395-402.

– Cohen, Jonathan, Marc Olano, and Dinesh Manocha. Appearance-Preserving Simplification. Proceedings of ACM SIGGRAPH 98. pp. 115-122.

– Cohen, Jonathan, Amitabh Varshney, Dinesh Manocha, Gregory Turk, Hans Weber, Pankaj Agarwal, Frederick Brooks, and William Wright. Simplification Envelopes. Proceedings of SIGGRAPH 96. pp. 119-128.

– DeFloriani, Leila, Paola Magillo, and Enrico Puppo. Building and Traversing a Surface at Variable Resolution. Proceedings of IEEE Visualization ‘97. pp. 103-110.

– Erikson, Carl and Dinesh Manocha. GAPS: General and Automatic Polygonal Simplification. Proceedings of 1999 ACM Symposium on Interactive 3D Graphics. pp. 79-88.

References– Garland, Michael and Paul Heckbert. Simplifying Surfaces

with Color and Texture using Quadric Error Metrics. Proceedings of IEEE Visualization '98. pp. 263-269, 542.

– Garland, Michael and Paul Heckbert. Surface Simplification using Quadric Error Bounds. Proceedings of SIGGRAPH 97. pp. 209-216.

– Guéziec, André. Surface Simplification with Variable Tolerance. Proceedings of Second Annual International Symposium on Medical Robotics and Computer Assisted Surgery (MRCAS '95). pp. 132-139.

– Hoppe, Hugues. Progressive Meshes. Proceedings of SIGGRAPH 96. pp. 99-108.

– Hoppe, Hugues. View-Dependent Refinement of Progressive Meshes. Proceedings of SIGGRAPH 97. pp. 189-198.

– Hoppe, Hugues, Tony DeRose, Tom Duchamp, John McDonald, and Werner Stuetzle. Mesh Optimization. Proceedings of SIGGRAPH 93. pp. 19-26.

– Hoppe, Hugues H. New Quadric Metric for Simplifying Meshes with Appearance Attributes. Proceedings of IEEE Visualization '99. pp. 59-66.

References– Klein, Reinhard, Gunther Liebich, and Wolfgang

Straßer. Mesh Reduction with Error Control. Proceedings of IEEE Visualization '96.

– Lindstrom, Peter and Greg Turk. Fast and Memory Efficient Polygonal Simplification. Proceedings of IEEE Visualization '98. pp. 279-286, 544.

– Lindstrom, Peter and Greg Turk. Image-Driven Simplification. ACM Transactions on Graphics. vol 19(3). pp. 204-241.

– Luebke, David and Carl Erikson. View-Dependent Simplification of Arbitrary Polygonal Environments. Proceedings of SIGGRAPH 97. pp. 199-208.

– Luebke, David, Martin Reddy, Jonathan Cohen, Benjamin Watson, Amitabh Varshney, and Robert Huebner. Level of Detail for 3D Computer Graphics. Morgan-Kaufman. 2002.

– Ronfard, Remi and Jarek Rossignac. Full-range Approximation of Triangulated Polyhedra. Computer Graphics Forum. vol. 15(3). 1996. pp. 67-76 and 462.

References– Rossignac, Jarek and Paul Borrel. Multi-

Resolution 3D Approximations for Rendering. Modeling in Computer Graphics. Springer-Verlag. 1993. pp. 455-465.

– Williams, Nathaniel, David Luebke, Jonathan Cohen, Mike Kelly, and Brenden Schubert. Perceptually-guided Simplification of Lit, Textured Meshes. Proceedings of 2003 ACM Symposium on Interactive 3D Graphics.

– Xia, Julie C., Jihad El-Sana, and Amitabh Varshney. Adaptive Real-Time Level-of-Detail-Based Rendering for Polygonal Models. IEEE Transactions on Visualization and Computer Graphics. vol. 3(2). 1997. pp. 171-183.