games mesh processing

125
GAMES Mesh Processing Qixing Huang August 26 th 2021

Upload: others

Post on 09-Jan-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GAMES Mesh Processing

GAMESMesh Processing

Qixing Huang

August 26th 2021

Page 2: GAMES Mesh Processing

Material from

A comprehensive book

Well-written

Lecture slides available

Page 3: GAMES Mesh Processing

Take-home messages

• Approximation error *#faces = const.

• Arbitrary topology

• Flexibility for piecewise smooth surfaces

• Flexibility for adaptive refinement

Page 4: GAMES Mesh Processing

Take-home messages

• Approximation error *#faces = const.

• Arbitrary topology

• Flexibility for piecewise smooth surfaces

• Flexibility for adaptive refinement

Page 5: GAMES Mesh Processing

Take-home messages

• Approximation error *#faces = const.

• Arbitrary topology

• Flexibility for piecewise smooth surfaces

• Flexibility for adaptive refinement

Page 6: GAMES Mesh Processing

Take-home messages

• Approximation error *#faces = const.

• Arbitrary topology

• Flexibility for piecewise smooth surfaces

• Flexibility for adaptive refinement

• Implicit representation can support efficient access to vertices, faces…

Page 7: GAMES Mesh Processing

Typical Operations

Page 8: GAMES Mesh Processing

Evaluation

Page 9: GAMES Mesh Processing

Evaluation

Page 10: GAMES Mesh Processing

Evaluation

Page 11: GAMES Mesh Processing

Distance Queries

Page 12: GAMES Mesh Processing

Modifications

Page 13: GAMES Mesh Processing

Modifications

Page 14: GAMES Mesh Processing

Modifications

Page 15: GAMES Mesh Processing

Mesh Data Structures

• How to store geometry & connectivity?

• Compact storage– File formats

• Efficient algorithms on meshes– identify time-critical operations

– all vertices/edges of a face

– all incident vertices/edges/faces of a vertex

Page 16: GAMES Mesh Processing

Face Set (STL)

Page 17: GAMES Mesh Processing

Shared Vertex (OBJ, OFF)

Page 18: GAMES Mesh Processing

Face-Based Connectivity

• Vertex– Position

– 1 Face

• Face– 3 Vertices

– 3 Face neighbors

Page 19: GAMES Mesh Processing

Edge-Based Connectivity

• Vertex– Position

– 1 Edge

• Edge– 2 vertices

– 2 faces

– 4 edges

• Face– 1 edge

Page 20: GAMES Mesh Processing

Halfedge-Based Connectivity

• Vertex– Position

– 1 halfedge

• Halfedge– 1 vertex

– 1 face

– 1,2,or 3 halfedges

• Face– 1 halfedge

Page 21: GAMES Mesh Processing

One-Ring Traversal

• Start at vertex

Page 22: GAMES Mesh Processing

One-Ring Traversal

• Start at vertex

• Outgoing halfedge

Page 23: GAMES Mesh Processing

One-Ring Traversal

• Start at vertex

• Outgoing halfedge

• Opposite halfedge

Page 24: GAMES Mesh Processing

One-Ring Traversal

• Start at vertex

• Outgoing halfedge

• Opposite halfedge

• Next halfedge

Page 25: GAMES Mesh Processing

One-Ring Traversal

• Start at vertex

• Outgoing halfedge

• Opposite halfedge

• Next halfedge

• Opposite

Page 26: GAMES Mesh Processing

One-Ring Traversal

• Start at vertex

• Outgoing halfedge

• Opposite halfedge

• Next halfedge

• Opposite

• Next

• ….

Page 27: GAMES Mesh Processing

Halfedge-Based Libraries

• CGAL– www.cgal.org

– computational geometry

– free for non-commercial use

• OpenMesh– www.openmesh.org

– Mesh processing

– free, LGPL license

Page 28: GAMES Mesh Processing

A Bit Differential Geometry

Page 29: GAMES Mesh Processing
Page 30: GAMES Mesh Processing
Page 31: GAMES Mesh Processing
Page 32: GAMES Mesh Processing
Page 33: GAMES Mesh Processing
Page 34: GAMES Mesh Processing
Page 35: GAMES Mesh Processing
Page 36: GAMES Mesh Processing
Page 37: GAMES Mesh Processing
Page 38: GAMES Mesh Processing

Smoothing

Page 39: GAMES Mesh Processing

Laplacian Diffusion

Page 40: GAMES Mesh Processing

