Triangle meshes I. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2017

Similar documents
Triangle meshes I. CS 4620 Lecture 2

Triangle meshes I. CS 4620 Lecture Kavita Bala (with previous instructor Marschner) Cornell CS4620 Fall 2015 Lecture 2

Triangle meshes. Computer Graphics CSE 167 Lecture 8

Notation. Triangle meshes. Topology/geometry examples. Validity of triangle meshes. n T = #tris; n V = #verts; n E = #edges

Triangle meshes COMP575/COMP 770

Meshes. CS4620/5620: Lecture 17. Announcements. Prelim next Thursday. In the evening, closed book Including material of this week.

polygon meshes polygon meshes representation

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

Mesh Representations & Geometry Processing

Subdivision overview

Textures and normals in ray tracing

CS 4620 Midterm, March 21, 2017

9. Three Dimensional Object Representations

Shape Modeling and Geometry Processing

Geometric Modeling Mortenson Chapter 11. Complex Model Construction

Pipeline Operations. CS 4620 Lecture 10

3D Modeling Parametric Curves & Surfaces

Pipeline Operations. CS 4620 Lecture 14

Curvature Berkeley Math Circle January 08, 2013

Introduction to Geometry. Computer Graphics CMU /15-662

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

Triangle meshes 2. CS 4620 Lecture Steve Marschner. Cornell CS4620 Fall 2018 Lecture 3

Research in Computational Differential Geomet

Differential Geometry: Circle Packings. [A Circle Packing Algorithm, Collins and Stephenson] [CirclePack, Ken Stephenson]

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

Barycentric Coordinates and Parameterization

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

Polygon Meshes and Implicit Surfaces

Appendix E Calculating Normal Vectors

Polygon Meshes and Implicit Surfaces

Computer Graphics. Prof. Feng Liu. Fall /14/2016

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

Curves and Surfaces. CS475 / 675, Fall Siddhartha Chaudhuri

All the Polygons You Can Eat. Doug Rogers Developer Relations

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

Curves: We always parameterize a curve with a single variable, for example r(t) =

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

3.2 THREE DIMENSIONAL OBJECT REPRESENTATIONS

Data Representation in Visualisation

Subdivision Surfaces

05 - Surfaces. Acknowledgements: Olga Sorkine-Hornung. CSCI-GA Geometric Modeling - Daniele Panozzo

Introduction to Computer Graphics

3D Modeling: Surfaces

CS 465 Program 4: Modeller

Subdivision Surfaces

Central issues in modelling

Curve Corner Cutting

Shape Modeling. Differential Geometry Primer Smooth Definitions Discrete Theory in a Nutshell. CS 523: Computer Graphics, Spring 2011

Measuring Lengths The First Fundamental Form


Lectures in Discrete Differential Geometry 3 Discrete Surfaces

Solid Modeling. Ron Goldman Department of Computer Science Rice University

Curriki Geometry Glossary

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

Computergrafik. Matthias Zwicker. Herbst 2010

We have set up our axioms to deal with the geometry of space but have not yet developed these ideas much. Let s redress that imbalance.

A simple problem that has a solution that is far deeper than expected!

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

Geometric Algorithms in Three Dimensions Tutorial. FSP Seminar, Strobl,

Subdivision Surfaces

Cross-Parameterization and Compatible Remeshing of 3D Models

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

CS 4620 Midterm, October 23, 2018 SOLUTION

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Worksheet 3.5: Triple Integrals in Spherical Coordinates. Warm-Up: Spherical Coordinates (ρ, φ, θ)

Topological Issues in Hexahedral Meshing

Solid Modelling. Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO

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

CSCI 4620/8626. Coordinate Reference Frames

Saab. Kyle McDonald. Polygon Meshes

04 - Normal Estimation, Curves

Outline. CGAL par l exemplel. Current Partners. The CGAL Project.

LAMC Advanced Circle October 9, Oleg Gleizer. Warm-up

Constructive Solid Geometry and Procedural Modeling. Stelian Coros

Vectorization Using Stochastic Local Search

Computer Aided Engineering Design Prof. Anupam Saxena Department of Mechanical Engineering Indian Institute of Technology, Kanpur.

CLASSIFICATION OF SURFACES

MATH 2023 Multivariable Calculus

CS 4620 Final Exam. (a) Is a circle C 0 continuous?

