GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal...

22
GAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North Carolina at Chapel Hill ABSTRACT We present a new approach for simplifying polygonal objects. Our method is general in that it accepts models that contain both non-manifold geometry and surface attributes. It is automatic since it requires no user input to execute and returns approximate error bounds used to calculate switching distances between levels of detail, or LODs. Our algorithm, called General and Automatic Polygonal Simplification, or GAPS for short, uses an adaptive distance threshold and surface area preservation along with a quadric error metric to join unconnected regions of an object. Its name comes from this ability to “fill in the gaps” of an object. Our algorithm combines approximations of geometric and surface attribute error to produce a unified object space error metric. GAPS can efficiently produce high quality and drastic approximations of a wide variety of objects, including complicated pipe structures. This ability to perform drastic simplification allows us to create levels of detail to accelerate the rendering of large polygonal environments, consisting of hundreds of objects. When viewing these models with LODs created by GAPS, we achieve a 3.5 to 5 times average speedup with little loss in image quality. 1 Introduction The real-time display and walkthrough of large geometric environments is an important problem in computer graphics. Models composed of hundreds of thousands or millions of polygons are common in CAD and scientific visualization applications. Current graphics systems are unable to render such models at interactive rates. A number of techniques that reduce the number of rendered polygons have been proposed in the literature. One of the major approaches involves computing a multi-resolution representation of a given object or portions of an environment. Typically, different representations are used based on their distance from the viewpoint [Clark76 and Heckbert94]. One of the goals of research in this area is to compute multi-resolution representations to aid interactive walkthroughs of spatially large environments composed of hundreds of objects. In order for a simplification algorithm to be useful on these environments, it must robustly, efficiently, and automatically calculate high quality and drastic approximations of objects in the scene. Previous algorithms cannot simultaneously satisfy all these criteria. 1.1 Main Contribution In this paper, we present an algorithm to automatically simplify polygonal objects. Some of the main features of our approach are: General: Polygonal objects often contain modeling errors such as cracks, non-manifold vertices and edges, coincident polygons, and t-joints. In order to enhance visual realism, objects usually include surface attributes such as textures, colors, and normals. We have

Transcript of GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal...

Page 1: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

GAPS: General and Automatic PolygonalSimplification

Carl Erikson, Dinesh ManochaDepartment of Computer Science

University of North Carolina at Chapel Hill

ABSTRACTWe present a new approach for simplifying polygonal objects. Our method is general in that itaccepts models that contain both non-manifold geometry and surface attributes. It is automaticsince it requires no user input to execute and returns approximate error bounds used to calculateswitching distances between levels of detail, or LODs. Our algorithm, called General andAutomatic Polygonal Simplification, or GAPS for short, uses an adaptive distance threshold andsurface area preservation along with a quadric error metric to join unconnected regions of anobject. Its name comes from this ability to “fill in the gaps” of an object. Our algorithm combinesapproximations of geometric and surface attribute error to produce a unified object space errormetric. GAPS can efficiently produce high quality and drastic approximations of a wide variety ofobjects, including complicated pipe structures. This ability to perform drastic simplificationallows us to create levels of detail to accelerate the rendering of large polygonal environments,consisting of hundreds of objects. When viewing these models with LODs created by GAPS, weachieve a 3.5 to 5 times average speedup with little loss in image quality.

1 IntroductionThe real-time display and walkthrough of large geometric environments is an important problemin computer graphics. Models composed of hundreds of thousands or millions of polygons arecommon in CAD and scientific visualization applications. Current graphics systems are unable torender such models at interactive rates. A number of techniques that reduce the number ofrendered polygons have been proposed in the literature. One of the major approaches involvescomputing a multi-resolution representation of a given object or portions of an environment.Typically, different representations are used based on their distance from the viewpoint [Clark76and Heckbert94]. One of the goals of research in this area is to compute multi-resolutionrepresentations to aid interactive walkthroughs of spatially large environments composed ofhundreds of objects. In order for a simplification algorithm to be useful on these environments, itmust robustly, efficiently, and automatically calculate high quality and drastic approximations ofobjects in the scene. Previous algorithms cannot simultaneously satisfy all these criteria.

1.1 Main ContributionIn this paper, we present an algorithm to automatically simplify polygonal objects. Some of themain features of our approach are:• General: Polygonal objects often contain modeling errors such as cracks, non-manifold

vertices and edges, coincident polygons, and t-joints. In order to enhance visual realism,objects usually include surface attributes such as textures, colors, and normals. We have

Page 2: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

demonstrated our algorithm on a variety of objects with these properties, includingradiositized scenes, textured and scanned meshes, CAD environments, and terrain models.

• Automatic: Often it is necessary to simplify a large polygonal scene, containing numerousobjects. It is tedious for a user to input parameters to guide the simplification process foreach object. Our algorithm runs in batch mode, without user intervention. It also produceserror bounds on the simplified object, useful for automatically determining switching distancesbetween LODs. These error bounds are sensitive to both the geometry and the surfaceattributes of the simplified object.

• Drastic: The algorithm can drastically simplify a polygonal object such that a user can target anumber of polygons and the algorithm produces an appropriate simplification.

• High Quality: The algorithm constructs high quality approximations of an object, preservingits basic shape, main features, and surface appearance. The error introduced in the simplifiedobject is comparable to other techniques.

