Geometry Processing & Geometric Queries. Computer Graphics CMU /15-662

Similar documents
Digital Geometry Processing. Computer Graphics CMU /15-662

Geometry Processing & Geometric Queries. Computer Graphics CMU /15-662

Meshes and Manifolds. Computer Graphics CMU /15-662

Applications. Oversampled 3D scan data. ~150k triangles ~80k triangles

CGAL. Mesh Simplification. (Slides from Tom Funkhouser, Adam Finkelstein)

Geometric Modeling. Mesh Decimation. Mesh Decimation. Applications. Copyright 2010 Gotsman, Pauly Page 1. Oversampled 3D scan data

Geometric Features for Non-photorealistiic Rendering

Mesh Representations & Geometry Processing

Mesh Decimation. Mark Pauly

Surface Simplification Using Quadric Error Metrics

Mesh Simplification. Mesh Simplification. Mesh Simplification Goals. Mesh Simplification Motivation. Vertex Clustering. Mesh Simplification Overview

Mesh Repairing and Simplification. Gianpaolo Palma

03 - Reconstruction. Acknowledgements: Olga Sorkine-Hornung. CSCI-GA Geometric Modeling - Spring 17 - Daniele Panozzo

Mesh and Mesh Simplification

CS354 Computer Graphics Surface Representation IV. Qixing Huang March 7th 2018

Meshes: Catmull-Clark Subdivision and Simplification

Introduction to Geometry. Computer Graphics CMU /15-662

Subdivision Curves and Surfaces: An Introduction

Subdivision Surfaces

Processing 3D Surface Data

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

To Do. Resources. Algorithm Outline. Simplifications. Advanced Computer Graphics (Spring 2013) Surface Simplification: Goals (Garland)

Geometric Modeling in Graphics

All the Polygons You Can Eat. Doug Rogers Developer Relations

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D

Subdivision Surfaces

Surface Reconstruction. Gianpaolo Palma

Digital Geometry Processing

3D Modeling Parametric Curves & Surfaces

Subdivision overview

Example: Loop Scheme. Example: Loop Scheme. What makes a good scheme? recursive application leads to a smooth surface.

Information Coding / Computer Graphics, ISY, LiTH. Splines

Appearance Preservation

Introduction to Computer Graphics. Modeling (3) April 27, 2017 Kenshi Takayama

Processing 3D Surface Data

Tutorial 3 Comparing Biological Shapes Patrice Koehl and Joel Hass

CSE 554 Lecture 6: Fairing and Simplification

Subdivision Surfaces. Homework 1: Questions/Comments?

Subdivision. Outline. Key Questions. Subdivision Surfaces. Advanced Computer Graphics (Spring 2013) Video: Geri s Game (outside link)

Processing 3D Surface Data

Curve Corner Cutting

3D Modeling: Surfaces

Voronoi Diagram. Xiao-Ming Fu

Subdivision Surfaces. Homework 1: Questions on Homework? Last Time? Today. Tensor Product. What s an illegal edge collapse?

Curvature-Adaptive Remeshing with Feature Preservation of Manifold Triangle Meshes with Boundary

1. Introduction. 2. Parametrization of General CCSSs. 3. One-Piece through Interpolation. 4. One-Piece through Boolean Operations

Geometric Representations. Stelian Coros

A Developer s Survey of Polygonal Simplification algorithms. CS 563 Advanced Topics in Computer Graphics Fan Wu Mar. 31, 2005

Surface Rendering. Surface Rendering

Multiresolution Meshes. COS 526 Tom Funkhouser, Fall 2016 Slides by Guskov, Praun, Sweldens, etc.

INF3320 Computer Graphics and Discrete Geometry

Introduction to Computer Graphics

As a consequence of the operation, there are new incidences between edges and triangles that did not exist in K; see Figure II.9.

Subdivision Surfaces

Outline. Visualization Discretization Sampling Quantization Representation Continuous Discrete. Noise

Properties of Quadratic functions

Curves and Surfaces 2

UNIVERSITY OF CALGARY. Subdivision Surfaces. Advanced Geometric Modeling Faramarz Samavati

