simplification - technioncs236329/lectures/simplification.pdf · simplification 34 view-dependent...

10
1 Mesh Simplification 2 Mesh Simplification Simplifier 12,000 2,000 300 3D 3 Motivation Reduce information content Accelerate rendering Multi-resolution models size error 4 Refined mesh for close objects Simplified mesh for far Level of Detail (LOD)

Upload: others

Post on 29-Oct-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

1

Mesh Simplification

2

Mesh Simplification

Simplifier12,000 2,000 300

3D

3

Motivation

Reduce information contentAccelerate renderingMulti-resolution models

size

error

4

Refined mesh for close objectsSimplified mesh for far

Level of Detail (LOD)

Page 2: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

5

Performance RequirementsOffline

Generate model at given level(s) of detailEmphasis on quality

Real-timeGenerate model at given level(s) of detailEmphasis on speedRequires preprocessingTime/space/quality tradeoff

6

Quality (e.g. Crease Preservation)

original

(12,946 faces)

192 faces 1,070 faces PM (200 faces) PM (1,000 faces)

7

MethodologySequence of local operations

Involve near neighbors - only small patch affected in each operationEach operation introduces error Find and apply operation which introduces the least error

8

Simplification Operations (1)Decimation

Vertex removal: v ← v-1f ← f-2

Remaining vertices are subset of original vertex set

Page 3: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

9

Simplification Operations (2)Decimation

Edge collapsev ← v-1f ← f-2

Triangle collapsev ← v-2f ← f-4

Vertices may move

10

Simplification Operations (3)Contraction

Pair contraction

Cluster contraction(set of vertices)

Vertices may move

11

Error ControlLocal error: Compare new patch with previous iteration

FastAccumulates error Memory-less

Global error: Compare new patch with original meshSlowBetter quality control Can be used as termination conditionMust remember the original mesh throughout the algorithm

12

Local vs. Global Error

488 faces2000 faces 488 faces

Original GlobalLocal

Page 4: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

13

Σα / 2π

Simplification Error MetricsMeasures

Distance to planeCurvature

Usually approximatedAverage planeDiscrete curvature

14

The Basic AlgorithmRepeat

Select the element with minimal errorPerform simplification operation (remove/collapse)Update error (local/global)

Until mesh size / quality is achieved

15

Implementation Details

Vertices/Edges/Faces data structure

Easy access from each element to neighboring elements

Use priority queue (e.g. heap)

Fast access to element with minimal errorFast update

16

Vertex Removal Algorithm

Simplification operation: Vertex removal

Error metric: Distance to average plane

May preserve mesh features (creases)

Page 5: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

17

Algorithm Outline

Characterize local topology/geometryClassify vertices as removable or notRepeat

Remove vertexTriangulate resulting holeUpdate error of affected vertices

Until reduction goal is met

18

Characterizing Local Topology/Geometry

SimpleSimple

BoundaryBoundary

ComplexComplex

InteriorInterior

CornerCorner

19

Decimation CriterionEmax – user defined parameterSimple vertex:

Distance of vertex to the face loop average plane < Emax

Boundary vertices:Distance of the vertex to the new boundary edge < Emax

DistanceDistance

20

Triangulating the HoleVertex removal produces non-planar loop

Split loop recursivelySplit plane orthogonal to the average plane

Control aspect ratio of triangles3D triangulation may be invalid

Vertex is not removed

Page 6: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

21

Example

Simplifier

22

Pros and ConsPros:

EfficientSimple to implement and use

Few input parameters to control qualityReasonable approximationWorks on very large meshesPreserves topologyVertices are a subset of the original mesh

Cons:Error is not bounded

Local error evaluation causes error to accumulate

23

Edge Collapse Algorithm - QSlim

Simplification operation:Pair contraction

Error metric:Distance, Pseudo-global

Simplifies also topology

24

Distance Metric: Quadrics

Choose point closest to set of planes (triangles)

Sum of squared distances to set of planes is quadratic ⇒has a global minimum

Page 7: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

25

QuadricsPlane

Ax + By + Cz + D = 0, where A2 + B2 + C2 = 1p = [A, B, C, D], v = [x, y, z, 1], v pT = 0

Squared distance between v and p:∆p(v) = (v pT)2

= (v pT) (p vT) = v (pTp) vT

= v KP vT

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

2

2

2

2

DCDBDADCDCBCACBDBCBABADACABA

KP =

26

Distance to Set of Planes

Tv

T

planes(v)pp

planes(v)p

Tp

planes(v)pp

vQv

v)K( v

)vK (v

)v()v(

=

=

=

∆=∆

After v1, v2 are contracted to v,Qv ← Qv1+Qv2

Pseudo-global

All original planes persist during the entire simplification process

V1 V2 V

27

Contracting Two VerticesGoal: Given edge e = (v1,v2), find contracted

v = (x,y,z) that minimizes ∆(v):

∂∆/∂x = ∂∆/∂y = ∂∆/∂z = 0

Solve system of linear normal equations:

If no solution - select the edge midpoint

⎥⎥⎥⎥

⎢⎢⎢⎢

=

⎥⎥⎥⎥

⎢⎢⎢⎢

1000

v

1000qqqqqqqqqqqq

34333231

24232221

14131211

28

Selecting Valid Pairs for Contraction

Edges:{(v1,v2) : (v1v2) is in the mesh}

Close vertices:{(v1,v2) : ||v1 - v2|| < T}

Threshold T is input parameter

T

Page 8: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

29

AlgorithmCompute QV for all the mesh vertices Identify all valid pairsCompute for each valid pair (v1,v2) the contracted vertex v and its error ∆(v)Store all valid pairs in a priority queue (according to ∆(v))While reduction goal not met

Contract edge (v1,v2) with the smallest ∆(v)Update the priority queue with new valid pairs

30

ExamplesDolphin (Flipper)

Original - 12,337 faces 2,000 faces 300 faces (142 vertices)

31

ExamplesBuddha

Simplifier

Original - 12,000 2,000 faces 298 faces (140 vertices)

32

Pros and ConsPros

Error is boundedAllows topology simplificationHigh quality resultQuite efficient

ConsDifficulties along boundariesDifficulties with coplanar planesIntroduces new vertices not present in the original mesh

Page 9: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

33

View-Dependent Simplification

34

View-Dependent RefinementProblem:

While rendering for each viewpoint there are always hidden faces Using traditional simplification techniques those faces rendered in the same LOD as complete mesh

Outside View-Frustum

Backface

Distant

35

View-Dependent RefinementGoal:

Generate progressive representation of mesh s.t. only some faces are simplified & others are fully detailed

36

Refinement CriteriaView-Frustum

Page 10: Simplification - Technioncs236329/lectures/Simplification.pdf · Simplification 34 View-Dependent Refinement Problem: While rendering for each viewpoint there are always hidden faces

37

τ = 0% τ = 0.33%

Refinement CriteriaScreen-space geometric error

Refine mesh only if distance between approximated & original surfaces when projected on the screen is larger than screen-space tolerance τ

38

Simplification Algorithms

Mn 13,133

Mc1

5038,903

Mc2 Mc3

10,103

489

Continuous

Mn

13,133

M0

5038,90310,103

Mc1 Mc2 Mc3

Selective

39

Examples

Original Simplified Top-View

40

Examples (cont’)

Original Simplified Top-View