• Topology-simplifying: In order to achieve high quality and drastic simplifications of anarbitrary group of polygons, the algorithm joins unconnected regions of the object, therebysimplifying its topology.

• Efficient: The algorithm simplifies quickly. On average, we are able to perform 500 vertexmerge operations per second on a 195 MHz SGI with R10000 processors.

1.2 OrganizationThe rest of the paper is organized in the following manner. We survey related work in polygonalsimplification in Section 2. Terminology used in the paper is described in Section 3. Section 4

Figure 1: The Cassini spacecraft model consisting of 349,281 faces and 127 objects. UsingLODs created by GAPS, we achieve a 3.5 times average speedup when viewing this model withlittle loss in image quality. When the whole model is in view, we achieve a 10 times speedup,

assuming we allow 6 pixels of error on a 250 MHz SGI Infinite Reality in a 1280x1000 window.GAPS created the LODs for all objects of this model in 274 seconds on a 195 MHz SGI with

R10000 processors.

Page 3: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

presents the details of our algorithm. Implementation details are described in Section 5 while ourresults are presented in Section 6. We compare our approach to other simplification algorithms inSection 7.

2 Previous WorkNumerous methods have been proposed to produce simplified versions of polygonal objects.Most of the earlier work in polygonal simplification focuses on generating levels of detail, orLODs, of a given object. Different algorithms vary in terms of quality of approximation,efficiency, simplification operations, and assumptions on the input model. The common set ofgeometric operations correspond to vertex removal and re-triangulating holes [Bajaj96, Kalvin94,Schroeder92, Soucy96, and Turk92], edge collapses [Cohen97, Cohen98, Guéziec95, Hoppe93,Hoppe96, Kobbelt98, Lindstrom98, and Ronfard96], and triangle removal [Hamann94]. Many ofthe earlier algorithms assume that the input model is a manifold and represented as a valid mesh.Other algorithms include those based on multi-resolution wavelet analysis [Eck95], simplificationenvelopes [Cohen96], and progressive meshes [Hoppe96]. All of these algorithms have beendesigned for manifold surfaces.

For general polygonal models, algorithms based on vertex clustering have been proposed by[Low97, Luebke97, Rossignac93, and Schaufler95]. These algorithms allow topological changesas the model is simplified. [Schroeder97] present a topology modifying decimation algorithm thatcan guarantee a requested reduction level. [He95] and [El-Sana96] demonstrate algorithms forcontrolled simplification of genus of polyhedral objects.

For a more thorough survey of simplification algorithms, consult [Heckbert97].

2.1 Surface Simplification Using Quadric Error Metrics [Garland97]This algorithm, similar to [Ronfard96], tracks an error bound by associating each vertex with a setof planes. However, this method approximates the set of planes using a symmetric matrix calledan error quadric. It uses the vertex merge operation to simplify, so it is able to join unconnectedregions of an object. It is fast and produces high quality results, but is fairly memory intensive.

τ Distance threshold used for selecting virtual edges

α, α−, α+ An amount of surface area

∆(v) Error of an area weighted error quadric of vertex vS(v) Total surface area associated with a vertex’s quadricΓ(v) GAPS geometric error at vertex va0, a1, … Weights corresponding to surface areasΠ(p) Squared error of point p in relation to point cloud cc0 Surface area associated with point cloud cΑ(p) Average error of point p with respect to cloud cΝ(v) GAPS normal error at vertex vC(v) GAPS color error at vertex vΤ(v) GAPS texture coordinate error at vertex vΕ(v) GAPS unified object space error at vertex v

Table 1: Brief descriptions of symbols used in this paper.

Page 4: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

Initially, the error quadric of each vertex consists of planes of the vertex’s adjacent faces plusplanes to preserve sharp edges. Candidates for vertex merging include vertices that share an edgeor two vertices that are within an optional user-specified distance threshold τ. When vertices donot share an edge, but are a candidate pair, we say they share a virtual edge. For each candidatemerge, the optimal vertex position and total error are calculated. The candidates are inserted intoa heap, sorted by increasing error. The vertex merge on top of the heap is performed, and theerror quadric of the new vertex becomes the sum of the quadrics of the merged vertices. Theerror of candidate pairs in the local neighborhood of the merge must be updated. The algorithmcontinues to merge vertices until a target number of faces is achieved.

3 TerminologyThere are several symbols used in this paper and their meanings are briefly described in the Table1. Note that subscripts n, c, and t refer to normal, color, and texture coordinate point cloudsrespectively. For example, cn0 refers to the surface area associated with normal point cloud cn andΑ t(p) is the average error of point p with respect to the texture coordinate point cloud ct. Pointclouds are described in detail in Section 4.3.3.

4 GAPSWe introduce a new simplification algorithm, called General and Automatic PolygonalSimplification, or GAPS, for short. We use the quadric error metric and extend upon it in threeways to meet our simplification goals.• We automatically and adaptively select the distance threshold τ in order to simplify topology

efficiently.• We do not allow vertex merges that change the local surface area greatly in relation to τ

through the use of surface area preservation.• Surface attributes are updated during the simplification process and are incorporated into an

object space error metric.Like other algorithms, GAPS triangulates input objects before starting to simplify.

Page 5: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

