/
Advanced Computer Graphics Advanced Computer Graphics

Advanced Computer Graphics - PowerPoint Presentation

collectmcdonalds
collectmcdonalds . @collectmcdonalds
Follow
343 views
Uploaded On 2020-06-17

Advanced Computer Graphics - PPT Presentation

CSE 190 Winter 2016 Lecture 7 Ravi Ramamoorthi http wwwcsucsdedu ravir To Do Assignment 1 Due Jan 29 Any last minute issues or difficulties Starting Geometry Processing ID: 780729

face vertex mesh edge vertex face edge mesh adjacency faces operations table simplification distance surface vertices find data error

Share:

Link:

Embed:

Download Presentation from below link

Download The PPT/PDF document "Advanced Computer Graphics" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Advanced Computer Graphics

CSE 190 [Winter 2016], Lecture 7Ravi Ramamoorthi

http://

www.cs.ucsd.edu

/~

ravir

Slide2

To Do

Assignment 1, Due Jan 29Any last minute issues or difficulties?Starting Geometry ProcessingAssignment 2 due Feb 19This lecture starts discussing relevant content

Please START EARLY. Can do most after this weekContact us for difficulties, help finding partners etc.

Slide3

Motivation

A polygon mesh is a collection of trianglesWe want to do operations on these trianglesE.g. walk across the mesh for simplificationDisplay for renderingComputational geometryBest representations (mesh data structures)?CompactnessGeneralitySimplicity for computationsEfficiency

Slide4

Desirable Characteristics 1 Generality – from most general to least

Polygon soupOnly triangles2-manifold: ≤ 2 triangles per edgeOrientable:

consistent CW / CCW windingClosed: no boundaryCompact storageMesh Data Structures

Slide5

Mesh Data Structures

Desirable characteristics 2Efficient support for operations:Given face, find its verticesGiven vertex, find faces touching itGiven face, find neighboring faces

Given vertex, find neighboring verticesGiven edge, find vertices and faces it touchesThese are adjacency operations important in mesh simplification (homework), many other applications

Slide6

Outline

Independent facesIndexed face setAdjacency listsWinged-edgeHalf-edgeOverview of mesh decimation and simplification

Slide7

Independent Faces

Faces list vertex coordinatesRedundant verticesNo topology information

Face Table

F0: (x0

,y0,z0), (x

1,y1,z

1), (x2,y2,z2

)

F

1: (x3

,y

3

,z

3

), (x

4

,y

4

,z

4

), (x

5

,y

5,z5)F2: (x6,y6,z6), (x7,y7,z7), (x8,y8,z8)

F

0

F

1

F

2

Slide8

Indexed Face Set

Faces list vertex references – “shared vertices”Commonly used (e.g. OFF file format itself)Augmented versions simple for mesh processing

Vertex Table

v0: (x0

,y0,z0

)v1: (x

1,y1,z1)

v

2: (x2,y

2,z2

)

v

3

: (x

3

,y

3

,z

3

)

v

4

: (x

4,y4,z4)Face TableF0: 0, 1, 2F1: 1, 4, 2F2: 1, 3, 4

Note CCW ordering

F

0

F

1

F

2

v

0

v

1

v

3

v

4

v

2

Slide9

Indexed Face Set

Storage efficiency?Which operations supported in O(1) time?

Vertex Tablev

0: (x0,y

0,z0)

v1: (x1

,y1,z1)v

2: (x

2,y2

,z2)

v

3

: (x

3

,y

3

,z

3

)

v

4

: (x

4

,y4,z4)Face TableF0: 0, 1, 2F1: 1, 4, 2F2: 1, 3, 4

Note CCW ordering

F

0

F

1

F

2

v

0

v

1

v

3

v

4

v

2

Slide10

Efficient Algorithm Design

Can sometimes design algorithms to compensate for operations not supported by data structuresExample: per-vertex normalsAverage normal of faces touching each vertexWith indexed face set,

vertex  face is O(n)Naive algorithm for all vertices: O(n2)Can you think of an O(

n) algorithm?

Slide11

Efficient Algorithm Design

Can sometimes design algorithms to compensate for operations not supported by data structuresExample: per-vertex normalsAverage normal of faces touching each vertexWith indexed face set,

vertex  face is O(n)Naive algorithm for all vertices: O(n2)Can you think of an O(

n) algorithm?Useful to augment with vertex  face adjacencyFor all vertices, find adjacent faces as wellCan be implemented while simply looping over faces

Slide12

Outline

Independent facesIndexed face setAdjacency listsWinged-edgeHalf-edgeOverview of mesh decimation and simplification

