Docsity

Triangle Mesh Representation and Simplification, Study Guides, Projects, Research of Computer Graphics

Toggle sidebar
bg1
Advanced 3D Computer Graphics
Prof. Dr. Renato Pajarola
Information & Computer Science
University of California Irvine
ICS 186b, October 20. 2000
1 Polygonal Meshes
Polygonal meshes are (still) the most common representations of 3D surfaces for interactive render-
ing. Even complicated smooth surfaces are often approximated as a collection of planar polygons.
Also more complicated modeling primitives such as spheres and curved surfaces, or solid modeling
constructions used in advanced modeling applications, or rendering systems such as ray-tracing
often have to be tessellated for interactive rendering or further processing. Furthermore, today’s
graphics hardware is optimized for fast processing of triangle meshes. Handling triangle meshes is
sufficient in the sense that planar polygons can easily be triangulated to form a collection of triangles
covering exactly the same planar region. If not specified otherwise, we refer to triangle meshes in
this section.
1.1 Mesh Representation
1.1.1 Mesh properties
To talk about triangle meshes it is important to define the following few terms that are very often
used, and that characterize a triangle mesh. Incidence is defined between vertices, edges, and faces.
All faces sharing an edge are incident to that edge, all faces sharing a vertex are incident to that ver-
tex, all edges sharing a vertex are incident to that vertex, and vice versa.
Definition 1.1
The
boundary
or
boundaries
of a mesh is defined by the set of edges that have only
one incident face.
Definition 1.2
A mesh is called
manifold
if the surrounding of every point on the surface is homeo-
morphic, or topologically equivalent to a disk, or half-disk if the point is on the boundary.
Definition 1.3
The
genus
of a closed manifold surface (with no boundaries) is defined as the number
of topologically different closed paths (cycles, or loops) on the surface that cannot be contracted
along the surface to a singular point. Sometimes this is also referred to as the number of
handles
of
the shape.
Definition 1.4
A mesh is called
orientable
if a consistent orientation of the vertices of the planar
faces exists such that the two vertices of each edge are ordered oppositely for the incident faces.
A polygonal mesh is also often called
matching
or
conforming
if every edge has exactly two incident
faces, or one if the edge is on the boundary. A mesh is not matching if there exist so called
T-vertices
that lie exactly on an edge but are not an endpoint of that edge. Even if T-vertices are manifold with
respect to the surface topology, they are regarded as a singularity since they form a boundary of col-
linear edges. Non-matching triangulations can also create rendering artifacts when using vertex nor-
mals for shading properties. Most of the time a triangulation is assumed to be matching.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Triangle Mesh Representation and Simplification and more Study Guides, Projects, Research Computer Graphics in PDF only on Docsity!

Advanced 3D Computer Graphics

Prof. Dr. Renato Pajarola Information & Computer Science University of California Irvine ICS 186b, October 20. 2000

1 Polygonal Meshes

Polygonal meshes are (still) the most common representations of 3D surfaces for interactive render- ing. Even complicated smooth surfaces are often approximated as a collection of planar polygons. Also more complicated modeling primitives such as spheres and curved surfaces, or solid modeling constructions used in advanced modeling applications, or rendering systems such as ray-tracing often have to be tessellated for interactive rendering or further processing. Furthermore, today’s graphics hardware is optimized for fast processing of triangle meshes. Handling triangle meshes is sufficient in the sense that planar polygons can easily be triangulated to form a collection of triangles covering exactly the same planar region. If not specified otherwise, we refer to triangle meshes in this section.

1.1 Mesh Representation

1.1.1 Mesh properties

To talk about triangle meshes it is important to define the following few terms that are very often used, and that characterize a triangle mesh. Incidence is defined between vertices, edges, and faces. All faces sharing an edge are incident to that edge, all faces sharing a vertex are incident to that ver- tex, all edges sharing a vertex are incident to that vertex, and vice versa.

Definition 1.1 The boundary or boundaries of a mesh is defined by the set of edges that have only one incident face.