4.1 Automatic and Adaptive Selection of Distance ThresholdAs stated in Section 2, [Garland97] allows the user to specify a distance threshold τ thatdetermines all virtual edge pairs for the rest of its execution. If two vertices are within thisdistance τ, then the virtual edge between them is inserted into the heap of candidate edges.However, we would like an algorithm that runs without user intervention. Asking the user toinput a distance threshold for each object in a large model is not acceptable. Furthermore, forsome polygonal objects, specifying a single τ will result in too little or too many virtual edgecandidates (see Figure 2). If there are not enough virtual edge candidates, the quality of thesimplified object may suffer. If there are too many candidates, then the algorithm will executeslowly. Therefore, there is an art to picking a good τ, a burden that users should not need tobare.

GAPS does not use a single distance threshold. Instead, τ starts at a very small value andautomatically grows during the simplification process. Determination of the initial value τ and itssubsequent growth happen automatically, without user intervention. The basic idea of the methodis illustrated in Figure 3.

(a)

(b)

(c)

τ =

τ =

Figure 2: The problem with specifying a single distance threshold τ. (a) The top pair ofrectangles is a scaled copy of the bottom pair. What is a good τ for this model? (b) Grey edgesare real edges and black edges are virtual edges. There are not enough virtual edges when τ isthe shortest distance between the bottom rectangles. (c) There are too many virtual edges when

τ is the shortest distance between the top rectangles.

Page 6: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

In order to find virtual edges within the distance threshold efficiently, we must partition spaceto avoid O(n2) growth. Given the bounding box of the object, we partition it uniformly into cubesof length τ. To determine vertices within τ from a specific vertex, we check only vertices that liein the same cube or corner-adjacent cubes of the vertex. However, when τ is small, the number ofcubes is too large to fit into memory. Therefore, our method represents this uniform grid by ahash table.

The initial guess for τ assumes that the vertices are distributed uniformly throughout thebounding box of the object. Using this starting value of τ, we partition space into cubes of lengthτ. If an insertion of a vertex into the hash table causes a bin to contain more than a constantnumber of vertices, then we deem τ to be invalid. If τ is not valid, then we halve τ and check itsvalidity again.

Vertex pairs that are within the distance threshold τ are flagged as local pairs, whether theyrepresent real or virtual edges. If the error (described in Section 0) associated with the nextpending vertex merge is greater than τ or there are no local pairs remaining, then τ doubles.When τ grows, a new hash table must be created and remaining vertices re-inserted.

(a) τ =

(b) τ =

(c) τ =

Figure 3: Simplification using an adaptive distance threshold. (a) The initial value of τ is theshortest distance between the bottom pair of rectangles. The two pairs of white vertices joinedby virtual edges are merged together. (b) τ grows. The pairs of white vertices joined by real

edges are next to be merged, making the bottom rectangles disappear. (c) Again, τ grows. Notehow the top pair of rectangles is being simplified in the same fashion as the vanished bottom

pair.

Page 7: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

4.2 Surface Area PreservationNormally, vertex merges are performed in order of increasing error based on the error quadrics ateach vertex. Although we feel these quadrics provide a good approximation of geometric error atvertices, there are some cases where merging in order of increasing error leads to poorsimplification choices. Because error quadrics measure distance error at vertices, pairs that arejoined by short edges will most likely be merged first. However, if the merging of two verticeschanges the local surface area drastically, the visual results are unappealing. For example, anisolated long and skinny triangle will disappear if any of its edges collapse. However, thisdisappearance is very noticeable even though the quadric error metric returns a small error for theoperation (see Figure 8). Through the use of surface area preservation, vertex merges thatincrease or decrease the local surface area greatly in relation to τ are not allowed. In many cases,this technique allows GAPS to join unconnected regions of objects, producing higher qualitysimplifications. A demonstration of surface area preservation on a simple model is shown inFigure 4.

To determine whether a vertex merge changes the local surface area drastically relative to τ,we first sum the surface area of each face that is adjacent to at least one of the vertices involved inthe merge. This sum, α−, is the local surface area before the merge operation executes. Tocalculate α+, the local surface area after the merge, we sum the surface areas of any adjacent faceof the new merged vertex. Besides being the distance threshold for virtual edge selection, τ alsodetermines the amount of surface area that can be legally removed or added during a merge.Therefore, τ can be thought of as the current scale at which GAPS is operating. The legal changein surface area is defined to be α = πτ2, i.e., the area of a circle of radius τ. If the change insurface area α+ − α− is greater than α, then the merge is not allowed. If τ grows (see Section

τ =(a) (b) (c) τ =Figure 4: Illustration of surface area preservation on a simple model. (a) The original model.

(b) Simplification without surface area preservation. Gray edges are real edges and blackedges are virtual edges. The white pair of vertices is next to be merged. The order of the vertex

merges is based solely on the distance between pairs, causing the two rectangles to vanishindependently. (c) Using surface area preservation, many of the merges in (b) are not allowed.

The two rectangles join and produce a higher quality simplification.

Page 8: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

0), previously disallowed merge operations may become legal. Intuitively, surface areapreservation temporarily blocks merge operations that cause isolated collections of polygons todisappear. It thereby promotes the merging of unconnected regions of an object in order toproduce higher quality simplifications. An example of determining whether vertex merges arelegal according to surface area preservation is shown in Figure 5.

