Top Banner
Polygonal Meshes COS 426, Spring 2021 Princeton University Felix Heide
75

COS 426, Spring 2021 Princeton University Felix Heide

Nov 26, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Meshes

COS 426, Spring 2021

Princeton University

Felix Heide

Page 2: COS 426, Spring 2021 Princeton University Felix Heide

3D Polygonal Mesh

• The power of polygonal meshes

Page 3: COS 426, Spring 2021 Princeton University Felix Heide

3D Object Representations

•Points• Range image

• Point cloud

•Surfaces➢Polygonal mesh

• Parametric

• Subdivision

• Implicit

•Solids• Voxels

• BSP tree

• CSG

• Sweep

•High-level structures• Scene graph

• Application specific

Page 4: COS 426, Spring 2021 Princeton University Felix Heide

3D Polygonal Mesh

• Set of polygons representing a 2D surface embedded in 3D

Zorin & Schroeder

Face

Vertex(x,y,z)

Edge

Page 5: COS 426, Spring 2021 Princeton University Felix Heide

3D Polygonal Mesh

• The power of polygonal meshes

Page 7: COS 426, Spring 2021 Princeton University Felix Heide

3D Polygonal Mesh

http://www.fxguide.com/featured/Comic_Horrors_Rocks_Statues_and_VanDyke/

Page 8: COS 426, Spring 2021 Princeton University Felix Heide

3D Polygonal Mesh

Isenberg

Page 9: COS 426, Spring 2021 Princeton University Felix Heide

3D Polygonal Meshes

• Why are they of interest?• Simple, common representation

• Rendering with hardware support

• Output of many acquisition tools

• Input to many simulation/analysis tools

Viewpoint

Page 10: COS 426, Spring 2021 Princeton University Felix Heide

Outline

• Acquisition

• Representation

• Processing

Page 11: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Acquisition

• Interactive modeling

• Scanners

• Procedural generation

• Conversion

• Simulations

Page 12: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Acquisition

• Interactive modeling

• Scanners

• Procedural generation

• Conversion

• SimulationsSketchup

Blender

Page 13: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Acquisition

• Interactive modeling

• Scanners

• Procedural generation

• Conversion

• Simulations

Digital Michelangelo ProjectStanford

Page 14: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Acquisition

• Interactive modeling

• Scanners

• Procedural generation

• Conversion

• Simulations

sphynx.co.uk

Page 15: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Acquisition

• Interactive modeling

• Scanners

• Procedural generation

• Conversion

• Simulations

Nicky Robinson, COS 426, 2014

Page 16: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Acquisition

• Interactive modeling

• Scanners

• Procedural generation

• Conversion

• Simulations

Peter Maag, COS 426, 2010Fowler et al., 1992

Page 17: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Acquisition

• Interactive modeling

• Scanners

• Procedural generation

• Conversion

• Simulations

Jose Maria De Espona

Marching cubes

Page 19: COS 426, Spring 2021 Princeton University Felix Heide

Outline

• Acquisition

• Representation

• Processing

Page 20: COS 426, Spring 2021 Princeton University Felix Heide

Polygon Mesh Representation

• Important properties of mesh representation?• Efficient traversal of topology

• Efficient use of memory

• Efficient updates

Large Geometric Model RepositoryGeorgia Tech

Page 21: COS 426, Spring 2021 Princeton University Felix Heide

Polygon Mesh Representation

• Possible data structures

Page 22: COS 426, Spring 2021 Princeton University Felix Heide

Independent Faces

• Each face lists vertex coordinates• Redundant vertices

• No adjacency information

Page 23: COS 426, Spring 2021 Princeton University Felix Heide

Vertex and Face Tables (Indexed Vertices)

• Each face lists vertex references• Shared vertices

• Still no adjacency information

Page 24: COS 426, Spring 2021 Princeton University Felix Heide

Full Adjacency Lists

• Store all vertex, edge, and face adjacencies • Efficient adjacency traversal

• Extra storage

Page 25: COS 426, Spring 2021 Princeton University Felix Heide

Full Adjacency Lists

• Can we store only some adjacency relationshipsand derive others?

Page 26: COS 426, Spring 2021 Princeton University Felix Heide

Partial Adjacency - Winged Edge

• Adjacency encoded in edges• All adjacencies in O(1) time

• Little extra storage (fixed records)

• Arbitrary polygons

Page 27: COS 426, Spring 2021 Princeton University Felix Heide

Winged Edge

• Example:

Page 28: COS 426, Spring 2021 Princeton University Felix Heide

Half Edge

• traversals do not require “ifs” in code

• consistent orientation

Page 29: COS 426, Spring 2021 Princeton University Felix Heide

Half Edge … in more detail

• Each half-edge stores:• Its twin half-edge

