mesh simplification katja bühler mathematische methoden der computergraphik slides stolen from:...

58
Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Post on 21-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Mesh Simplification

Katja Bühler

Mathematische Methoden der Computergraphik

Slides stolen from:

John C. Hart

Who has the slides stolen from:

Michael Garland

Page 2: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

The Problem of Detail

• Graphics systems are awash in model data– very detailed CAD databases

– high-precision surface scans

• Available resources are always constrained– CPU, space, graphics speed, network bandwidth

• We need economical models– want the minimum level of detail (LOD) required

Page 3: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

A Non-Economical Model

424,376 faces424,376 faces 60,000 faces60,000 faces

Page 4: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Automatic Surface Simplification

Page 5: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Automatic Surface Simplification

• Produce approximations with fewer triangles– should be as similar as possible to original

– want computationally efficient process

• Need criteria for assessing model similarity– visual similarity

the ultimate goal for display

– similarity of shape is often used instead

• generally easier to compute

• lends itself more to applications other than display

Page 6: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Focus on Polygonal Models

• Polygonal surfaces are ubiquitous– only primitive widely supported in hardware

– near-universal support in software packages

– output of most scanning systems

• Switching representations is no solution– indeed, some suffer from the same problem

– many applications want polygons

• Will always assume models are triangulated

Page 7: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Historical Background

• Function approximation [y=f(x)]– long history in mathematical literature

• Piecewise linear curve approximation– various fields: graphics, cartography, vision, …

• Height field (i.e., terrain) triangulation– research back to at least early 70’s

– important for flight simulators

Page 8: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Other Related Fields

• Geometry compression– simplification is a kind of lossy compression

• Surface smoothing– reduces geometric complexity of shape

• Mesh generation– finite element analysis (e.g., solving PDE’s)

– need appropriate mesh for good solution

– overly complex mesh makes solution slow

Page 9: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Overview of Simplification Methods

• Manual preparation has been widely used– skilled humans produce excellent results

– very labor intensive, and thus costly

• Most common kinds of automatic methods– vertex clustering

– vertex decimation

– iterative contraction

Page 10: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Optimal Approximations

• Achieve given error with fewest triangles– no mesh with fewer triangles meets error limit

• Computationally feasible for curves– O(n) for functions of one variable

– but O(n2 log n) for plane curves

• Intractable for surfaces– NP-hard to find optimal height field [Agarwal–Suri 94]

– must also be the case for surfaces

Page 11: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Vertex Clustering

• Partition space into cells– grids [Rossignac-Borrel], spheres [Low-Tan], octrees, ...

• Merge all vertices within the same cell– triangles with multiple corners in one cell will degenerate

Page 12: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Vertex Decimation

• Starting with original model, iteratively– rank vertices according to their importance

– select unimportant vertex, remove it, retriangulate hole

• A fairly common technique– Schroeder et al, Soucy et al, Klein et al, Ciampalini et al

Page 13: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Iterative Contraction

• Contraction can operate on any set of vertices– edges (or vertex pairs) are most common, faces also used

• Starting with the original model, iteratively– rank all edges with some cost metric

– contract minimum cost edge

– update edge costs

Page 14: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Edge Contraction

• Single edge contraction (v1,v2) v’ is performed by

– moving v1 and v2 to position v’

– replacing all occurrences of v2 with v1

– removing v2 and all degenerate triangles

v1v1

v2v2v’v’

Page 15: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Vertex Pair Contraction

• Can also easily contract any pair of vertices– fundamental operation is exactly the same

– joins previously unconnected areas

– can be used to achieve topological simplification

Page 16: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Iterative Edge Contraction

• Currently the most popular technique– Hoppe, Garland–Heckbert, Lindstrom-Turk, Ronfard-Rossignac,

Guéziec, and several others

– simpler operation than vertex removal

– well-defined on any simplicial complex

• Also induces hierarchy on the surface– a very important by-product

– enables several multiresolution applications

Page 17: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Cost Metrics for Contraction

• Used to rank edges during simplification– reflects amount of geometric error introduced

– main differentiating feature among algorithms

• Must address two interrelated problems– what is the best contraction to perform?

– what is the best position v’ for remaining vertex?

• can just choose one of the endpoints

• but can often do better by optimizing position of v’

Page 18: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Cost Metrics for Contraction

• Simple heuristics– edge length, dihedral angle, surrounding area, …

• Sample distances to original surface– projection to closest point [Hoppe]

– restricted projection [Soucy–Laurendeau, Klein et al, Ciampalini et al]

• Alternative characterization of error– quadric error metrics [Garland–Heckbert]

– local volume preservation [Lindstrom–Turk]

Page 19: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Measuring Error with Planes

• Each vertex has a (conceptual) set of planes– Error sum of squared distances to planes in set

• Initialize with planes of incident faces– Consequently, all initial errors are 0

• When contracting pair, use plane set union

– planes(v’) = planes(v1) planes(v2)

i

idvError T

i