4.3 Attribute Handling and a Unified Error MetricMany polygonal objects contain geometry as well as surface attributes such as normals, colors,and texture coordinates. Handling these attributes during simplification is an important, butdifficult problem that involves many unsolved perceptual issues. We present a simple, efficient,and intuitive method that provides a reasonable object space error metric. Each type of error,whether it is due to geometry, normals, colors, or texture coordinates, is independently trackedduring simplification.

4.3.1 Interpolating AttributesWe decouple geometric and attribute error and use quadric error metrics for determining mergedvertex positions. Besides locating new vertices, we update any vertex attributes that are adjacentto the edge being collapsed. To determine the new attribute for a merged vertex, we project thevertex onto its local geometry assuming that the merge has not yet occurred. Limiting our searchto this local geometry, we find the nearest face and nearest point on this face from the new vertex.

τ(a)

(b)

Figure 5: Legality check for surface area preservation. On the left, the pairs of white verticesare potential merge candidates. In the middle, the shaded area represents the surface areachange due to the merge. On the right, the shaded area has formed a circle with equivalent

surface area. (a) This operation is not allowed since the area it changes shown in the top circleis greater than α = πτ2, the middle circle. However, if τ doubles, then this operation becomes

legal. (b) The merge is legal because the area in the bottom circle is less than the middle circle.

Page 9: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

Using this nearest point, we interpolate the original attributes to obtain the new interpolatedattribute. In the case of attribute discontinuities at a merged vertex, the process is similar butmore than one pair of attributes are merged.

4.3.2 Geometric ErrorWe handle geometric error by associating with each vertex an error quadric. Initially, we insertthe planes of a vertex’s adjacent faces, weighted by the surface area of each face, into the vertex’serror quadric. In addition, we keep track of the amount of surface area involved in each quadric.Whenever we merge vertices, the error quadric of the new vertex is simply the sum of the errorquadrics of the merged vertices. The surface area involved in the new quadric is the sum of thesurface areas involved in the merged quadrics. If v = [x y z] is the position of a vertex, let ∆(v) bethe area-weighted sum of squared distances between the vertex and its planes. S(v) is defined tobe the total surface area involved in the quadrics at the vertex. We define the final geometricerror as

( )vv