Mesh Decimation Using VTK

9. Three Dimensional Object Representations

11/1/13. Visualization. Scientific Visualization. Types of Data. Height Field. Contour Curves. Meshes

Visualization. CSCI 420 Computer Graphics Lecture 26

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

09 - Designing Surfaces. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo

Physically-Based Modeling and Animation. University of Missouri at Columbia

Visualization Computer Graphics I Lecture 20

Computational Geometry

Curves & Surfaces. Last Time? Progressive Meshes. Selective Refinement. Adjacency Data Structures. Mesh Simplification. Mesh Simplification

Overview. Efficient Simplification of Point-sampled Surfaces. Introduction. Introduction. Neighborhood. Local Surface Analysis

Subdivision surfaces. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Surfaces for CAGD. FSP Tutorial. FSP-Seminar, Graz, November

Lecture IV Bézier Curves

Reading. 18. Projections and Z-buffers. Required: Watt, Section , 6.3, 6.6 (esp. intro and subsections 1, 4, and 8 10), Further reading:

Multi-View Matching & Mesh Generation. Qixing Huang Feb. 13 th 2017

Polygon Meshes and Implicit Surfaces

Subdivision Surfaces. Course Syllabus. Course Syllabus. Modeling. Equivalence of Representations. 3D Object Representations

Polygon Meshes and Implicit Surfaces

Topological Issues in Hexahedral Meshing

08 - Designing Approximating Curves

Modeling. Simulating the Everyday World

Geometric Modeling. Bing-Yu Chen National Taiwan University The University of Tokyo

Outline. Reconstruction of 3D Meshes from Point Clouds. Motivation. Problem Statement. Applications. Challenges

Lecture 3 Mesh. Dr. Shuang LIANG. School of Software Engineering Tongji University Spring 2013

Level Set Extraction from Gridded 2D and 3D Data

Interpolating and Approximating Implicit Surfaces from Polygon Soup

Implicit Surfaces & Solid Representations COS 426

G 2 Interpolation for Polar Surfaces

11/1/13. Polygon Meshes and Implicit Surfaces. Shape Representations. Polygon Models in OpenGL. Modeling Complex Shapes

Height Fields and Contours Scalar Fields Volume Rendering Vector Fields [Angel Ch. 12] April 23, 2002 Frank Pfenning Carnegie Mellon University

CS 130 Exam I. Fall 2015

Geometric Modeling of Curves

Image Warping and Morphing

Sung-Eui Yoon ( 윤성의 )

Know it. Control points. B Spline surfaces. Implicit surfaces

Using Semi-Regular 4 8 Meshes for Subdivision Surfaces

Computer Graphics I Lecture 11

Surface Reconstruction from Unorganized Points

Quadratic Functions. *These are all examples of polynomial functions.

Multi-level Partition of Unity Implicits

Transcription:

Geometry Processing & Geometric Queries Computer Graphics CMU 15-462/15-662

Last time: Meshes & Manifolds Mathematical description of geometry - simplifying assumption: manifold - for polygon meshes: fans, not fins Data structures for surfaces - polygon soup - halfedge mesh - storage cost vs. access time, etc. Today: - how do we manipulate geometry? - geometry processing / resampling next face Halfedge edge twin vertex

Today: Geometry Processing & Queries Extend traditional digital signal processing (audio, video, etc.) to deal with geometric signals: - upsampling / downsampling / resampling / filtering... - aliasing (reconstructed surface gives false impression ) Also ask some basic questions about geometry: - What s the closest point? Do two triangles intersect? Etc. Beyond pure geometry, these are basic building blocks for many algorithms in graphics (rendering, animation...)

Digital Geometry Processing: Motivation 3D Printing 3D Scanning

Geometry Processing Pipeline scan print process

Geometry Processing Tasks reconstruction filtering remeshing shape analysis parameterization compression

Geometry Processing: Reconstruction Given samples of geometry, reconstruct surface What are samples? Many possibilities: - points, points & normals,... - image pairs / sets (multi-view stereo) - line density integrals (MRI/CT scans) How do you get a surface? Many techniques: - silhouette-based (visual hull) - Voronoi-based (e.g., power crust) - PDE-based (e.g., Poisson reconstruction) - Radon transform / isosurfacing (marching cubes)

