GeMS: Generic Memoryless Polygonal ... - Semantic Scholar

1 downloads 0 Views 186KB Size Report
Jul 31, 2000 - existing error measures in the decimation process. ... tion framework, allowing for the use of many atomic decimation scheme in a memoryless ...
GeMS: Generic Memoryless Polygonal Simplification CS00-10-00 Richard Southern Edwin Blake Patrick Marais July 31, 2000

Abstract Surface simplification is of critical importance in limited-bandwidth visualisation applications. Complex models can be reduced significantly in size and complexity, but recent analysis techniques also allow the usage of progressive and view-dependant transmission of surfaces in a loss-less fashion. In this paper we present a framework for surface simplification capable of using most existing error measures in the decimation process.

1 Introduction Issues of mesh simplification and compression are crucial in the storage and transmission of large scenes (such as those in [LRG+ 00]). Surfaces generated using conventional 3D scanning techniques are large and expensive to store and transmit, let alone to render, considering that they typically contain a large amount of redundant information. Many techniques have been proposed to deal with the simplification of surfaces, offering an abundance of options. Typically there is a tradeoff between speed and memory usage during compression, while there is a tradeoff between model size and model quality. These simplification techniques have impressive advantages in limited bandwidth systems, allowing for continuous level-of-detail control (through smooth geometric transformations), progressive transmission and view-dependant refinement and transmission. We present a polygonal simplification framework, allowing for the use of many atomic decimation scheme in a memoryless fashion to generate compressed level-of-detail models, progressive meshes or hierarchical representations of the original surface. Initially we will discuss background and define terminology used within this paper. Thereafter we will elaborate on the theory of both linear and hierarchical decimation model creation. Finally we will discuss our implementation and optimisations thereof.

1

2 Background Techniques exist which remove information from the model in a progressive fashion, performing atomic operations on a small subset of the surface. These techniques are very quick and robust in their operations, and are able to deal with a wide variety of topological variations. By performing these operations iteratively an alternative representation for the model can be generated, called a progressive mesh [Hop96]. It consists of the simplest form of the mesh (called a base mesh) and a sequence of reversible atomic operations (shown in Figure 1) necessary to reconstruct the original surface. Besides allowing for the generation of multiple level of detail representations, a progressive mesh lends itself easily to progressive transmission, where the transmitted model can be viewed while more information is transmitted.

top 0

f

fs f2bot

ecol

f1top vk fe

f

top

top

vl f0bot f1bot

top

f1

top 2

f0

vk f2

f bot

f0bot

2

vsplit

f1bot

Figure 1: The vsplit and ecol transformations. Note that after a vsplit operation, a new vertex vl and two new faces fs and fe are introduced. The process of generating progressive models can be modified in order to create a hierarchy of vertex simplifications, instead of a simple linear dependence as with [Hop96]. Hierarchical representations allow for selective refinement, such as one based on the view, lighting or visibility [XESV97, Hop97] (see Figure 2 and Section 3.2). Some atomic simplification techniques require that some simplification information must be stored during the model generation [GH98, PH97]. In [LT98, Hop99] no memory is required to store prior simplification information, hence it is called “memoryless simplification”. Essentially the only values which must be stored in memory in addition to the model which is being simplified are the error values associated with each of the atomic operations. Most simplification techniques could be classified as “memoryless”, since all information of the region to be simplified is encoded therein, and can be recalculated, at an overhead to simplification time. In some cases memoryless simplification improves simplified representations[Hop99]. Terminology A mesh M i consists of a set of p indexed faces fv0 ; : : : ; vq g.

F

= ff0 ; : : : ; fp g, and a set of q vertices

V

=

^ = M n . Multi-resolution analysis creates a sequence of modWe define the original model as M n n 1 0  : : :  M where M 0 represents the base mesh, or the simplest form of els M  M the model. A large number of polygonal simplification techniques [SZL92, HDD+ 93, Hop96, XESV97, Hop97, PH97, Hop99, GH97, GH98, PR99] (amongst others) make use of the vertex split transformation vspliti (and it’s inverse, the edge collapse, or e oli 1 ). From these operations

2

M

n

VSplits + VSplits 1

VSplits

2

VSplits

1

M

2

0

Figure 2: An extremely simplified case of a simplification hierarchy. V Splits1 represents the set of vsplit operations necessary to refine the section of the model M 0 within the left-hand box, while V Splits2 is the equivalent set of operations for the right-hand box. These sets of refinements can be performed independently of one-another. Combining the two operations results (in this case) in the refined model M n . we create the multi-resolution dependence relationships for our decimation meshes: Mn Mn