This controller extract information about Faces,Edges and Vertices of an Editable Mesh or Editable Poly object.

2D Spline Curves. CS 4620 Lecture 18

Geometry and Gravitation

Advanced Computer Graphics

Unit 10 Study Guide: Plane Figures

Geometric Modeling Topics

NVMeshMender User Guide

ECE 600, Dr. Farag, Summer 09

Polygonization of Implicit Surfaces

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

Math 366 Lecture Notes Section 11.4 Geometry in Three Dimensions

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Interpolating and Approximating Implicit Surfaces from Polygon Soup

Rational Numbers: Graphing: The Coordinate Plane

Transcription:

Triangle meshes I CS 4620 Lecture 2 2017 Steve Marschner 1

spheres Andrzej Barabasz approximate sphere Rineau & Yvinec CGAL manual 2017 Steve Marschner 2

finite element analysis PATRIOT Engineering 2017 Steve Marschner 3

Ottawa Convention Center 2017 Steve Marschner 4

A small triangle mesh 12 triangles, 8 vertices 2017 Steve Marschner 5

A large mesh 10 million triangles from a high-resolution 3D scan Traditional Thai sculpture scan by XYZRGB, inc., image by MeshLab project 2017 Steve Marschner 6

2017 Steve Marschner 7

2017 Steve Marschner 8

about a trillion triangles from automatically processed satellite and aerial photography Cornell CS4620/5620 Spring 2017 2017 Steve Marschner (with previous instructors James/Bala) 9

Triangles Defined by three vertices Lives in the plane containing those vertices Vector normal to plane is the triangle s normal Conventions (for this class, not everyone agrees): vertices are counter-clockwise as seen from the outside or front surface normal points towards the outside ( outward facing normals ) 2017 Steve Marschner 10

Triangle meshes A bunch of triangles in 3D space that are connected together to form a surface Geometrically, a mesh is a piecewise planar surface almost everywhere, it is planar exceptions are at the edges where triangles join Often, it s a piecewise planar approximation of a smooth surface in this case the creases between triangles are artifacts we don t want to see them 2017 Steve Marschner 11

Representation of triangle meshes Compactness Efficiency for rendering enumerate all triangles as triples of 3D points Efficiency of queries all vertices of a triangle all triangles around a vertex neighboring triangles of a triangle (need depends on application) finding triangle strips computing subdivision surfaces mesh editing 2017 Steve Marschner 12

Representations for triangle meshes Separate triangles Indexed triangle set shared vertices Triangle strips and triangle fans compression schemes for fast transmission Triangle-neighbor data structure supports adjacency queries Winged-edge data structure supports general polygon meshes crucial for first assignment Interesting and useful but not used in Mesh assignment 2017 Steve Marschner 13

Separate triangles 2017 Steve Marschner 14

Separate triangles array of triples of points float[n T ][3][3]: about 72 bytes per vertex 2 triangles per vertex (on average) 3 vertices per triangle 3 coordinates per vertex 4 bytes per coordinate (float) various problems wastes space (each vertex stored 6 times) cracks due to roundoff difficulty of finding neighbors at all 2017 Steve Marschner 15