Definition 1.2 A mesh is called manifold if the surrounding of every point on the surface is homeo- morphic, or topologically equivalent to a disk, or half-disk if the point is on the boundary.

Definition 1.3 The genus of a closed manifold surface (with no boundaries) is defined as the number of topologically different closed paths (cycles, or loops) on the surface that cannot be contracted along the surface to a singular point. Sometimes this is also referred to as the number of handles of the shape.

Definition 1.4 A mesh is called orientable if a consistent orientation of the vertices of the planar faces exists such that the two vertices of each edge are ordered oppositely for the incident faces.

A polygonal mesh is also often called matching or conforming if every edge has exactly two incident faces, or one if the edge is on the boundary. A mesh is not matching if there exist so called T-vertices that lie exactly on an edge but are not an endpoint of that edge. Even if T-vertices are manifold with respect to the surface topology, they are regarded as a singularity since they form a boundary of col- linear edges. Non-matching triangulations can also create rendering artifacts when using vertex nor- mals for shading properties. Most of the time a triangulation is assumed to be matching.

Mesh Representation

The Euler formula of planar graphs with V vertices, E edges, F faces, and C connected components is given by. For planar triangulations – one component, orientable, manifold, matching – where each edge is shared by two faces, and each face has three edges one can get the relation for vertices and faces as , thus there are roughly twice as many faces as vertices in a typical triangular mesh (and three times as many edges as vertices).

1.1.2 Indexed face list

The indexed face list is a very simple structure to represent a polygonal mesh M consisting of n ver- tices V = { v 1 , v 2 , …, vn } and m faces F = { f 1 , f 2 , …, fm }. Since each k -sided planar face can uniquely be defined by its k vertices (i.e. ordered counter clockwise), a list of k indices into the list of vertices can be used to represent one face. For triangle meshes an indexed face list consists of an array of ver- tices each having three coordinates, and an array of faces each having three indices into the vertex array.

Since triangle meshes have about m = 2· n faces, each triangle has to index 3 vertices, and n vertices can be indexed by log 2 n bits, the indexed triangle list requires 6· n ·log 2 n bits to represent the inci-

Boundary edges Non-manifold vertex^ Non-manifold edge

Shape of genus 1 Non-orientable mesh

V – E + F = 1 + C 2 E = 3 F V – 2 F = 2

vi

vj

vk

f

f 1 v

faces

f vi vj vk

vi

vj

vk

vertices x y z

Mesh Representation

1. Copy or keep the vertex array. 2. Read the indexed faces list and initialize the half-edge triples per face with the correct start- ing vertices. 3. Read the indexed faces list again, and create an auxiliary edge list with 3 entries per face, however, each such entry consists of both endpoints of the edge and an index to the half- edge created in the previous step. The vertex indices of the two endpoints are stored with the smaller vertex index first, and the larger vertex index in the second field. 4. Order the auxiliary edge list lexicographically according to the two vertex indices of each entry. Thus shared edges between two faces will now be adjacent in the auxiliary table, and the reverse half-edge information can be completed for every half-edge.

Omitting the reverse information that can be recomputed when loading the data-structure, the half- edge structure needs exactly the same storage for representing a mesh as the indexed face list. If it includes the reverse information, a mesh with n vertices would require 6· n (log 2 n + log 2 6 n ) bits on average.

Doubly-connected edge list

The doubly-connected edge list (DCL) often used in computational geometry and graph methods consists of three set of records: one for vertices, one for faces, and one for half-edges. Each vertex v stores its coordinates, and a pointer to an arbitrary half-edge that has v as its origin. Each face stores one pointer to a outside bounding half-edge (and a list of half-edge pointers to inner boundaries of holes). Each half-edge stores a pointer to its origin vertex, a pointer to its reverse (twin) edge, and a pointer to the face it bounds, as well as two pointers to the next and previous half-edges bounding the same face.