Page 30: COS 426, Spring 2021 Princeton University Felix Heide

Half Edge

• Each half-edge stores:• Its twin half-edge

• The next half-edge

Page 31: COS 426, Spring 2021 Princeton University Felix Heide

Half Edge

• Each half-edge stores:• Its twin half-edge

• The next half-edge

• The next vertex

Page 32: COS 426, Spring 2021 Princeton University Felix Heide

Half Edge

• Each half-edge stores:• Its twin half-edge

• The next half-edge

• The next vertex

• The incident face

Page 33: COS 426, Spring 2021 Princeton University Felix Heide

Half Edge

• Each half-edge stores:• Its twin half-edge

• The next half-edge

• The next vertex

• The incident face

• Each face stores:• 1 adjacent half-edge

• Each vertex stores:• 1 outgoing half-edge

Page 34: COS 426, Spring 2021 Princeton University Felix Heide

Half Edge

• Queries. How do you find:• All faces incident to an edge?

• All vertices of a face?

• All faces incident to a face?

• All vertices incident to a vertex?

Page 35: COS 426, Spring 2021 Princeton University Felix Heide

Half Edge

• Adjacency encoded in edges• All adjacencies in O(1) time

• Little extra storage (fixed records)

• Arbitrary polygons

• Assumes 2-Manifold surfaces

Page 36: COS 426, Spring 2021 Princeton University Felix Heide

Outline

• Acquisition

• Representation

• Processing

Page 37: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Page 38: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis➢Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Page 39: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis➢Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Face normals:

Page 40: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis➢Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Vertex normals:

Page 41: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis➢Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Vertex normals:

for each face-calculate face normal-add normal to each connected vertex normal

for each vertex normal-normalize

Page 42: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis➢Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Lucas Mayer, COS 426, 2014

“The bunny with normal vertices shown. Reminded me of an album cover so I made it into one.”

Page 43: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals➢Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Page 44: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals➢Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

C0 C1 C2

Page 45: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps➢Rotate• Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Page 46: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps• Rotate➢Deform

• Filters• Smooth• Sharpen• Truncate• Bevel

Sheffer

Page 47: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps• Rotate• Deform

• Filters➢Smooth• Sharpen• Truncate• Bevel

Thouis “Ray” Jones

How?

Page 48: COS 426, Spring 2021 Princeton University Felix Heide

The Laplacian Operator

• Mesh formulation:

Olga Sorkine

Average of

Neighboring

Vertices

is the number of

neighbors.

Page 49: COS 426, Spring 2021 Princeton University Felix Heide

5

5

• The Laplacian operator Δ

𝐿(𝑣𝑖) = Δ 𝑣𝑖 =Σ𝑗∈1𝑟𝑖𝑛𝑔𝑖

𝑣𝑗−𝑣𝑖

#1𝑟𝑖𝑛𝑔𝑖

• In matrix form:

𝐿𝑖𝑗 = ൞

−𝑤𝑖𝑗 𝑖 ≠ 𝑗

Σ𝑗∈1𝑟𝑖𝑛𝑔𝑖𝑤𝑖𝑗 𝑖 = 𝑗

0 𝑒𝑙𝑠𝑒

The Laplacian Operator

Page 50: COS 426, Spring 2021 Princeton University Felix Heide

The Laplacian Operator

• The Laplacian operator Δ

𝐿(𝑣𝑖) = Δ 𝑣𝑖 =Σ𝑗∈1𝑟𝑖𝑛𝑔𝑖

𝑣𝑗−𝑣𝑖

#1𝑟𝑖𝑛𝑔𝑖

• However, Meshes are irregular

Page 51: COS 426, Spring 2021 Princeton University Felix Heide

• The Laplacian operator Δ

𝐿(𝑣𝑖) = Δ 𝑣𝑖 =Σ𝑗∈1𝑟𝑖𝑛𝑔𝑖

𝑣𝑗−𝑣𝑖

#1𝑟𝑖𝑛𝑔𝑖

• However, Meshes are irregular

• Cotangent weights:

𝐿(𝑝𝑖) =Σ𝑗∈1𝑟𝑖𝑛𝑔𝑖

𝑤𝑖𝑗⋅𝑝𝑗

Σ𝑗∈1𝑟𝑖𝑛𝑔𝑖𝑤𝑖𝑗

− 𝑝𝑖

𝑤𝑖𝑗 =cot 𝛼𝑖𝑗 +cot 𝛽𝑖𝑗

2

The Laplacian Operator

Solve:

Page 52: COS 426, Spring 2021 Princeton University Felix Heide

The Laplacian Operator

• Applicable to:• Deformation, by adding constraints

Page 53: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

Sorkine

Deformation

Page 54: COS 426, Spring 2021 Princeton University Felix Heide