Geometry Processing: Upsampling Increase resolution via interpolation Images: e.g., bilinear, bicubic interpolation Polygon meshes: - subdivision - bilateral upsampling -...

Geometry Processing: Downsampling Decrease resolution; try to preserve shape/appearance Images: nearest-neighbor, bilinear, bicubic interpolation Point clouds: subsampling (just take fewer points!) Polygon meshes: - iterative decimation, variational shape approximation,...

Geometry Processing: Resampling Modify sample distribution to improve quality Images: not an issue! (Pixels always stored on a regular grid) Meshes: shape of polygons is extremely important! - different notion of quality depending on task - e.g., visualization vs. solving equation Q: What about aliasing?

Geometry Processing: Filtering Remove noise, or emphasize important features (e.g., edges) Images: blurring, bilateral filter, edge detection,... Polygon meshes: - curvature flow - bilateral filter - spectral filter

Geometry Processing: Compression Reduce storage size by eliminating redundant data/ approximating unimportant data Images: - run-length, Huffman coding - lossless - cosine/wavelet (JPEG/MPEG) - lossy Polygon meshes: 840kb - compress geometry and connectivity - many techniques (lossy & lossless) 8kb

Geometry Processing: Shape Analysis Identify/understand important semantic features Images: computer vision, segmentation, face detection,... Polygon meshes: - segmentation, correspondence, symmetry detection,...

Enough overview Let s process some geometry!

Remeshing as resampling Remember our discussion of aliasing Bad sampling makes signal appear different than it really is E.g., undersampled curve looks flat Geometry is no different! - undersampling destroys features - oversampling destroys performance

What makes a good mesh? One idea: good approximation of original shape! Keep only elements that contribute information about shape Add additional information where, e.g., curvature is large

What else makes a good triangle mesh? Another rule of thumb: triangle (pronunciation) GOOD BAD DELAUNAY E.g., all angles close to 60 degrees More sophisticated condition: Delaunay Can help w/ numerical accuracy/stability Tradeoffs w/ good geometric approximation* e.g., long & skinny might be more efficient *See Shewchuk, What is a Good Linear Element

What else constitutes a good mesh? Another rule of thumb: regular vertex degree E.g., valence 6 for triangle meshes (equilateral) GOOD OK BAD Why? Better polygon shape, important for (e.g.) subdivision: subdivide FACT: Can t have perfect valence everywhere! (except on torus)

How do we upsample a mesh?

Upsampling via Subdivision Repeatedly split each element into smaller pieces Replace vertex positions with weighted average of neighbors Main considerations: - interpolating vs. approximating - limit surface continuity (C 1, C 2,...) - behavior at irregular vertices Many options: - Quad: Catmull-Clark - Triangle: Loop, Butterfly, Sqrt(3)