The half-edge data structure is a simplified version of the DCL without vertex-to-edge and face-to- edge relations, and omitted face pointer per edge. Face to edge relations are rather captured by con- secutively ordering and grouping the half-edges that bound a particular face.

Winged-edge list

The winged-edge data structure, another commonly used graph or mesh representation, stores for each edge pointers to its endpoints, the two faces sharing the edge, and the four incident edges that bound the same faces. Each vertex has a pointer back to one incident edge, and each face also points to one bounding edge.

V

F 1 F 2 E (^1)

E

E (^3)

E 4 E 5 V

Mesh Representation

1.1.4 Triangle strips

Triangle strips are a more efficient representation of triangle meshes when using hardware acceler- ated rendering with limited fast and random access to vertex coordinates. Typically, the hardware of a graphics rendering pipeline can only hold a few vertices in high-speed registers, and must access others from standard memory on the graphics board or even from main memory of the computer. Triangle strips order the vertices data and triangle connectivity information such that reuse of vertex coordinates in registers is optimized.

Triangle strips consist of a sequence of vertices of which every subsequence of 3 vertices defines a triangle. That means that the two last vertices of the previous triangle can be reused with one new vertex to form the next triangle. Thus two consecutive triangles always share an edge, and the order- ing of the vertices around the surface normal must alternate from one to the next triangle. The repre- sentation cost is 2 vertex indices to start a triangle strip, and 1 vertex index per triangle in the triangle strip, thus 2 n · log 2 n + 2 k · log 2 n bits if the mesh consists of k triangle strips. Every vertex is indexed at least twice in this representation.

The strict rule of alternating vertex ordering, and that every subsequence of three vertices must define a valid triangle limit the use of basic triangle strips – stripification may produce large number of fairly short triangle strips. Using generalized triangle strips that can change the alternating order rule using additional modifiers, allows to encode fans and produce longer triangle strips. Neverthe- less, each vertex is still referenced at least twice in a triangle mesh.

Even using the restricted basic triangle strips, the swap effects of generalized triangle strips can be simulated by repeating vertices. The triangle-fan example from the figure can be represented as a tri- angle strip 1,2,3,2,4,2,5,6 with an additional vertex repetition per swap operation. Therefore, because we can have at most one swap operation per triangle, the representation requires at most 2 vertex indices per triangle, and 2 vertices to start a triangle strip, thus 4 n · log 2 n + 2 k · log 2 n bits for k trian- gle strips. Thus with vertex repetition to simulate swap operations each vertex is referenced at least twice, and at most 4 times (if not part of the start triangle of a triangle strip). The sliver triangles cre- ated by vertex repetition, triangles of the form s,t,s, are usually not a problem for hardware acceler- ated rendering.

1

2

3

4

5

6

7

8

9 10 11

12

Basic triangle strip: 1,2,3,4,5,6,7,8,9,10,11,

1 2

3 4

5

6 Generalized triangle strip using: R=restart, O=replace oldest, M=replace middle R1,O2,O3,O4,M5,M or using swap operations: 1,2,3,4,swap,5,swap,

Mesh Simplification

This technique of starting with an initial crude approximation, and increasing the number of geomet- ric elements successively is also referred to as a refinement method rather than a simplification method.

1.2.3 Approximation error

A very important concept for approximations is the error metric used to quantify the approximation accuracy. There are two main categories of error metrics for mesh simplification:

- Object-space error metrics compute the approximation error based on distance functions on the 3D mesh geometry. - Image-space error metrics calculate the approximation error based on the deviation of the rendered images.

It also useful to review the L 2 and L ∞ norms in this context that are commonly used to specify the approximation error. The L 2 norm is , and L ∞ refers to using the distance function d ( x ).

Geometric approximation is often computed as a L 2 or L ∞ norm of a distance metric in 3D (object- space), or possibly also in the 2D view-projection (image-space). Various distance metrics produc- ing different results can be used such as:

- Euclidean distance of removed vertices to simplified mesh (see also Hausdorff distance, and Quadric error metric below) - change in silhouette edges

