1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)
2 Why Geometric Compression? o Availability of large geometric datasets in mechanical CAD, virtual reality, medical imaging, scientific visualization, geographic information systems, etc. o Need for mspeeding up transmission of geometric models mreducing the costs of memory and of auxiliary storage required by such models menhancing rendering performances: limitations on on-board memory and on data transfer speed
3...Why Geometric Compression?... Compression methods aimed at two complementary tasks: mcompression of geometry: efficient encoding of numerical information attached to the vertices (position, surface normal, color, texture parameters) mcompression of mesh connectivity: efficient encoding of the mesh topology Compression methods developed for triangle meshes
4 Compression of Connectivity o Two kinds of compression methods: mDirect methods: Goal: minimize the number of bits needed to encode connectivity m Progressive methods: Goal: an interrupted bitstream must provide a description of the whole object at a lower level of detail
5 Our Proposal o Direct method: mSequence of triangles in a shelling order o Progressive Method: mSequence of edge swaps where destructive operator = vertex removal
6 Sequence of Triangles in a Shelling Order o Method based on a shelling order: a sequence of all the triangles in the mesh with the property that the boundary of the set of triangles corresponding to any subsequence forms a simple polygon o A triangle mesh is shellable if it admits a shelling sequence o A shellable mesh is extendably shellable if any shelling sequence for a submesh can be completed to a shelling sequence for the whole mesh o The method works for every triangulated surface homeomorphic to a sphere or a disk o Encoding: four 2-bits codes per edge: SKIP, VERTEX, LEFT, RIGHT
7...Sequence of Triangles in a Shelling Order... Algorithm o Start from an arbitrary triangle, whose boundary forms the initial polygon o Loop on the edges of the current polygon: for each edge e: mtry to add the triangle t adjacent to e and lying outside the polygon mif successful, update the current polygon min any case, send a code mwhen necessary, send a vertex o Each edge is examined at most once o Each vertex is sent just once
8...Sequence of Triangles in a Shelling Order... Algorithm mif t brings a new vertex ==> VERTEX + vertex coordinates mif t does not exist or cannot be added ==> SKIP
9...Sequence of Triangles in a Shelling Order... Algorithm mif t shares the polygon edge on the left of e ==> LEFT mif t shares the polygon edge on the right of e ==> RIGHT
10...Sequence of Triangles in a Shelling Order... Properties of the Shelling Method o Every vertex is encoded only once o Compression and decompression algorithms: mwork in time linear in the size of the mesh mno numerical computation necessary mconceptually simple and easy to implement o Adjacencies between triangles are reconstructed directly from the sequence at no additional cost
11...Sequence of Triangles in a Shelling Order... Cost Evaluation o In theory: mat most two bits of connectivity information for each edge m==> at most 6n bits for a mesh with n vertices o In practice: mless than 4.5n bits of connectivity
12...Sequence of Triangles in a Shelling Order... Experimental Results (on TINs) Exp #vert #tri #code bits compress. bits /vert time(tri/s) U (51879) U (52483) U (53899) U (56930) A (54099) A (53894) A (53877) A (53798) B (58076) B (58292) B (57892) B (58149) U1--4: uniform resolution (in decreasing order) A1--4: one fourth of the area is at high resolution, the rest is coarse B1--4: one 16th of the area is at high resolution, the rest is coarse
13...Sequence of Triangles in a Shelling Order... Properties o The method generalizes to surfaces with arbitrary genus o The algorithm automatically cuts the surface into simply connected patches with a small overhead o No additional control code required o Vertices belonging to more than one patch are repeated o Cost: in practice, less than 5.5n bits of connectivity
14...Sequence of Triangles in a Shelling Order... Experimental Results (on 3D meshes) Mesh #vert #tri # #repeated #code bits patches vert bits /vert eight shape cow femur pieta skull bunny fandisk phone
15...Sequence of Triangles in a Shelling Order... Experimental Results (on 3D meshes) whole mesh patch 1 patch 2 …. + other 4 patches with few triangles each
16...Sequence of Triangles in a Shelling Order... Experimental Results (on 3D meshes) whole mesh patch 1 patch 2 …. + other 78 patches with few triangles each
17 Sequence of Edge Swaps o Method based on the iterative removal of a vertex of bounded degree (less than a constant b) selected according to an error-based criterion: mthe vertex which causes the least increase in the approximation error is always chosen The polygonal hole left by removing vertex v is retriangulated The inverse constructive operator inserts vertex v and recovers the previous triangulation of
18 Sequence of Edge Swaps o The old triangulation T is recovered from the new one T' by first splitting the triangle t of T' containing vertex v and then applying a sequence of edge swaps...Sequence of Edge Swaps... T T’
19...Sequence of Edge Swaps... Sequence of Edge Swaps o Encoding: mfor each removed vertex v: Ga vertex w and an integer number indicating a triangle around w (they define the triangle t of T' containing v) the packed sequence of edge swap which generates T from T' Vertex: w Triangle index: 0 Sequence of edge swaps T’ T
20...Sequence of Edge Swaps... 1) Split triangle t into three triangles T’
21...Sequence of Edge Swaps... 2) Swap edge indicated by number 2 around v
22...Sequence of Edge Swaps... 3) Swap edge indicated by number 0 around v
23...Sequence of Edge Swaps... 4) Swap edge indicated by number 2 around v T ==> swap sequence: 2 0 2
24...Sequence of Edge Swaps... Cost Evaluation o For each removed vertex v: mlog n bits for one vertex reference mlog b bits for the index of a triangle mfor edge swap: Glog r bits for the index of the edge to swap, where r is the current number of triangles incident at v Gr is initially 3, and increases by one at each edge swap Gat the last swap, r is at most b-1 G==> less than log((b-1)!)-1 bits for the whole sequence of swap indexes o ==> n(log n +log b+ log((b-1)!)-1) bits of connectivity information mfor instance, for n=2 16 and b=2 3 ==> about 26.5*2 16 bits of connectivity
25...Sequence of Edge Swaps... Properties o Adaptivity to LOD generation is good since vertices are removed by taking into account the accuracy of the resulting approximation o Unlike other methods (Hoppe, 1996; Snoeyink and van Kreveld, 1997), no specific retriangulation criterion is assumed o The criterion used in the retriangulation is encoded in the sequence of swaps o Coding and decoding algorithms with different error-driven selection criteria experimented in the context of multiresolution triangulations (De Floriani, Magillo, Puppo, IEEE Visualization 1997)