Catmull-Clark Subdivision Step 0: split every polygon (any # of sides) into quadrilaterals: New vertex positions are weighted combination of old ones: STEP 1: Face coords STEP 2: Edge coords STEP 3: Vertex coords New vertex coords: vertex degree average of face coords around vertex average of edge coords around vertex original vertex position

Catmull-Clark on quad mesh smooth reflection lines smooth caustics

Catmull-Clark on triangle mesh (huge number of irregular vertices!) jagged reflection lines jagged caustics

Loop Subdivision Alternative subdivision scheme for triangle meshes Curvature is continuous away from irregular vertices ( C 2 ) Algorithm: - Split each triangle into four - Assign new vertex positions according to weights: 1/8 u u 3/8 3/8 u u n: vertex degree 1/8 1-nu u u u: 3/16 if n=3, 3/(8n) otherwise

Loop Subdivision via Edge Operations First, split edges of original mesh in any order: split Next, flip new edges that touch a new & old vertex: flip (Don t forget to update vertex positions!) Images cribbed from Denis Zorin.

What if we want fewer triangles?

Simplification via Edge Collapse One popular scheme: iteratively collapse edges Greedy algorithm: - assign each edge a cost - collapse edge with least cost - repeat until target number of elements is reached Particularly effective cost function: quadric error metric* 30 #triangles: 30,000 3,000 300 *invented here at CMU! (Garland & Heckbert 1997)

Quadric Error Metric Approximate distance to a collection of triangles Distance is sum of point-to-plane distances - Q: Distance to plane w/ normal N passing through point p? - A: d(x) = N x - N p = N (x-p) Sum of distances: x p N N 3 N 2 N (x-p) N 4 N 5 N 1 p

Quadric Error - Homogeneous Coordinates Suppose in coordinates we have - a query point (x,y,z) - a normal (a,b,c) - an offset d := -(p,q,r) (a,b,c) Then in homogeneous coordinates, let - u := (x,y,z,1) - v := (a,b,c,d) Signed distance to plane is then just u v = ax+by+cz+d Squared distance is (u T v) 2 = u T (vv T )u =: u T Ku Key idea: matrix K encodes distance to plane K is symmetric, contains 10 unique coefficients (small storage)

Quadric Error of Edge Collapse How much does it cost to collapse an edge? Idea: compute edge midpoint, measure quadric error collapse Better idea: use point that minimizes quadric error as new point! Q: Ok, but how do we minimize quadric error?

Review: Minimizing a Quadratic Function Suppose I give you a function f(x) = ax 2 +bx+c f(x) Q: What does the graph of this function look like? Could also look like this! x Q: How do we find the minimum? A: Look for the point where the function isn t changing (if we look up close ) f(x) I.e., find the point where the derivative vanishes x (What about our second example?)

Minimizing a Quadratic Form A quadratic form is just a generalization of our quadratic polynomial from 1D to nd E.g., in 2D: f(x,y) = ax 2 + bxy + cy 2 + dx + ey + g Can always (always!) write quadratic polynomial using a symmetric matrix (and a vector, and a constant): (this expression works for any n!) Q: How do we find a critical point (min/max/saddle)? A: Set derivative to zero! (Can you show this is true, at least in 2D?)

Positive Definite Quadratic Form Just like our 1D parabola, critcal point is not always a min! Q: In 2D, 3D, nd, when do we get a minimum? A: When matrix A is positive-definite: 1D: Must have xax = ax 2 > 0. In other words: a is positive! 2D: Graph of function looks like a bowl : positive definite positive semidefinite indefinite Positive-definiteness is extremely important in computer graphics: it means we can find a minimum by solving linear equations. Basis of many, many modern algorithms (geometry processing, simulation,...).

Minimizing Quadratic Error Find best point for edge collapse by minimizing quad. form Already know fourth (homogeneous) coordinate is 1! So, break up our quadratic function into two pieces: Now we have a quadratic form in the 3D position x. Can minimize as before: (Q: Why should B be positive-definite?)

Quadric Error Simplification: Final Algorithm Compute K for each triangle (distance to plane) Set K at each vertex to sum of Ks from incident triangles Set K at each edge to sum of Ks at endpoints Find point at each edge minimizing quadric error Until we reach target # of triangles: - collapse edge (i,j) with smallest cost to get new vertex m - add K i and K j to get quadric K m at m - update cost of edges touching m More details in assignment writeup!

Quadric Simplification Flipped Triangles Depending on where we put the new vertex, one of the new triangles might be flipped (normal points in instead of out): Easy solution: check dot product between normals across edge If negative, don t collapse this edge!

Things you should know: List practical applications that you can relate to for good geometry processing algorithms. Give criteria for what makes a good quality mesh. Be sure to state your assumptions (e.g., good quality for what purpose?) Give pseudocode for one iteration of Catmull-Clark subdivision Give pseudocode for one iteration of Loop subdivision Explain the important properties of various subdivision algorithms (interpolation, continuity, behavior at the boundaries) Be prepared to calculate vertex updates in a simple example of Loop or other subdivision. (The vertex weighting masks will be given to you.) Understand how the K matrix of the Quadric Error error metric encodes squared distance to a plane. How can it encode the sum of squared distances to many planes? How is this idea used in generating a good error metric for mesh decimation using edge collapse? 37, Spring 2016