e oln

!1 Mn

vsplitn

Mn

1

1

e oln

! 2 : : : e ol!1 M e ol!0 M

vsplitn

1

1

:::

vsplit2

M1

vsplit1

0

;

M 0:



We define our decimation mesh representation (as in [Hop96]) as the tuple M 0 ; fvsplit1 ; : : : ; vsplitn g . We require specific terminology to define vertices and faces which are used during atomic decimation. Since we reuse the vertex index of one of the vertices in the region, we refer to the vertex we keep as vk , (see Figure 1) while the vertex we lose is referred to as vl . For consistency we orientate the figure so that vk is always at the top. We define the faces which are to be removed as the start face fs and the end face fe . We define the vertices in the region shown in Figure 1 other than vk and vl to be the base points of the region, since their attributes do not change during decimation. The set of faces surrounding the vertex vk , excluding the two removed faces fs and n fe is referredoto as the top fan domain, or T OP (in Figure 1 this would be defined as T OP = f1top ; f2top ; f3top ). Similarly the set of faces surrounding vl is referred to as the bottom fan domain, or BOT . Each set is constructed in a clockwise manner about it’s focus point (vk or vl ) from fs or fe respectively. a set S = fvsplitk ; : : : ; vsplitj g of transformations We define the mesh M S as then mesh M 0 after o S S t 1 has been applied to it. M = M ; : : : ; M represents all valid1 meshes Si ; i = 1 : : : t. 1

We refer to a mesh as valid if it can be generated from a legal sequence of vsplit transforms.

3

As in [PR99] we define the region of overlap of an individual e oli transformation as every face originating from the base points of the region defined by e oli , as in Figure 3.

Figure 3: The region of overlap of an individual edge collapse operation. The two dark shaded triangles indicate faces which are to be removed, lighted shaded triangles indicate triangles in the face sets T OP and BOT . The remaining faces indicate faces originating from the base points of the region.

3 Theory The underlying principle behind the generation of decimation meshes using GeMS is the iterative application of e ol operations until some use specified stopping criteria is reached, or no further simplification is possible (i.e. the mesh would fold over itself). Each e oli is a tuple consisting of fk; l; s; e; g, where k , l, s and e are the indeces of vk , vl , fs and fe respectively, and  is the error incurred by the removal of vl , fs and fe , and is determined by any predefined error metric. The GeMS framework has been implemented with both the space-efficient technique of [Hop96], as well as the “optimal” technique of [GH97]. Both generate a single error term, which can be calculated for . Scalar mesh attributes (such as normals, material and texture) are not discussed within the context of this paper, as scalar attribute compression are typically handled specifically by the error metric. The vsplit record can easily be modified to store these attributes. GeMS performs both linear (independent) and hierarchical decimation.

3.1 Linear Decimation The generation of a linear vsplit hierarchy is analogous to the generation of Progressive Meshes [Hop96]. Decimation meshes with a linear dependence (or Progressive Meshes) are useful for transmission of small models over limited capacity connections, since they can refine progressively. An e ol record is generated from every valid edge within the original mesh M n . These are sorted, and smallest e oli is selected in turn. Each e oli is then tested for validity:

 

Does removal of this edge result in topological changes? A general heuristic to determine the presence of mesh folding is to determine whether any of the faces in T OP is a neighbour of any of the faces in the set BOT . Does removal of this edge result in face flipping or folding? This problem is addressed in [Hop96, Hop99]. We chose to perform a simple face orientation test - a rotation of a face more that =2 radians implies the face would flip. 4

Once e oli has been performed, a number of other e olk records must be updated:

  

any e olk containing fs or fe must be erased,

T OP BOT

 in any e olk containing any of the faces in the or of e oli must be updated, since faces in the and of e olk have been removed,

T OP

BOT

 in any remaining e olk in the region of overlap of e oli , since the orientation of the faces and of e oli may have been altered, effecting most error metrics. in

T OP

BOT

The inverse vspliti+1 operation can be deduced from e oli . A vsplit tuple consists of fk; l; s; e; top0 ; topn ; bot0 ; botm ; where:

   

k , l, s and e are the indices of vk , vl , fs and fe respectively, top0 and topn are the indeces of the first and last faces in

T OP ,

similarly bot0 and botm are the indeces of the first and last faces in BOT , Ævk and Ævl represent the values which must be added to the current locations of vk and vl