Diffusion

Page 41: GAMES Mesh Processing

Laplacian Smoothing

Page 42: GAMES Mesh Processing

A Simple Example

Page 43: GAMES Mesh Processing

A Simple Example

Page 44: GAMES Mesh Processing

A Simple Example

Page 45: GAMES Mesh Processing

A Simple Example

Page 46: GAMES Mesh Processing

A Simple Example

Page 47: GAMES Mesh Processing

A Simple Example

Page 48: GAMES Mesh Processing

Laplacian Smoothing

Page 49: GAMES Mesh Processing

Curvature Flow

Page 50: GAMES Mesh Processing

Curvature Flow

Page 51: GAMES Mesh Processing

Comparison

Page 52: GAMES Mesh Processing

Other approaches

• Smoothing– Membrane energy

– Thin-plate energy

• Alternative approaches– Anisotropic diffusion

– Normal filtering

– Non-linear PDEs

– Bilateral filtering

Page 53: GAMES Mesh Processing

Remeshing

Page 54: GAMES Mesh Processing

Remeshing

• Altering the mesh geometry and connectivity to improve quality

• Replacing an arbitrarily structured mesh by a structured one

Page 55: GAMES Mesh Processing

Isotropic Remeshing

• Well-shaped elements– for processing & simulation (numerical stability

& efficiency)

Page 56: GAMES Mesh Processing

Iterative Mesh Optimization

• (Area weighted) random scatter (area weighted) random scatter or simply start with the given mesh

• Improve vertex distribution

• Update mesh connectivity

Page 57: GAMES Mesh Processing

Isotropic remeshing prefers.

• Locally uniform edge length– Remove too short edges -- edge collapses

– Remove too long edges – 2-4 edge split

• Regular valences– Valence balance edge flip

• Uniform vertex distribution– Tangential smoothing Laplacian operator

Page 58: GAMES Mesh Processing

Local Remeshing Operators

Page 59: GAMES Mesh Processing

Thresholds Lmin and Lmax

Page 60: GAMES Mesh Processing

Mesh Simplification & Approximation

Page 61: GAMES Mesh Processing

Problem Statement

Page 62: GAMES Mesh Processing

Problem Statement

Page 63: GAMES Mesh Processing

Problem Statement

Page 64: GAMES Mesh Processing

Vertex clustering

• Cluster Generation

• Computing a representative

• Mesh generation

• Topology changes

Page 65: GAMES Mesh Processing

Vertex Clustering

Page 66: GAMES Mesh Processing

Vertex Clustering

Page 67: GAMES Mesh Processing

Vertex Clustering

Page 68: GAMES Mesh Processing

Computing a Representative

Page 69: GAMES Mesh Processing

Computing a Representative

Page 70: GAMES Mesh Processing

Computing a Representative

Page 71: GAMES Mesh Processing

Computing a Representative

Page 72: GAMES Mesh Processing

Error Quadrics

Page 73: GAMES Mesh Processing

Error Quadrics

Page 74: GAMES Mesh Processing

Comparison

Page 75: GAMES Mesh Processing

Vertex Clustering

Page 76: GAMES Mesh Processing

Vertex Clustering

Page 77: GAMES Mesh Processing

Incremental Decimation

• General Setup

• Decimation operators

• Error metrics

• Fairness criteria

• Topology changes

Page 78: GAMES Mesh Processing

General Setup

Page 79: GAMES Mesh Processing

Greedy Optimization

Page 80: GAMES Mesh Processing

Global Error Control

Page 81: GAMES Mesh Processing

Incremental Decimation

• General Setup

• Decimation operators

• Error metrics

• Fairness criteria

• Topology changes

Page 82: GAMES Mesh Processing

Decimation Operators

• What is a "region" ?

• What are the DOF for re-triangulation?

• Classification– Topology-changing vs. topology-preserving

– Subsampling vs. filtering

– Inverse operation → progressive meshes

Page 83: GAMES Mesh Processing

Vertex Removal

Page 84: GAMES Mesh Processing

Vertex Removal

Page 85: GAMES Mesh Processing

Vertex Removal

Page 86: GAMES Mesh Processing

Vertex Removal

Page 87: GAMES Mesh Processing

Decimation Operators

Page 88: GAMES Mesh Processing

Decimation Operators

Page 89: GAMES Mesh Processing

Decimation Operators

Page 90: GAMES Mesh Processing

Local Error Metrics