input polygon initial approximation 1st subdivision 2nd subdivision 3rd subdivision final approximation

image plane (^) 3D space

image-space error metrics object-space error metrics

X (^) 2 d x ( ) x ∈ X

= (^) ∑ X (^) ∞ =MAX x ∈ Xd x ( )

Mesh Simplification

- difference in surface normals - length of edges, size of triangles

The approximation error can also be computed based on the visual difference between the rendered images of the original mesh and the simplified one (image-space). Distance and image difference functions include:

- difference in (all) pixel colors - covered area on screen

Hausdorff distance

The Hausdorff distance between two shapes A and B , using the distance function for and is defined as:

Note that this maximal distance between two shapes requires maximizing the minimal distance over both shapes. Furthermore, the maximal distance can occur anywhere on the shape.

- Often, the Hausdorff distance is approximated only at the vertices of a given polygonal shape, since only the vertices may represent correct geometrical input, and the linear inter- polation in between them – the polygonal faces – is a planar approximation of a possibly smooth surface through the vertices. - This reduces the measurement to calculating distances from output points (the simplified surface) to planes (polygonal faces of the original data set).

Quadric error metric

The special case of calculating the distance of a point to a plane, or set of planes can efficiently be computed using matrix representations. (See also [GH97].)

Given the plane parameters with and the point , thus the parametric representation , the distance of point v to plane p is:

And the squared distance is thus , with the quad-

ric.

The sum of squared distances of point v to a set of planes P is given by:

d a b ( , ) a ∈ A b ∈ B H A B ( , ) =max max( (^) a ∈ A ( min b ∈ Bd a b ( , )) ,max b ∈ B ( min a ∈ Ad b a ( , )))

A

B

p = [ a b c d , , , ] T a^2 + b^2 + c^2 = 1 v =( x y z , , , 1 ) p T^ ⋅ v = 0 d v p ( , ) = p T^ ⋅ v ( p T^ ⋅ v )^2 = ( v T^ ⋅ p ) ⋅ ( p T^ ⋅ v )= v T^ ⋅ ( p p T ) ⋅ v = v T^ ⋅ K (^) p ⋅ v

K (^) p

a^2 ab ac ad ba b^2 bc bd ca cb c^2 cd da db dc d^2

=

d v P ( , )^2 ( p T^ ⋅ v )^2 p ∈ P

∑ v^ ( T^ ⋅ p ) ( p T^ ⋅ v ) p ∈ P

∑ v^ T^ ⋅^ K^ p ⋅ v p ∈ P

∑ v^ T^ K^ p p ∈ P

= = = = ⋅ (^) ∑ ⋅ v

Mesh Simplification

Edge collapse

The edge collapse operation removes the two triangles from the mesh that share the collapsed edge, and distorts (stretches) all remaining triangles originally incident upon the endpoints of the collapsed edge. An edge collapse is specified by one edge, and the new vertex position of the collapsed edge. The dual operation vertex split inserts two new triangles between two specified edges (cut-edges) that share a vertex (split-vertex), and distorts all triangles incident upon the split-vertex. The vertex split can be specified by the split-vertex, the two cut-edges, and the new vertex positions.

Vertex contraction

Vertex contraction refers to an extended notion of collapsing mesh elements where a group of verti- ces and all mesh elements defined exclusively by these vertices (a connected mesh component) are contracted to one single vertex, and all remaining triangles incident to any contracted elements are distorted. The contraction simply needs to specify the group of vertices that are contracted, and the new vertex position. The expansion needs to specify the vertex to be expanded, all new vertex posi- tions, and all the removed incidence relations.

1.2.5 Simplification and refinement methods

A progressive simplification can be achieved by repeated application of the simplification opera- tions, which requires an ordering of the operations with increasing approximation error. Simplifica-

triangle replacement

edge collapse

vertex split

vertex contraction

vertex expansion

Mesh Simplification