respectively for the vertices to reach their original location (these can normally be efficiently encoded with entropy encoding, see [Hop96, PR99]). Once there are no longer any valid e ol records, the process is terminated - the resulting mesh represents the base mesh M 0 . The original mesh M n can be reconstructed by applying the sequence of transformations fvsplit1 ; : : : ; vsplitn g in order.

3.2 Hierarchical Decimation Tasks involving selective or view-dependent refinement require a hierarchical analysis of the ordering of vsplit and e ol transformations. Unlike [Hop97] we construct this hierarchy during the mesh analysis, and unlike both [Hop97] and [XESV97] we construct this hierarchy from the dependence of the transformations rather than the vertices themselves. The construction of hierarchical decimation meshes is performed in a similar manner to Section 3.1. All valid edge collapse records are generated, and the smallest e oli is selected. When testing e oli record for validity, any record representing edges within the region of overlap is removed from the remaining list of records, instead of updating them. This represents the dependence of vsplit operations - the inverse transformation of all e ols within the region of overlap of e oli must be performed before vspliti+1 (the inverse of e oli ). Once this group of edge collapses has been performed, a new set of edge collapse operation is determined in a similar manner, and the procedure is repeated. The construction of the e ol records represents a new level of the hierarchy, since each newly generated e ol is dependant on at least one e ol from a previous level. The vsplit tuple now contains fk; l; s; e; top0 ; topn ; bot0 ; botm ; Ævk ; Ævl ; ; L; Pg where:

 

k , l, s, e, top0 , topn , bot0 , botm , Ævk and Ævl are defined as above in Section 3.1,  is the error associate with this particular vsplit transformation (necessary for the construc-

tion of the screen-space error in [Hop97]), 5

 L is the level of the hierarchy of this vsplit,  P is the list of vsplit indices upon which this transformation is dependant. The additional information stored in the vertex split records in hierarchical decimation meshes allows for a tree of dependencies between mesh transformations (an example is shown in Figure 2).

4 Implementation The GeMS (or Generic Memoryless Simplification) tool was written in C++, and produces quick, high quality progressive models suitable for compression and progressive transmission. Storage of the mesh M n and the subsequent levels thereafter is facilitated with a mesh class similar to that used by Hoppe et. al [Hop98]. 1 begin main 2 open outfile 3 m=0 4 ecol queue = generate ecol queue(M n ) 5 while not ecol queue.empty 6 e oli = ecol queue.min 7 if valid(e oli ) then 8 m++ 9 M (n m) = apply ecol(e oli , M (n m+1) ) 10 foreach e olk including (fs or fe ) ecol queue.delete(k) 11 foreach e olk in region of overlap ecol queue.update(k) 12 write vspliti to outfile 13 end if 14 end while 15 write M (n m) to outfile 16 close outfile 17 end main

Figure 4: An algorithm for generating decimation meshes with linear dependence in GeMS. In Figure 4 the basic algorithm for producing decimation meshes with linear dependence. As described in Section 3.1 the function generate ecol queue passes over the model M n , creates e ol records from each valid edge, and inserts them into a heap. The function ecol queue.min returns the minimum element in ecol queue and deletes it from the queue. The function valid performs the tests described in Section 3.1 to determine the validity of an edge collapse. The functions ecol queue.update(k) and ecol queue.delete(k) updates or deletes the e ol record in the heap respectively.. In Figure 5 the algorithm for the generation of hierarchical decimation meshes in pseudocode is presented. Note that any e ol records representing edges within the region of overlap are erased (as described in Section 3.2). 6

1 begin main 2 open outfile 3 m = L = count = 0 4 ecol queue = generate ecol queue(M n ) 5 loop 6 if ecol queue.empty then 7 if ount == 0 then break 8 else 9 count = 0 10 ecol queue = generate ecol queue(M (n m) ) 11 end if 12 end if e oli = ecol queue.min 13 14 if valid(e oli ) then 15 m++ 16 count++ 17 M (n m) = apply ecol(e oli , M (n m+1) ) 18 foreach e olk in region of overlap ecol queue.delete(k) 19 write vspliti to outfile 20 end if 21 end while 22 write M (n m) to outfile 23 close outfile 24 end main

Figure 5: An algorithm for generating decimation meshes with hierarchical dependence in GeMS.

7