Page 91: GAMES Mesh Processing

Global Error Metrics

Page 92: GAMES Mesh Processing

Global Error Metrics

Page 93: GAMES Mesh Processing

Global Error Metrics

Page 94: GAMES Mesh Processing

Global Error Metrics

Page 95: GAMES Mesh Processing

Complexity

• N = number of vertices

• Priority queue for half-edges– 6 N * log ( 6 N )

• Error control– Local O(1) -> global O(N)

– Local O(N) -> global O(N2)

Page 96: GAMES Mesh Processing

Fairness Criteria

• Rate quality of decimation operation– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– Color differences

Page 97: GAMES Mesh Processing

Fairness Criteria

• Rate quality of decimation operation– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– Color differences

Page 98: GAMES Mesh Processing

Fairness Criteria

• Rate quality of decimation operation– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– Color differences

Page 99: GAMES Mesh Processing

Fairness Criteria

• Rate quality of decimation operation– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– Color differences

Page 100: GAMES Mesh Processing

Fairness Criteria

• Rate quality of decimation operation– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– Color differences

Page 101: GAMES Mesh Processing

Fairness Criteria

• Rate quality of decimation operation– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– Color differences

Page 102: GAMES Mesh Processing

Fairness Criteria

• Rate quality of decimation operation– Approximation error

– Triangle shape

– Dihedral angles

– Valence balance

– Color differences

Page 103: GAMES Mesh Processing

Comparison

• Vertex clustering– fast, but difficult to control simplified mesh

– topology changes, non-manifold meshes

– global error bound, but often not close to optimum

• Iterative decimation with quadric error metrics– good trade-off between mesh quality and speed

– explicit control over mesh topology

– restricting normal deviation improves mesh quality

Page 104: GAMES Mesh Processing

Mesh Repair

Page 105: GAMES Mesh Processing

Surface-Oriented Algorithms

• Surface oriented approaches explicitly identify and resolve artifacts

• Methods– Snapping

– Splitting

– Stitching

– …

Page 106: GAMES Mesh Processing

Surface-Oriented Algorithms

• Advantages– Fast

– Conceptually easy

– Memory friendly

– Structure preserving, minimal modification of the input

Page 107: GAMES Mesh Processing

Surface-Oriented Algorithms

• Problems– Not robust

• Numerical issues

• Inherent non-robustness

– No quality guarantees on the output

Page 108: GAMES Mesh Processing

Filling Holes in Meshes

Page 109: GAMES Mesh Processing

Filling Holes in Meshes

Page 110: GAMES Mesh Processing

Filling Holes in Meshes

Page 111: GAMES Mesh Processing

Filling Holes in Meshes

Page 112: GAMES Mesh Processing

Filling Holes in Meshes

Page 113: GAMES Mesh Processing

Filling Holes in Meshes

Page 114: GAMES Mesh Processing

Filling Holes in Meshes

Page 115: GAMES Mesh Processing

Filling Holes in Meshes

Page 116: GAMES Mesh Processing

Additional Steps

• Refine the triangulation such that its vertex density matches that of the surrounding area

• Smooth the filling such that its geometry matches that of the surrounding area

Page 117: GAMES Mesh Processing
Page 118: GAMES Mesh Processing

Filling Holes in Meshes

• What problems do we encounter?– Islands are not incorporated

– Self-intersections cannot be excluded

– Quality depends on boundary distortion

Page 119: GAMES Mesh Processing

Volumetric Algorithms

Page 120: GAMES Mesh Processing

Volumetric Algorithms

Page 121: GAMES Mesh Processing

Volumetric Algorithms

Page 122: GAMES Mesh Processing

Volumetric Algorithms

• Advantages– fully automatic

– few (intuitive) user parameters

– Robust

– guaranteed manifold output

Page 123: GAMES Mesh Processing

Volumetric Algorithms

• Problems– slow and memory intensive

• adaptive data structures

– aliasing and loss of features• feature sensitive reconstruction (EMC, DC)

– loss of mesh structure• bad luck (... hybrid approaches)

– large output• mesh decimation

Page 124: GAMES Mesh Processing

Nooruddin and Turkʼs Method

• Point classification: Layered depth images (LDI)– Record n layered depth images

– Project the query point x into each depth image

– If any of the images classifies x as exterior, then x is globally classified as exterior else as interior

Page 125: GAMES Mesh Processing

Summary

• Learn basic operations under the mesh representation

• Learn how to convert other representations into the mesh representation