Slide13

Full Adjacency Lists

Store all vertex, face,and edge adjacencies

F0

F

1

F

2

v

0

v

1

v

3

v

4

v

2

e

2

e

0

e

3

e

4

e

6

e

1

e

5

Edge Adjacency Table

e

0

: v

0

, v

1

; F

0

; ø,e

2

,e

1

e

1

: v

1

,v

2

; F

0

,F

1

; e

5

,e

0

,e

2

,e

6

Face Adjacency Table

F

0

: v

0

,v

1

,v

2

; F

1

,ø;

e

0

,e

2

,e

0

F

1

: v

1

,v

4

,v

2

;

ø

,

F

0

,F

2

; e

6

,e

1

,e

5

F

2

: v

1

,v

3

,v

4; ø,F1,ø; e4,e5,e3

Vertex Adjacency Tablev0: v1,v2; F0; e0,e2v1: v3,v4,v2,v0; F2,F1,F0; e3,e5,e1,e0

Slide14

Full adjacency: Issues

Garland and Heckbert claim they do thisEasy to find stuffIssue is storageAnd updating everything once you do something like an edge collapse for mesh simplificationI recommend you implement something simpler (like indexed face set plus vertex to face adjacency)

Slide15

Partial Adjacency Lists

Store some adjacencies,use to derive othersMany possibilities…

Edge Adjacency Table

e0: v0

, v1; F0,ø

; ø,

e2,e1,ø

e

1: v

1,v2

; F

0

,F

1

;

e

5

,e

0

,e

2

,e

6

…Face Adjacency TableF0: v0,v1,v2; F

1

,ø,ø; e0,e

2,e

1F

1: v1

,v4,v

2; ø

,F

0,F2

; e6,e1,e

5

F

2

: v

1

,v

3

,v

4

;

ø

,

F

1

,ø;

e

4

,e

5,e3

Vertex Adjacency Tablev0:

v1,v2; F0

;

e

0

,e

2

v

1

:

v

3

,v

4

,v

2

,v

0

;

F

2

,F

1

,F

0

;

e

3

,e

5

,e

1

,e

0

F

0

F

1

F

2

v

0

v

1

v

3

v

4

v

2

e

2

e

0

e

3

e

4

e

6

e

1

e

5

Slide16

Partial Adjacency Lists

Some combinations onlymake sense for closedmanifolds

Edge Adjacency Table

e0: v0, v

1; F0,ø

; ø,e2

,e1,øe1

: v

1,v2; F

0,F

1

; e

5

,e

0

,e

2

,e

6

Face Adjacency Table

F

0

: v0,v1,v2; F1,ø,ø; e0,e2,

e

1F1: v1,v

4,v2;

ø,F

0,F2;

e6

,e1,e

5F

2: v1,v

3,v4; ø,F1

,ø;

e

4

,e

5

,e

3

Vertex Adjacency Table

v

0

:

v

1

,v

2

;

F

0

;

e0,e2

v1: v3,v4

,v2,v0; F2,

F

1

,F

0

; e

3

,e

5

,e

1

,e

0

F

0

F

1

F

2

v

0

v

1

v

3

v

4

v

2

e

2

e

0

e

3

e

4

e

6

e

1

e

5

Slide17

Outline

Independent facesIndexed face setAdjacency listsWinged-edgeHalf-edgeOverview of mesh decimation and simplification

Slide18

Winged, Half Edge Representations

Idea is to associate information with edgesCompact StorageMany operations efficientAllow one to walk around meshUsually general for arbitrary polygons (not triangles)But implementations can be complex with special cases relative to simple indexed face set++ or partial adjacency table

Slide19

Winged Edge

Most data stored at edgesVertices, faces point toone edge each

Edge Adjacency Tablee

0: v0, v

1; F0, ø

; ø,e2

,e1, øe

1

: v1,v2

; F0,F

1

; e

5

,e

0

,e

2

,e

6

Face Adjacency Table

F

0

: v0,v1,v2; F1, ø,

ø

; e0,e

2,e

1F1

: v1

,v4,v

2; ø

,F0

,F2

; e6,e1,e

5

F

2

:

v

1

,v

3

,v

4

;

ø

,

F

1

,

ø

;

e4,e5,e3

Vertex Adjacency Tablev

0: v1,v2;

F

0

;

e

0

,e

2

v

1

:

v

3

,v

4

,v

2

,v

0

;

F

2

,F

1

,F

0

;

e

3

,e

5

,e

1

,e

0

F

0

F