Indexed triangle set Store each vertex once Each triangle points to its three vertices Triangle { Vertex vertex[3]; } Vertex { float position[3]; // or other data } //... or... Mesh { float verts[nv][3]; // vertex positions (or other data) int tind[nt][3]; // vertex indices } 2017 Steve Marschner 16

Indexed triangle set 2017 Steve Marschner 17

Estimating storage space n T = #tris; n V = #verts; n E = #edges Euler: n V n E + n T = 2 for a simple closed surface and in general sums to small integer argument for implication that n T :n E :n V is about 2:3:1 [Foley et al.] 2017 Steve Marschner 18

Indexed triangle set array of vertex positions float[n V ][3]: 12 bytes per vertex (3 coordinates x 4 bytes) per vertex array of triples of indices (per triangle) int[n T ][3]: about 24 bytes per vertex 2 triangles per vertex (on average) (3 indices x 4 bytes) per triangle total storage: 36 bytes per vertex (factor of 2 savings) represents topology and geometry separately finding neighbors is at least well defined 2017 Steve Marschner 19

Data on meshes Often need to store additional information besides just the geometry Can store additional data at faces, vertices, or edges Examples colors stored on faces, for faceted objects information about sharp creases stored at edges any quantity that varies continuously (without sudden changes, or discontinuities) gets stored at vertices 2017 Steve Marschner 20

Key types of vertex data Surface normals when a mesh is approximating a curved surface, store normals at vertices Texture coordinates 2D coordinates that tell you how to paste images on the surface Positions at some level this is just another piece of data position varies continuously between vertices 2017 Steve Marschner 21

Differential geometry 101 Tangent plane at a point on a smooth surface in 3D, there is a unique plane tangent to the surface, called the tangent plane Normal vector vector perpendicular to a surface (that is, to the tangent plane) only unique for smooth surfaces (not at corners, edges) 2017 Steve Marschner 22

Surface parameterization A surface in 3D is a two-dimensional thing Sometimes we need 2D coordinates for points on the surface Defining these coordinates is parameterizing the surface Examples: cartesian coordinates on a rectangle (or other planar shape) cylindrical coordinates (θ, y) on a cylinder latitude and longitude on the Earth s surface spherical coordinates (θ, ɸ) on a sphere 2017 Steve Marschner 23

Example: unit sphere position: x = cos sin y =sin z = cos cos normal is position (easy!) θ ɸ 2017 Steve Marschner 24

How to think about vertex normals Piecewise planar approximation converges pretty quickly to the smooth geometry as the number of triangles increases for mathematicians: error is O(h 2 ) But the surface normals don t converge so well normal is constant over each triangle, with discontinuous jumps across edges for mathematicians: error is only O(h) Better: store the real normal at each vertex, and interpolate to get normals that vary gradually across triangles 2017 Steve Marschner 25

Interpolated normals 2D example Approximating circle with increasingly many segments Max error in position error drops by factor of 4 at each step Max error in normal only drops by factor of 2 16 8%, 11 32 2%, 6 0.5%, 3 64 2017 Steve Marschner 26

Triangle strips Take advantage of the mesh property each triangle is usually adjacent to the previous let every vertex create a triangle by reusing the second and third vertices of the previous triangle every sequence of three vertices produces a triangle (but not in the same order) e. g., 0, 1, 2, 3, 4, 5, 6, 7, leads to (0 1 2), (2 1 3), (2 3 4), (4 3 5), (4 5 6), (6 5 7), for long strips, this requires about one index per triangle 2017 Steve Marschner 27

Triangle strips 4, 0 2017 Steve Marschner 28

Triangle strips array of vertex positions float[n V ][3]: 12 bytes per vertex (3 coordinates x 4 bytes) per vertex array of index lists int[n S ][variable]: 2 + n indices per strip on average, (1 + ε) indices per triangle (assuming long strips) 2 triangles per vertex (on average) about 4 bytes per triangle (on average) total is 20 bytes per vertex (limiting best case) factor of 3.6 over separate triangles; 1.8 over indexed mesh 2017 Steve Marschner 29

Triangle fans Same idea as triangle strips, but keep oldest rather than newest every sequence of three vertices produces a triangle e. g., 0, 1, 2, 3, 4, 5, leads to (0 1 2), (0 2 3), (0 3 4), (0 4 5), for long fans, this requires about one index per triangle Memory considerations exactly the same as triangle strip 2017 Steve Marschner 30

Validity of triangle meshes in many cases we care about the mesh being able to bound a region of space nicely in other cases we want triangle meshes to fulfill assumptions of algorithms that will operate on them (and may fail on malformed input) two completely separate issues: mesh topology: how the triangles are connected (ignoring the positions entirely) geometry: where the triangles are in 3D space 2017 Steve Marschner 31

Topology/geometry examples same geometry, different mesh topology: same mesh topology, different geometry: 2017 Steve Marschner 32

Topological validity manifold not manifold strongest property: be a manifold this means that no points should be "special" interior points are fine edge points: each edge must have exactly 2 triangles vertex points: each vertex must have one loop of triangles slightly looser: manifold with boundary weaken rules to allow boundaries with boundary 2017 Steve Marschner 33

Topological validity Consistent orientation Which side is the front or outside of the surface and which is the back or inside? rule: you are on the outside when you see the vertices in counter-clockwise order in mesh, neighboring triangles should agree about which side is the front! caution: not always possible C C D D non-orientable B OK A B bad A 2017 Steve Marschner 34

Geometric validity generally want non-self-intersecting surface hard to guarantee in general because far-apart parts of mesh might intersect 2017 Steve Marschner 35