tion operations which introduce the smallest approximation errors are performed first. The original mesh can progressively be reconstructed from the coarsest simplified mesh by inverse application of the dual refinement operations.

Vertex decimation

In [SZL92] a sequence of vertex removals was proposed for simplifying polygonal meshes. The error of a vertex removal was measured as the distance of the removed vertex to the average fitting plane of its adjacent vertices. This method preserves the topology of the mesh.

Vertex insertion

Similar to the polyline approximation, methods have been proposed to start with a very crude approximation of the input mesh, and new vertices which reduce the approximation error the most are incrementally inserted. The approximation error of a point is usually measured as its distance to the current coarse triangle mesh. Mesh topology is preserved using this method.

Getting a very coarse mesh that can be used as a starting point to incrementally insert vertices based on their distance to the current mesh can be difficult for arbitrary 3D surfaces, but is easy for 2.5- dimensional meshes such as terrain or height-fields [Lee91].

Vertex clustering

Contraction of a group of vertices based on spatial clustering has been introduced in [RB93]. The bounding box of the input mesh is recursively subdivided into smaller cells until a desired cell size is reached. All vertices within one cell are replaced by one single vertex, and the connectivity of the mesh is updated accordingly, also removing singularities in the mesh. In the basic implementation the cell size is used as an error measure, and can provide a guaranteed bound on the Hausdorff dis- tance measured at the vertices. Topology of the input mesh is typically not retained by vertex cluster- ing.

More sophisticated vertex clustering can be achieved by non-uniform hierarchical spatial subdivi- sion, where the subdivision is controlled by a more accurate geometric distance error metric.

Edge collapsing

removed vertex

fitting plane

distance to plane

vertex clustering

Multiresolution Triangulations

are equally subdivided along that edge by an edge bisection. Generally these strictly hierarchical tri- angulations are created by incrementally subdividing triangles of a coarse mesh.

1.3.2 Triangle pyramid

Repeated replacement of a set of triangles by a smaller group of triangles having the same boundary leads to a triangle pyramid [DeF89]. Note that independent triangle replacements, that have disjunct sets of triangles, can be performed at the same level. The triangle pyramid can be constructed start- ing with the highest resolution mesh, its triangles defining the lowest level of the triangle pyramid. Every triangle on one level is connected to all overlapping triangles of the next level (simplified set of triangles).

A valid triangulation defines a front in the triangle pyramid. A front containing all nodes, triangles on one level of the pyramid obviously represents a valid triangulation. The front can be moved par- tially to a different level only if it includes to complete set of triangles involved in a triangle replace- ment operation.

1.3.3 Vertex hierarchy

A set of edge collapse, or vertex clustering operations define a vertex hierarchy consisting of several trees where nodes represent vertices instead of triangles, and parent-child relations represent the merging of multiple vertices into one. The top-level of the hierarchy, the root nodes of all vertex trees defines the coarsest LOD of the mesh, all leaf nodes together represent the full resolution input

A (^) B C

D

E F G

H

I (^) K L A B C D E F G H (^) I K L

M

N

O

a

M N O

b (^) c

d

e f g h

i k l

m

o n p q r s t

b d^ e c f g h m n o (^) i k (^) l p^ q^ r^ s^ t

a

u v

u v

Multiresolution Triangulations

mesh. For edge collapse operations the vertex hierarchy is a set of binary trees (possibly reduced to only the root nodes for vertices that are never merged with another) [XV96,Hop97].

Valid triangulations are defined by a front through the vertex hierarchy that cuts every possible path from the roots to the leafs of each tree exactly once. The front containing only all root nodes repre- sents the coarsest mesh resolution, all leaf nodes form the complete input mesh. However, note that not all possible fronts represent valid triangulations due to dependencies of edge collapse operations. In the example above the edge contractions e,f and g,h are not mutually independent, a partial order has to be imposed on the two simplification operations (usually given by the construction of the edge collapse hierarchy).

a

b

d

e f

c h

k

l a b

c g h

e f

g

i (^) d i k

l