2)()( vn

Page 20: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

A Simple Example:Contraction & “Planes” in 2D• Lines defined by neighboring segments

– Determine position of new vertex

– Accumulate lines for ever larger areas

OriginalOriginal After 1 StepAfter 1 Step

vv11 vv22 v’v’

Page 21: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Measuring Error with Planes

• Why base error on planes?– Faster, but less accurate, than distance-to-face

– Simple linear system for minimum-error position

– Efficient implicit form; no sets required

– Drawback: unlike surface, planes are infinite

• Related error metrics– Ronfard & Rossignac — max vs. sum

– Lindstrom & Turk — similar form; volume-based

Page 22: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

The Quadric Error Metric

• Given a plane, we can define a quadric Q

measuring squared distance to the plane as

)d ,d,(c),,(Q 2T nnnbA

c2)Q( TT vbAvvv

2

2

2

2

d

z

y

x

cdbdad2

z

y

x

cbcac

bcbab

acaba

zyx)Q(

v

Page 23: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

The Quadric Error Metric

• Sum of quadrics represents set of planes

• Each vertex has an associated quadric

– Error(vi) = Qi (vi)

– Sum quadrics when contracting (vi,vj) v’

– Cost of contraction is Q(v’)

)(Q)(Q)d(i i

iii

2i

Ti vvvn

)cc,,(QQQ jijijiji bbAA

Page 24: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

The Quadric Error Metric

• Sum of endpoint quadrics determines v’

– Fixed placement: select v1 or v2

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

– Fixed placement is faster but lower quality

– But it also gives smaller progressive meshes

– Fallback to fixed placement if A is non-invertible

bAvv 1'0)'Q(

Page 25: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Visualizing Quadrics in 3-D

• Quadric isosurfaces– Are ellipsoids

(maybe degenerate)

– Centered around

vertices

– Characterize shape

– Stretch in least-

curved directions

Page 26: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Sample Model: Dental Mold

424,376 faces424,376 faces 60,000 faces60,000 faces

50 sec50 sec

Page 27: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Sample Model: Dental Mold

424,376 faces424,376 faces 8000 faces8000 faces

55 sec55 sec

Page 28: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Sample Model: Dental Mold

424,376 faces424,376 faces 1000 faces1000 faces

56 sec56 sec

Page 29: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Must Also Consider Attributes

Mesh for solutionMesh for solution Radiosity solutionRadiosity solution

Page 30: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Must Also Consider Attributes

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

Page 31: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Simplification Summary

• Spectrum of effective methods developed– high quality; very slow [Hoppe et al, Hoppe]

– good quality; varying speed[Schroeder et al; Klein et al; Ciampalini et al; Guéziec

Garland-Heckbert; Ronfard-Rossignac; Lindstrom-Turk]

– lower quality; very fast [Rossignac–Borrel; Low–Tan]

– result usually produced by transforming original

• Various other differentiating factors– is topology simplified? restricted to manifolds?– attributes simplified or re-sampled into maps?

Page 32: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Static Resolution Not Enough• Model used in variety of contexts

– many machines; variable capacity

– projected screen size will vary

• Context dictates required detail– LOD should vary with context

– context varies over time

– with what level of coherence?

Page 33: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Need Multiresolution Models

• Encode wide range of levels of detail– extract appropriate approximations at run time

– must have low overhead

• space consumed by representation

• cost of changing level of detail while rendering

– can be generated via simplification process

• Image pyramids (mip-maps) a good example– very successful technique for raster images

Page 34: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Discrete Multiresolution Models

• Given a model, build a set of approximations– can be produced by any simplification system

– at run time, simply select which to render

• Inter-frame switching causes “popping”– can smooth transition with image blending

– or use geometry blending: geomorphing [Hoppe]

• Supported by several software packages– RenderMan, Open Inventor, IRIS Performer, ...

Page 35: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Limits of Discrete Models

• We may need varying LOD over surface– large surface, oblique view (eg. on terrain)

• need high detail near the viewer

• need less detail far away

– single LOD will be inappropriate

• either excessively detailed in the distance (wasteful)

• or insufficiently detailed near viewer (visual artifacts)

• Doesn’t really exploit available coherence– small view change may cause large model change

Page 36: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Progressive Meshes

• We get more than just final approximation– sequence of contractions

– corresponding intermediate approximations

• Re-encode as progressive mesh (PM) [Hoppe]

– take final approximation to be base mesh

– reverse of contraction sequence is split sequence

– can reconstruct any intermediate model

– allow for progressive transmission & compression

Page 37: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

PM’s a Limited Multiresolution

• More flexibility is required– local addition/subtraction of triangles

• as conditions change, make small updates in LOD

• this is the multi-triangulation framework

• may require novel approximations

• Must encode dependency of contractions– PM’s imply dependency on earlier contractions

– but we can reorder non-overlapping contractions

Page 38: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Structure Induced on Surface

• Every vertex on approximation corresponds to– a connected set of vertices on the original

– hence a region on the surface: the union of neighborhoods

• Initial conditions– every vertex set is a singleton, every region a neighborhood

Page 39: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Structure Induced on Surface

• A contraction merges corresponding vertex sets– remaining vertex accumulates larger surface region

• When merging regions, can link them by mesh edge– as shown on left hand side

Page 40: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Structure Induced on Surface

• Links within single region form spanning tree– links within all regions form spanning forest

– any contraction order within regions is (topologically) valid

• Regions always completely partition original surface

Page 41: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Structure Induced on Surface

• Pair-wise merging forms hierarchy– binary tree of vertices

– also a binary tree of surface regions

Page 42: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Example:Initial Vertex Neighborhoods

Page 43: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Example:99% of vertices removed

Page 44: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Example:99.9% of vertices removed

Page 45: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Vertex Hierarchies

• A cut through the tree– contract all below cut

– leaves are “active”

– determines partition

– and an approximation

• Encodes dependencies– PM’s assume total order

– disjoint subtrees indep.

– get novel approximations

– but must avoid fold-over

Page 46: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Vertex Hierarchies forView-Dependent Refinement• Multiresolution representation for display

– incrementally move cut between frames[Xia-Varshney, Hoppe, Luebke-Erickson]

– move up/down where less/more detail needed– relies on frame-to-frame coherence– can accommodate geomorphing [Hoppe]

• Common application of vertex hierarchy– hierarchy only guides active front evolution– more flexibility & overhead vs. discrete multires

Page 47: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Further Refinement inVertex Hierarchies• Also support synthetic refinement

– edge contraction is an inverse of edge split

– can synthesize temporary levels in tree by splitting edges

– fractal extrapolation of terrain surface, for example

Page 48: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Applications Beyond Display

• Other important applications are appearing– surface editing [Guskov et al 99]

– surface morphing [Lee et al 99]

– multiresolution radiosity [Willmott et al 99]

• Still others seem promising– hierarchical bounding volumes

– object matching

– shape analysis / feature extraction

Page 49: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Multiresolution Model Summary

• Representations are available to support– progressive transmission

– view-dependent refinement

– hierarchical computation (e.g., radiosity)

• But limitations remain– vertex hierarchies may over-constrain adaptation

– adaptation overhead not suitable for all cases

– interacting multiresolution objects ignored

Page 50: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Looking Ahead

• We’ve reached a performance plateau– broad range of methods for certain situations

– incremental improvement of existing methods

• Major progress may require new techniques– broader applicability of simplification

– higher quality approximations

• Needs better understanding of performance– how well, in general, does an algorithm perform?

Page 51: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Greater Generality

• Many applications require non-rigid surfaces– articulated models for animation

• Other model types have complexity issues– tetrahedral volumes, spline patch surfaces, ...

• Need to handle extremely large data sets– precise scans on the order of 109 triangles

– this is where simplification is needed the most

– even at 106 triangles, many algorithms fail

Page 52: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Too Large for Many Methods

1,765,388 faces1,765,388 faces 80,000 faces80,000 faces

Page 53: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Really Too Large …

8.2 million triangles(2 mm resolution)

6.8 million triangles(¼ mm resolution)

Complete data sets:0.3–1.0 billion

triangles

Page 54: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Better Topological Simplification

• Imperceptible holes & gaps can be removed– most methods do this only implicitly

• Few if any methods provide good control– when exactly are holes removed?

– will holes above a certain size be preserved?

• Requires better understanding of the model– when to simplify geometry vs. topology

– seems to benefit from more volumetric approach

Page 55: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Better Performance Analysis

• Better criteria for evaluating similarity– image-based metric more appropriate for display

– metrics which accurately account for attributes

• Most analysis has been case-based– measure/compare performance on 1 data set

• More thorough analysis is required– theoretical analysis of quality [Heckbert-Garland 99]

– provably good approximations possible?

Page 56: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Higher Quality Approximations

• Poor performance at extreme reductions– algorithms do much worse than humans– perhaps because all transform original into result

• Simple iterative method quite short-sighted– only look one step ahead and never reconsider– many consider only the local effect of operation

• Consider separating analysis & synthesis– firstbuild multi-level knowledge of surface shape– then proceed with simplification

Page 57: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Alternative Frameworks

• Greedy simplification convenient but limited– directly produce contraction sequence

– poor choices can never be reconsidered

• Other, albeit expensive, approaches possible– should produce a single sequence of contractions

– graph partitioning builds sequence in reverse

– more explicit optimization methods

Page 58: Mesh Simplification Katja Bühler Mathematische Methoden der Computergraphik Slides stolen from: John C. Hart Who has the slides stolen from: Michael Garland

Conclusions

• Substantial progress since 1992– simplification of 3D surfaces

– multiresolution representations (PM, hierarchies)

– application of multiresolution in different areas

• There remains much room for improvement– more effective, more general simplification

– better analysis and understanding of results

– other multiresolution representations