The framework allows the user to choose the simplification algorithm from a number of atomic simplification schemes, so that the output is tailored for their specifications. The framework allows also for a number of stopping criteria (such as restricting the number of faces or vertices, the size of the file, or the total error incurred) and output formats.

5 Optimisations In GeMS (like [Hop96] amongst others) we make use of a priority queue (as a heap) of edge collapse records for quick sorting and extraction of the smallest element. The heap is sorted on the error  of each e oli .

HASH

Central to speed considerations during decimation is the access time of the priority queue ecol queue. This was implemented as a hashed priority queue. The hash table is build upon the indices of the start and end faces fs and fe , and must be capable of rapidly determining whether an e ol is already present. For this reason we modify the hashing technique to represent a linked list of all e ol references to which the hash function refers, so that we can determine whether the record is present (shown in Figure 6). This hash table stores the index within ecol queue which contains fs and fe , and since the heap is constantly changing in size this index value must be updated regularly.

ecol_queue

ecol_hash

Figure 6: The hashed priority queue used within the GeMS framework For the construction of the parent information P during the decimation process it is necessary to update parent information of an edge, whether ore not that edge exists within ecol queue. For this reason we make use of another hash table similar to that used above, except entries in the hash table are only erased once the e ol record associated with that particular hash entry is processed. The information P is then written to the vsplit entry. The resulting application GUI is shown in Figure 7.

6 Conclusion and Future Work We have presented a generic memoryless polygonal simplification scheme for efficient compression and hierarchical decomposition of triangular surface meshes. It would be desirable that the GeMS framework could be modified to compress arbitrary polygonal meshes compression metrics, such as those in [IS00]. At present, the scheme cannot change the models topology, so breaks in the surface are guaranteed to be preserved. In the future, it would be desirable to include the work of Popovic et al. [PH97] to allow for vertex unification as well as edge contraction as an atomic operation. 8

Figure 7: The GeMS interface We would like to thank the Stanford Repository for the use of their surface models of the cow and bones.

References [GH97]

Michael Garland and Paul S. Heckbert. Surface simplification using quadric error metrics. Technical report, Carnegie Mellon University, 1997.

[GH98]

Michael Garland and Paul S. Heckbert. Simplifying surfaces with color and texture using quadric error metrics. Technical report, Carnegie Mellon University, 1998.

[HDD+ 93] Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, and Werner Stuetzle. Mesh optimization. Technical report, University of Washington, Seattle, 1993. [Hop96]

Hugues Hoppe. Progressive meshes. SIGGRAPH, 1996.

[Hop97]

Hugues Hoppe. View-dependant refinement of progressive meshes. SIGGRAPH, pages 189 – 198, 1997.

[Hop98]

Hugues Hoppe. Efficient implementation of progressive meshes. Technical Report MSR-TR-98-92, Microsoft Research, January 1998.

[Hop99]

Hugues Hoppe. New quadric metric for simplifying meshes with appearance attributes. VIS, 1999.

[IS00]

Martin Isenburg and Jack Snoeyink. Face fixer: Compressing polygon meshes with properties. SIGGRAPH, 2000.

[LRG+ 00] Marc Levoy, Szymon Rusinkiewicz, Matt Ginzton, Jeremy Ginsberg, Kari Pulli, David Koller, Sean Anderson, Jonathan Shade, Brian Cirless, Lucas Pereira, James Davis, and Duane Fulk. The digital michelangelo project: 3d scanning of large statues. SIGGRAPH, 2000. [LT98]

Peter Lindstrom and Greg Turk. Fast and memory efficient polygonal simplification. IEEE Visualisation, pages 279 – 286, 1998.

[PH97]

Jovan Popovi´c and Hugues Hoppe. Progressive simplicial complexes. SIGGRAPH, 1997. 9

M n , Level 0, 100% original size

Level 3, 61,2% original size

Level 10, 20.0% original size

M 0 , Level 19, 6.2% original size

Figure 8: An example of hierarchical decimation using the error metric of [Hop96]

10

[PR99]

Renato Pajarola and Jarek Rossignac. Compressed progressive meshes. Technical report, Georgia Institute of Technology, 1999.

[SZL92]

W. J. Schroeder, J. A. Zarge, and W. E. Lorensen. Decimation of triangle meshes. SIGGRAPH, 1992.

[XESV97] Julie C. Xia, Jihad El-Sana, and Amitabh Varshney. Adaptive real-time level-ofdetail-based rendering for polygonal models. IEEE Transactions on Visualization and Computer Graphics, 1997.

11

Suggest Documents