Triangle meshes I. CS 4620 Lecture 2

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

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

Mesh Representations & Geometry Processing

Textures and normals in ray tracing

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

Subdivision overview

Pipeline Operations. CS 4620 Lecture 10

Geometric Modeling Mortenson Chapter 11. Complex Model Construction

CS 4620 Midterm, March 21, 2017

9. Three Dimensional Object Representations

Pipeline Operations. CS 4620 Lecture 14

Shape Modeling and Geometry Processing

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

Curvature Berkeley Math Circle January 08, 2013

Appendix E Calculating Normal Vectors

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

3D Modeling Parametric Curves & Surfaces

Research in Computational Differential Geomet

Introduction to Geometry. Computer Graphics CMU /15-662

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Curves and Surfaces. CS475 / 675, Fall Siddhartha Chaudhuri

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

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

Polygon Meshes and Implicit Surfaces

Data Representation in Visualisation

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

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

Subdivision Surfaces

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

Subdivision Surfaces

Central issues in modelling

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

Solid Modeling. Ron Goldman Department of Computer Science Rice University

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) =

3.2 THREE DIMENSIONAL OBJECT REPRESENTATIONS

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

Computergrafik. Matthias Zwicker. Herbst 2010

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

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

3D Modeling: Surfaces

CS 465 Program 4: Modeller

Subdivision Surfaces

All the Polygons You Can Eat. Doug Rogers Developer Relations


Measuring Lengths The First Fundamental Form

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

Lectures in Discrete Differential Geometry 3 Discrete Surfaces

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

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Curriki Geometry Glossary

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

Topological Issues in Hexahedral Meshing

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.

Introduction to Computer Graphics

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

Curve Corner Cutting

Cross-Parameterization and Compatible Remeshing of 3D Models

Constructive Solid Geometry and Procedural Modeling. Stelian Coros

CS 4620 Midterm, October 23, 2018 SOLUTION

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

2D Spline Curves. CS 4620 Lecture 18

Interpolating and Approximating Implicit Surfaces from Polygon Soup

Advanced Computer Graphics

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

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

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

Saab. Kyle McDonald. Polygon Meshes

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

CSCI 4620/8626. Coordinate Reference Frames

04 - Normal Estimation, Curves

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

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

Vectorization Using Stochastic Local Search

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

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

CLASSIFICATION OF SURFACES

MATH 2023 Multivariable Calculus

Surfaces: notes on Geometry & Topology

2D Spline Curves. CS 4620 Lecture 13

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

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

Curves D.A. Forsyth, with slides from John Hart

NVMeshMender User Guide

Scientific Visualization Example exam questions with commented answers

Geometry and Gravitation

EECS 487: Interactive Computer Graphics

ECE 600, Dr. Farag, Summer 09

Transcription:

Triangle meshes I CS 4620 Lecture 2 2014 Steve Marschner 1

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

finite element analysis PATRIOT Engineering 2014 Steve Marschner 3

Ottawa Convention Center 2014 Steve Marschner 4

A small triangle mesh 12 triangles, 8 vertices 2014 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 2014 Steve Marschner 6

2014 Steve Marschner 7

2014 Steve Marschner 7

2014 Steve Marschner 8

2014 Steve Marschner 8

about a trillion triangles from automatically processed satellite and aerial photography Cornell CS4620/5620 Fall 2014 Lecture 2 2014 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 ) 2014 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 2014 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 2014 Steve Marschner 12

Representations for triangle meshes Separate triangles Indexed triangle set shared vertices Triangle strips and triangle fans crucial for first assignment compression schemes for fast transmission Triangle-neighbor data structure supports adjacency queries Winged-edge data structure supports general polygon meshes can read about in textbook (will discuss later if time) 2014 Steve Marschner 13

Separate triangles 2014 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 2014 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 } 2014 Steve Marschner 16

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 } 2014 Steve Marschner 16

Indexed triangle set 2014 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.] 2014 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 2014 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 2014 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 2014 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) 2014 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 2014 Steve Marschner 23

Example: unit sphere position: x = cos sin y =sin z = cos cos normal is position (easy!) θ ɸ 2014 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 2014 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 8%, 11 by factor of 2 16 32 2%, 6 64 0.5%, 3 2014 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 2014 Steve Marschner 27

Triangle strips 4, 0 2014 Steve Marschner 28

Triangle strips 4, 0 2014 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 2014 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 2014 Steve Marschner 30

Topology vs. geometry two completely separate issues: mesh topology: how the triangles are connected (ignoring the positions entirely) geometry: where the triangles are in 3D space 2014 Steve Marschner 31

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

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: topology: how the triangles are connected (ignoring the positions entirely) geometry: where the triangles are in 3D space 2014 Steve Marschner 33

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 2014 Steve Marschner 34

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 2014 Steve Marschner 35

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