1

F

2

v

0

v

1

v

3

v

4

v

2

e

2

e

0

e

3

e

4

e

6

e

1

e

5

Slide20

Winged Edge

Each edge stores 2 vertices, 2 faces, 4 edges – fixed sizeEnough information to completely “walk around” faces or verticesThink how to implementWalking around vertexFinding neighborhood of face

Other ops for simplification

v

begin

v

end

F

left

F

right

e

forw,right

e

forw,left

e

back,left

e

back,right

Slide21

Half Edge

Instead of single edge, 2 directed “half edges”Makes some operations more efficientWalk around face very easily (each face need only store one pointer)

v

begin

he

next

F

left

he

inv

Slide22

Outline

Independent facesIndexed face setAdjacency listsWinged-edgeHalf-edgeOverview of mesh decimation and simplification

Slide23

Mesh Decimation

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

Division, Viewpoint, Cohen

Slide24

Mesh Decimation

Reduce number of polygonsLess storageFaster renderingSimpler manipulationDesirable propertiesGeneralityEfficiencyProduces “good” approximation

Michelangelo

s St. MatthewOriginal model: ~400M polygons

Slide25

Primitive Operations

Simplify model a bit at a time byremoving a few facesRepeated to simplify whole meshTypes of operationsVertex clusterVertex removeEdge collapse (main operation used in assignment)

Slide26

Vertex Cluster

MethodMerge vertices based on proximityTriangles with repeated vertices can collapse to edges or pointsPropertiesGeneral and robustCan be unattractive if results in topology change

Slide27

Vertex Remove

MethodRemove vertex and adjacent facesFill hole with new triangles (reduction of 2)PropertiesRequires manifold surface, preserves topologyTypically more attractiveFilling hole well not always easy

Slide28

Edge Collapse

MethodMerge two edge vertices to oneDelete degenerate trianglesPropertiesSpecial case of vertex clusterAllows smooth transitionCan change topology

Slide29

Mesh Decimation/Simplification

Typical: greedy algorithmMeasure error of possible “simple” operations (primarily edge collapses)Place operations in queue according to errorPerform operations in queue successively (depending on how much you want to simplify model)After each operation, re-evaluate error metrics

Slide30

Geometric Error Metrics

MotivationPromote accurate 3D shape preservationPreserve screen-space silhouettes and pixel coverageTypesVertex-Vertex DistanceVertex-Plane DistancePoint-Surface DistanceSurface-Surface Distance

Slide31

Vertex-Vertex Distance

E = max(|v3−v1|, |v3−v2|)Appropriate during topology changesRossignac and Borrel 93Luebke and Erikson 97Loose for topology-preserving collapses

v

1

v

2

v

3

Slide32

Vertex-Plane Distance

Store set of planes with each vertex

Error based on distance from vertex to planesWhen vertices are merged, merge sets

Ronfard and Rossignac 96Store plane sets, compute max distanceError Quadrics – Garland and Heckbert 96Store quadric form, compute sum of squared distances

a

b

c

d

a

d

b

d

c

Slide33

Point-Surface Distance

For each original vertex,find closest point on simplified surfaceCompute sum of squared distances

Slide34

Surface-Surface Distance

Compute or approximate maximum distance between input and simplified surfacesTolerance Volumes - Guéziec 96Simplification Envelopes - Cohen/Varshney 96Hausdorff Distance - Klein 96Mapping Distance - Bajaj/Schikore 96, Cohen et al. 97

Slide35

Geometric Error Observations

Vertex-vertex and vertex-plane distanceFastLow error in practice, but not guaranteed by metricSurface-surface distanceRequired for guaranteed error bounds

Edge swap

vertex-vertex ≠ surface-surface

Slide36

Mesh Simplification

Advanced ConsiderationsType of input mesh?Modifies topology?Continuous LOD?Speed vs. quality?

Slide37

View-Dependent Simplification

Simplify dynamically according to viewpointVisibilitySilhouettesLighting

Hoppe

Slide38

7,809 tris

3,905 tris

1,951 tris

488 tris

975 tris

Appearance Preserving

Caltech & Stanford Graphics Labs and Jonathan Cohen

Slide39

Summary

Many mesh data structuresCompact storage vs ease, efficiency of useHow fast and easy are key operations Mesh simplificationReduce size of mesh in efficient quality-preserving way

Based on edge collapses mainlyChoose appropriate mesh data structureEfficient to update, edge-collapses are localFairly modern ideas (last 15-20 years)Think about some of it yourself, see papers given outWe will cover simplification, quadric metrics

next