vS

)()(

∆=Γ

Intuitively, this error approximates the average deviation error of the vertex from its set of planes.

4.3.3 Attribute Error Via Point CloudsWe opted to use a very simple, efficient, but approximate method for computing error in attributespace. We independently track different types of attribute error due to normals, colors, andtexture coordinates, by using point clouds. A point cloud is a collection of points enabling theefficient calculation of the sum of squared distances between a specified point and all the points inthe cloud. Assume we are in 3-dimensional space, and there are n points p0, p1, p2, …, pn - 1, withcorresponding weights a0, a1, a2, …, an - 1, in the cloud. Each point has coordinates pi = [xi yi zi],and p = [x y z] is the point of interest. Then the weighted sum of squared distances from thespecified point to the cloud of points is

( ) ( ) ( ) ( )[ ]∑∑−

=

=−+−+−=−=Π

1

0

22221

0

n

iiiii

n

iii zzyyxxaa ppp

For each point cloud, we store a vector c = [c0 c1 c2 c3 c4] where

∑−

==

1

00

n

iiac , ∑

==

1

01

n

iii xac , ∑

==

1

02

n

iii yac , ∑

==

1

03

n

iii zac , and ( )∑

=++=

1

0

2224

n

iiiii zyxac

Using the vector c, we can quickly calculate Π(p) by

( ) ( ) ( ) 4321222

0 2 czcycxczyxc +⋅+⋅+⋅−++=Π p

We define the error of a point p in respect to a point cloud c as

( ) ( )0c

pp

Π=Α

Page 10: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

Intuitively, Α(p) approximates the average error at point p with respect to cloud c.This representation for point clouds makes joining clouds very efficient. Suppose we have

two clouds c0 and c1 and we create a new cloud of points c that contains all points from bothclouds. Then c = c0 + c1. It can be shown that the minimum of Π(p) with respect to a cloud coccurs when p is the weighted average of all the points included in the cloud.

Every vertex, besides containing an error quadric to measure geometric deviation, also keepstrack of a point cloud per type of attribute used. Thus, if an object used normals, colors, andtexture coordinates, the vertex would contain an error quadric, a normal point cloud, a color pointcloud, and a texture coordinate point cloud. To initialize a particular point cloud, we firstcalculate an average attribute for that vertex based on its local surface attributes. We insert thisaverage attribute, weighted by the surface area of the vertex’s adjacent faces, as the only point inthe cloud to begin with. When two vertices merge, we combine their error quadrics as well astheir attribute point clouds. Since we initially store an average attribute in a point cloud, we dolose attribute discontinuity information at vertices. However, we accept this approximation forreasons of efficiency and the fact that attribute discontinuities are handled in part by the quadricerror metric (see Section 5.2).

4.3.3.1 Normal ErrorNormal point clouds consist of three-dimensional points, as in the example point cloud

description above. To find the error in normal space due to two vertices merging, we firstcombine the normal point clouds. Ideally, the interpolated normal resulting from this mergewould be used to determine the error in normal space using the new normal point cloud.However, the operation of interpolating the normals (see Section 4.3.1) is too expensive to beperformed every time we rate the quality of a merge candidate. Therefore, we use an efficient,but very approximate method in its place. For a combined cloud, we assume that the interpolatednormal will be the one that creates the least amount of normal space error.

In order to approximate how much error in object space is due to normals, we use the degreeof error in normal space plus the amount of surface area this error affects. Since the Euclideandistance between two normals on the unit sphere can be at most 2, we halve the average errorΑn(p) of the normal point cloud cn. This normalized value is within the range 0 to 1, indicatingthe degree of error in normal space.

The more surface area this normal error affects, the more visual error there will be due tosimplification. Based on this idea, we transform normal error into object space by using a simplebut very approximate technique. Associated with the point cloud cn is cn0, the sum of all weightsinvolved in the point cloud. However, these weights equal the total surface area represented bythis merged vertex. Therefore, we use cn0 as the total surface area in which the error occurs, andthe normalized error as the degree of error across this area. Suppose pn is the minimal error pointfor point cloud cn. Then, the transformation from error in normal space to normal error in objectspace for a vertex v with normal point cloud cn is

Page 11: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

( )( )

( )ππ 2

2 0n0

n

nn cc ⋅Α=

⋅Α

=Ν n

n

pp

v

Intuitively, this equation starts with surface area cn0 and multiplies it by the degree of normalerror. Next, it finds the radius of the circle whose surface area is equivalent to this multipliedarea. This radius is defined to be the object space error due to normals (see Figure 6).

4.3.3.2 Color ErrorWe assume colors have four components: red, green, blue, and alpha and that these componentsare within the range 0 to 1. Therefore, we must use four-dimensional point clouds to keep trackof color. We represent a four-dimensional point cloud in almost the same way as a three-dimensional one, except we must keep track of six values, rather than five.

Since the distance between two colors in color space can be at most 2, we normalize colorerror by this value. Suppose pc is the minimal error point for color point cloud cc. Then, thetransformation from error in color space to color error in object space for a vertex v with normalpoint cloud cc is

( ) ( )π2

C 0c cc⋅Α= cpv

4.3.3.3 Texture Coordinate ErrorWe assume two-dimensional texture coordinates for our polygonal objects, so we use two-dimensional point clouds to track texture coordinate error. We represent a two-dimensional pointcloud in almost the same way as a three-dimensional one, except we keep track of four values,

r

(a) (b) (c)

Figure 6: Conversion of normal space error to object space error. (a) The two white vertices arenext to be merged. The average normals at the vertices are shown, depicting their initial normal

point clouds. (b) The combined normal point cloud when the vertex pair is merged. The graypoint represents the point of minimum error according to this point cloud. (c) The surface area

of the adjacent faces of the two vertices being merged form the shaded circle above. This area ismodified by the degree of error in normal space to obtain the final affected surface area,

represented by the smaller circle with radius r. r is defined as the object space error due tonormals.

Page 12: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

rather than five. Our technique relies on there being bounded attribute values and thus we assumethat each dimension of a texture coordinate is within range 0 to 1.

Since the distance between two texture coordinates in texture coordinate space can be atmost √2, we normalize texture coordinate error by this value. Suppose pt is the minimal errorpoint for texture coordinate point cloud ct. Then, the transformation from error in attribute spaceto error in object space for a vertex v with texture coordinate point cloud ct is

( ) ( )π2

2 0t tc⋅Α=Τ tpv

4.3.4 Unified Error MetricTherefore, at a vertex v with normal point cloud cn, color point cloud cc, and texture point cloudct, we define the average error to be a weighted average of all of its component errors. In otherwords,

( ) ( ) ( ) ( ) ( ) ( )( ) 000

000

S

CS

tcn

tcn

ccc

ccc

+++Τ⋅+⋅+Ν⋅+Γ⋅=Ε

vvvvvv

v

We use Ε(v) to determine the best candidate vertex pair to merge. To estimate the maximumerror of an object, we take a weighted average of all vertex errors and multiply by a constant.Using this estimate, we automatically calculate switching distances for LODs.

5 ImplementationWe have implemented GAPS using C++, GLUT, and OpenGL. The code is portable across PCand SGI platforms. Our algorithm has produced good results on a variety of datasets includingscanned, terrain, radiositized, and CAD objects.

5.1 Generality and RobustnessGAPS handles all polygonal objects, whether they are manifold meshes or unorganized lists ofpolygons. As a pre-process, objects are triangulated and then cleaned by sharing vertices andcalculating normals. Although these operations are not necessary for GAPS, it can takeadvantage of more topology information to produce better simplifications more efficiently.

Objects consist of vertices, triangular faces, vertex attributes, and face attributes. Vertexattributes are colors, normals, and texture coordinates. Face attributes are colors, materials, andtextures. This categorization is equivalent to the one described in [Hoppe96] and [Hoppe98],except that Hoppe names them scalar and discrete attributes respectively. We use a simpleinternal representation for objects where faces consist of three corners. Each corner has a pointerto a vertex and a vertex attribute. Vertices consist of a three-dimensional point plus a list ofpointers to adjacent faces. Almost any polygonal model can be described with this representation.In practice, we have applied our algorithm to large CAD models composed of non-manifold anddegenerate geometry.

Page 13: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

5.2 DiscontinuitiesAs in [Garland97], additional perpendicular constraint planes are added to the error quadrics ofvertices that lie on boundary edges, or places where there is a geometric discontinuity. Unlike[Garland97] which assigns a large penalty to these planes, we weight them using the surface areaof the face that contains the boundary edge. Similarly, if there is a vertex or face attributediscontinuity occurring at an edge, constraint planes are inserted as if the edge were a boundaryedge. It has been our experience that these extra constraint planes work very well at preservingboth geometric and attribute discontinuities during simplification.

5.3 Main LoopAfter initialization, the main loop of GAPS executes as follows:• Check if τ needs to be doubled. Doubling occurs when either there are no more local pairs in

the heap or when the pair on top of the heap has error greater than τ. When we double τ, wemust recalculate the error and legality of all active pairs.

• Extract the top pair from the heap. Delete the two vertices in the pair from the hash tablewith grid cells of size τ. Insert the new vertex into the hash table to find virtual edges incidentto it. Add quadrics and point clouds of the two vertices and store this information in the newvertex.

• Update or delete pairs affected by the vertex merge.• Repeat until a specified number of vertices or faces remain, or an error threshold has been

reached.

6 ResultsWhen designing GAPS, we had goals of increasing the apparent visual quality of simplifications ascompared to [Garland97], while not slowing the algorithm down significantly.

6.1 Execution SpeedAll of our timing results were generated on an SGI with 195 MHz R10000 processors and 2gigabytes of main memory. Table 2 shows timing comparisons between QSlim and GAPS. Thesetimings include both setup time, such as initializing the error quadrics and determining virtualedge pairs, plus simplification time. For QSlim, we specified options –m (preserve mesh quality),–a (area weight error quadrics), and –B 1000 (penalize boundary edges with weight 1000).Assuming these settings, QSlim runs about twice as fast as GAPS on average.

The Bunny object is the traditional scanned mesh from Stanford University, Head is atexture-mapped scanned mesh (see Figure 13), and Sierra is a terrain model (see Figure 12). Ifthe user knows that an object consists of one connected mesh, then there is little point in using adistance threshold for the selection of virtual edges. Therefore, there is an option in GAPS toturn off virtual edge selection. The timings for GAPS using this option are shown in Table 1 aswell. Even though GAPS is still handling attributes, the results are very similar to the timings ofQSlim.

Only objects that contain disconnected regions of geometry in close proximity benefit fromusing τ. Rotor, Econ, and ShDiv, and Chamber (see Figures 8-11) all fall under this type ofobject. Rotor, Econ, and ShDiv are CAD models while Chamber is a radiositized object. Even if

Page 14: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

we specify a small τ for QSlim, then GAPS, with its adaptive distance threshold, outperformsQSlim on Econ and ShDiv.

6.2 Memory UsageGAPS needs to store extra information at vertices and faces during simplification. Error quadrics,point clouds, and their respective total surface areas are stored at each vertex. Each face has anassociated plane and surface area, used to make GAPS more efficient when checking for meshinversion and surface area preservation. We also store a hash table that contains pointers tovertices and a heap of candidate pairs. Therefore, this algorithm is fairly memory intensive.Assuming we track all attributes, then each vertex requires 26 and each face requires 5 additionalfloating point values of storage.

6.3 Viewing Large Polygonal EnvironmentsWe have used GAPS to create LODs for large polygonal environments consisting of hundreds ofobjects. We use these LODs to accelerate the rendering of these models. We have experiencedan average speedup of 3.5 to 5 times speedup on the complicated CAD models shown in Figures1 and 7. Using the LODs created by GAPS allows us to view these models at interactive framerates with little loss in image quality. To better illustrate this speedup, we recommend watchingthis paper’s accompanying video.

7 ComparisonIn this section, we first compare simplification algorithms that lie in the domain of topologicalsimplification followed by ones that handle surface attributes. [Popovic97] presents an interesting

Object Verts Tris QSlimtime

(secs.)

QSlimtime

using τ(secs.)

GAPSnot

using τ(secs.)

GAPS(secs.)

Rotor 2328 4736 1.45 1.59 1.56 2.19

Head 4925 9580 2.89 3.63 3.51 4.63

Chamber 5685 10423 9.48 17.09 3.50 6.98

Econ 10032 23556 7.61 68.60 7.72 25.22

Bunny 34834 69451 27.23 30.15 27.91 38.72

ShDiv 65245 141180 42.02 170.55 47.35 147.49

Sierra 81920 162690 67.18 182.54 60.41 193.09

Table 2: Simplification timings for various models running on an SGI with 195 MHz R10000processors and 2 gigabytes of main memory. To choose τ for QSlim, we used 1% of the

maximum bounding box dimension of the object being simplified. The “GAPS not using τ”column signifies that attribute error was handled, but that no virtual edges were considered

and no surface area preservation was performed.

Page 15: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

topological simplification algorithm to produce a progressive simplicial complex. This method iselegant, but is too slow for our needs and uses primitives other than polygons. [Rossignac93] and[Low97] use vertex clustering to topologically simplify models efficiently and robustly. Althoughthese algorithms are extremely quick, the quality of their approximations is too low for ourpurposes. [He95] uses a voxel-based approach but control over the degree of simplification isdifficult. [El-Sana97] controls the genus of an object and [Schroeder97] simplifies to any targetnumber of faces quickly, but both are unable to join unconnected regions of an object.

Increasingly more algorithms are addressing surface attributes during the simplificationprocess. [Hoppe96] includes scalar and discrete attributes in the energy function the algorithmtries to minimize. However, this method is too slow for our purposes. [Cohen98] uses textureand normal maps for appearance preserving simplification. Although this algorithm is elegant, itrequires a surface parameterization and uses normal mapping that is not widely available inhardware. Garland and Heckbert extend their original algorithm in [Garland98] to handle surfaceattributes, but ignore topological simplification and use a higher dimensional error quadric metricthat has little intuitive meaning. We efficiently decouple surface attributes from geometry and usea unified error metric that aids automatic selection of switching distances for LODs of an object.[Cignoni98] propose an efficient algorithm that creates surface attributes for a simplified mesh bysampling the original object. However, this method requires the storage of potentially largetexture maps for each level of detail desired.

Figure 7: A close up view of the torpedo room model consisting of 883,537 faces and 356objects. Using LODs created by GAPS, we achieve a 5 times average speedup when viewing thismodel with little loss in image quality. When the whole model is in view, we achieve a 10 times

speedup, assuming we allow 10 pixels of error on a 250 MHz SGI Infinite Reality in a1280x1000 window. GAPS created the LODs for all objects of this model in 834 seconds on a

195 MHz SGI with R10000 processors.

Page 16: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

8 Summary and Future WorkWe present a new topological simplification algorithm that is general, automatic, efficient, handlessurface attributes, produces high quality approximations, and merges unconnected regions ofobjects using an adaptive distance threshold and surface area preservation. It uses an object spaceerror metric that aids the calculation of switching distances for LODs. The algorithm appears towork well on all types of models, ranging from smooth surfaces to disjoint pipes.

There are many avenues for future work. Our approach for attribute handling is veryapproximate and could be improved. We would like to see if the work of [Lindstrom98] could beused to lessen the memory consumption of GAPS. Furthermore, it would be interesting tointegrate the progressive mesh work of [Hoppe96] with the topological simplifications producedby GAPS. Now that more simplification algorithms are handling surface attributes, it would benice to have a comparison tool that measures the quality of each algorithm’s output. This toolwould necessarily use a new error metric involving both geometry and attributes.

9 AcknowledgmentsThe Cassini spacecraft model is courtesy of Stephen Wall, Gary Clough, Don Jacob, and JPL.The Rotor object is courtesy of the Alpha_1 Project at the University of Utah. The Head model iscourtesy of Hans Weber, created using InSpeck Inc. software. The Chamber model was createdby Mike Goslin and David Luebke. The Econ and ShDiv objects are courtesy of Jim Close andABB Engineering. The scanned Bunny object is courtesy of Stanford University. The Sierraterrain model is courtesy of Herman Towles and Sun Microsystems. The torpedo room model iscourtesy of Greg Angelini, Jim Boudreaux, Ken Fast, and Electric Boat, a subsidiary of GeneralDynamics.

This work was supported in part by an Alfred P. Sloan Foundation Fellowship, AROContract DAAH04-96-1-0257, Intel Corp., NIH/National Center for Research Resources Award2P41RR02170-13 on Interactive Graphics for Molecular Studies and Microscopy, NSF grantCCR-9319957 and Career Award, an ONR Young Investigator Award, the NSF/ARPA Centerfor Computer Graphics and Scientific Visualization, and an NCAA Graduate, NSF Graduate, andIntel Fellowships.

10 References[Clark76] Clark, J. “Hierarchical Geometric Models for Visible Surface Algorithms,”

Communications of the ACM, 547-554, 1976.[Cohen96] Cohen, J., Varshney, A., Manocha, D., Turk, G., Weber, H., Agarwal, P.,

Brooks, F., and Wright, W. “Simplification Envelopes,” Computer Graphics(SIGGRAPH ’96 Proceedings), 119-128, 1996.

[Cohen97] Cohen, J., Manocha, D., and Olano, M. “Simplifying Polygonal Models UsingSuccessive Mappings,” IEEE Visualization ’97 Proceedings, 395-402, 1997.

[Cohen98] Cohen, J., Olano, M., and Manocha, D. “Appearance-PreservingSimplification,” Computer Graphics (SIGGRAPH ’98 Proceedings), 115-122.

[Cignoni98] Cignoni, P., Montani, C., Rocchini, C., and Scopigno, R. “A General Methodfor Preserving Attribute Values on Simplified Meshes,” IEEE Visualization’98 Proceedings, 59-66, 1998.

Page 17: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

[Eck95] Eck, M., DeRose, T., Duchamp, T., Hoppe, H., Lounsbery, M., and Stuetzle,W. “Multiresolution Analysis of Arbitrary Meshes,” Computer Graphics(SIGGRAPH ’95 Proceedings), 173-182, 1995.

[El-Sana97] El-Sana, J., and Varshney, A. “Controlled Simplification of Genus forPolygonal Models,” IEEE Visualization ’97 Proceedings, 403-410, 1997.

[Garland97] Garland, M., and Heckbert, P. “Surface Simplification Using Quadric ErrorMetrics,” Computer Graphics (SIGGRAPH ’97 Proceedings), 209-216, 1997.

[Garland98] Garland, M., and Heckbert, P., “Simplifying Surfaces with Color and Textureusing Quadric Error Metrics,” IEEE Visualization ’98 Proceedings, 263-269,1998.

[Guéziec95] Guéziec, A. “Surface Simplification with Variable Tolerance,” Second AnnualIntl. Symp. On Medical Robotics and Computer Assisted Surgery (MRCAS’95), 132-139, 1995.

[Hamann94] Hamann, B. “A Data Reduction Scheme for Triangulated Surfaces,”Computer-Aided Geometric Design, 197-214, 1994.

[He95] He, T., Hong, L., Kaufman, A., Varshney, A., and Wang, S. “Voxel-BasedObject Simplification,” IEEE Visualization ’95 Proceedings, 296-303, 1995.

[Heckbert94] Heckbert, P., and Garland, M. “Multiresolution Modeling for FastRendering,” Graphics Interface ’94 Proceedings, 43-50, 1994.

[Heckbert97] Heckbert, P., and Garland, M. “Survey of Polygonal Surface SimplificationAlgorithms,” Draft of Carnegie Mellon University Computer ScienceTechnical Report, 1997.

[Hoppe93] Hoppe, H., DeRose, T., Duchamp, T., McDonald, J., and Stuetzle, W. “MeshOptimization,” Computer Graphics (SIGGRAPH ’93 Proceedings), 19-26,1993.

[Hoppe96] Hoppe, H. “Progressive Meshes,” Computer Graphics (SIGGRAPH ’96Proceedings), 99-108, 1996.

[Hoppe97] Hoppe, H. “View-Dependent Refinement of Progressive Meshes,” ComputerGraphics (SIGGRAPH ’97 Proceedings), 189-198, 1997.

[Hoppe98] Hoppe, H. “Efficient Implementation of Progressive Meshes,” Computers &Graphics Vol. 22 No. 1, 27-36, 1998.

[Lindstrom98] Lindstrom, P., and Turk,G. “Fast and Memory Efficient PolygonalSimplification,” IEEE Visualization ’98 Proceedings, 279-286, 1998.

[Low97] Low, K., and Tan, T. “Model Simplification Using Vertex-Clustering,”Symposium on Interactive 3D Graphics ’97 Proceedings, 75-82, 1997.

[Luebke97] Luebke, D., and Erikson, C. “View-Dependent Simplification of ArbitraryPolygonal Environments,” Computer Graphics (SIGGRAPH ’97 Proceedings),199-208, 1997.

[Popovic97] Popovic, J., and Hoppe, H. “Progressive Simplicial Complexes,” ComputerGraphics (SIGGRAPH ’97 Proceedings), 217-224, 1997.

[Ronfard96] Ronfard, R., and Rossignac, J. “Full-range Approximation of TriangulatedPolyhedra,” Computer Graphics Forum (Eurographics ’96 Proceedings), 67-76, 1996.

Page 18: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

[Rossignac93] Rossignac, J., and Borrel, P. “Multi-Resolution 3D Approximations forRendering Complex Scenes,” Geometric Modeling in Computer Graphics,455-465, 1993.

[Schroeder92] Schroeder, W., Zarge, J., and Lorensen, W. “Decimation of Triangle Meshes,”Computer Graphics (SIGGRAPH ’92 Proceedings), 65-70, 1992.

[Schroeder97] Schroeder, W. “A Topology Modifying Progressive Decimation Algorithm,”IEEE Visualization ’97 Proceedings, 205-212, 1997.

[Turk92] Turk, G. “Re-Tiling Polygonal Surfaces,” Computer Graphics (SIGGRAPH’92 Proceedings), 55-64, 1992.

Page 19: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

Figure 8: Econ LODs. The top row shows LODs created using the quadric error metric but nodistance threshold and no surface area preservation. Note how the pipes thin duringsimplification. The LODs in the bottom row were created using GAPS. The pipes join togetherat the latter stages of simplification, preserving more of the surface area of the object. TheseLODs from left to right have approximately 23,556 faces (the original object), 5,888 faces,1,470 faces, 368 faces, and 90 faces.

Page 20: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

Figure 9: ShDiv LODs. The top row shows LODs created using the quadric error metric but nodistance threshold and no surface area preservation. The LODs in the bottom row were createdby GAPS. In the latter stages of simplification, the bottom row retains more of the overallstructure of the pipes than the top row. The LODs from left to right have approximately 141,180faces (the original object), 17,644 faces, 2,202 faces, and 272 faces.

Page 21: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

Figure 10: LODs for the Chamber object from a top-down view. The top row shows LODscreated when attribute error is ignored. Note how the shadow and lighting information of this

radiosity model rapidly disappears as the simplification proceeds. The LODs in the bottom rowwere created by GAPS using the unified error metric described in Section 4.3.4. The results aresuperior to the top row in terms of color preservation but notice that the geometry of the lamp is

slightly worse. The LODs from left to right have approximately 10,423 faces (the originalobject), 9,119 faces, 7,817 faces, and 5,210 faces.

Figure 11: Rotor LODs that have 4,736 faces, 1,184 faces, 296 faces, and 72 faces.

Page 22: GAPS: General and Automatic Polygonal SimplificationGAPS: General and Automatic Polygonal Simplification Carl Erikson, Dinesh Manocha Department of Computer Science University of North

Figure 12: Sierra LODs that have 162,690 faces, 20,335 faces, 2,541 faces, and 317 faces.

Figure 13: The left row shows the original texture-mapped Head object and its LODs. The right

row demonstrates the approximate average error bound reported by GAPS for these sameobjects. The radii of the spheres are the approximate errors at the vertices they enclose as

defined by the unified error metric in Section 4.3.4. These error bounds are used toautomatically determine switching distances for LODs. From left to right these objects have

9,580 faces, 2,395 faces, 597 faces, and 148 faces.