The Laplacian Operator

• Applicable to:• Deformation, by adding constraints

• Blending, by concatenating rows

Page 55: COS 426, Spring 2021 Princeton University Felix Heide

The Laplacian Operator

• Applicable to:• Deformation, by adding constraints

• Blending, by concatenating rows

• Hole filling, by 0’s on the RHS

Page 56: COS 426, Spring 2021 Princeton University Felix Heide

The Laplacian Operator

• Applicable to:• Deformation, by adding constraints

• Blending, by concatenating rows

• Hole filling, by 0’s on the RHS

• Coating (or detail transfer), by copying RHS values (after filtering)

Page 57: COS 426, Spring 2021 Princeton University Felix Heide

The Laplacian Operator

• Applicable to:• Deformation, by adding constraints

• Blending, by concatenating rows

• Hole filling, by 0’s on the RHS

• Coating (or detail transfer), by copying RHS values (after filtering)

• Spectral mesh processing, through eigen analysis

Page 58: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth➢Sharpen• Truncate• Bevel

Desbrun

Olga Sorkine

Weighted Average

of Neighbor Vertices

Page 59: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen➢Truncate• Bevel

Conway

0.35

Page 60: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen➢Truncate• Bevel

Wikipedia

Page 61: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen➢Truncate• Bevel

http://www.uwgb.edu/dutchs/symmetry/archpol.htm

Archimedean Polyhedra

Page 62: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Analysis• Normals• Curvature

• Warps• Rotate• Deform

• Filters• Smooth• Sharpen• Truncate➢Bevel

Jarek Rossignac Conway

0.40

Wikipedia

Page 63: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing• Subdivide

• Resample

• Simplify

• Topological fixup• Fill holes

• Fix self-intersections

• Boolean operations• Crop

• Subtract

Page 64: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing• Subdivide

• Resample

• Simplify

• Topological fixup• Fill holes

• Fix self-intersections

• Boolean operations• Crop

• Subtract

Collapse edge

Remove Vertex

Subdivide face

Page 65: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing➢Subdivide

• Resample

• Simplify

• Topological fixup• Fill holes

• Fix self-intersections

• Boolean operations• Crop

• Subtract

Zorin & Schroeder

Page 66: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing➢Subdivide

• Resample

• Simplify

• Topological fixup• Fill holes

• Fix self-intersections

• Boolean operations• Crop

• Subtract

Matt Matl, COS 426, 2014

Page 67: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing➢Subdivide

• Resample

• Simplify

• Topological fixup• Fill holes

• Fix self-intersections

• Boolean operations• Crop

• Subtract

Dirk Balfanz, Igor Guskov, Sanjeev Kumar, & Rudro Samanta,

Fractal Landscape

Page 68: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing• Subdivide

➢Resample

• Simplify

• Topological fixup• Fill holes

• Fix self-intersections

• Boolean operations• Crop

• Subtract Stanford

- more uniform distribution- triangles with nicer aspect

Page 69: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing• Subdivide

• Resample

➢Simplify

• Topological fixup• Fill holes

• Fix self-intersections

• Boolean operations• Crop

• Subtract

Stanford

Page 70: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing• Subdivide

• Resample

• Simplify

• Topological fixup➢Fill holes

• Fix self-intersections

• Boolean operations• Crop

• Subtract

Podolak

Page 71: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing• Subdivide

• Resample

• Simplify

• Topological fixup• Fill holes

➢Fix self-intersections

• Boolean operations• Crop

• Subtract

Borodin

Page 72: COS 426, Spring 2021 Princeton University Felix Heide

Polygonal Mesh Processing

• Remeshing• Subdivide

• Resample

• Simplify

• Topological fixup• Fill holes

• Fix self-intersections

• Boolean operations➢Crop

➢Subtract

➢Etc.

Page 73: COS 426, Spring 2021 Princeton University Felix Heide

Summary

• Polygonal meshes• Most common surface representation

• Fast rendering

• Processing operations• Must consider irregular vertex sampling

• Must handle/avoid topological degeneracies

• Representation• Which adjacency relationships to store

depend on which operations must be efficient

Page 74: COS 426, Spring 2021 Princeton University Felix Heide

3D Polygonal Meshes

• Properties? Efficient display? Easy acquisition? Accurate? Concise? Intuitive editing? Efficient editing? Efficient intersections? Guaranteed validity? Guaranteed smoothness? etc.

Viewpoint

Page 75: COS 426, Spring 2021 Princeton University Felix Heide

3D Polygonal Meshes

• Properties☺Efficient display

☺Easy acquisition

Accurate

Concise

Intuitive editing

Efficient editing

Efficient intersections

Guaranteed validity

Guaranteed smoothness

Viewpoint