Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Compressing TINs Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

Similar presentations


Presentation on theme: "1 Compressing TINs Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)"— Presentation transcript:

1 1 Compressing TINs Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

2 2 Why Terrain Compression? o Availability of large terrain datasets in GIS o Need for mspeeding up transmission of terrain models through a communication line mreducing the costs of memory and of auxiliary storage required by terrain models mspeeding up loading of a terrain model from disk into memory menhancing rendering performances: limitations on on-board memory and on data transfer speed

3 3...Why Terrain Compression?... Objective: o Design compact structures for encoding a terrain model as a sequential bitstream o Regular Square Grids (RSGs) can be compressed through techniques similar to those used for compressing images o This is not true for Triangulated Irregular Networks (TINs)

4 4...Why Terrain Compression?... Compression methods for TINs aimed at two complementary tasks: mcompression of geometry: efficient encoding of numerical information attached to the vertices (i.e., position, surface normal, texture parameters) mcompression of connectivity: efficient encoding of the topology of the TIN

5 5 Data Structures for TINs List of triangles: mIt encodes the list of triangles of the TIN mFor each triangle: the geometrical information associated with its three vertices (position in space, surface normal, etc.) o Drawback: Geach vertex is repeated for all triangles incident in it o Storage cost: Gin a TIN with n vertices, there are ~2n triangles Gcost: 18n floats, if geometric information associated with a vertex is just its position in space

6 6...Data Structures for TINs... Indexed data structure: mList of vertices + list of triangles mFor each vertex: its geometrical information mFor each triangle: references to its three vertices o Storage cost: 6n log n bits + 3n floats (cost of storing geometrical information) since a vertex reference for a triangle requires log n bits

7 7...Data Structures for TINs... Indexed data structure with adjacencies: mList of vertices + list of triangles mFor each vertex: its geometrical information mFor each triangle: references to its three vertices + references to its three adjacent triangles o Storage cost: G(12n log n + 6n) bits + 3n floats (cost of storing geometrical information), since each triangle reference requires (log n + 1) bits t t1t1 t2t2 t3t3 P1P1 P2P2 P3P3 t: (P 1,P 2,P 3 ) (t 1, t 2, t 3 )

8 8...Data Structures for TINs... Comparison of the three data structures n = number of vertices, let one float = 32 bits mlist of triangles: 18n floats Gif n = 2 16 ==> 18*2 16 floats = 578*2 16 bits mindexed data structure: 6n log n bits + 3n floats Gif n = 2 16 ==> 96*2 16 bits+ 3*2 16 floats = 150*2 16 bits mindexed data structure with adjacencies: (12n log n + 6n) bits+ 3n floats Gif n = 2 16 ==> 198*2 16 bits + 3*2 16 floats = 252*2 16 bits

9 9 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

10 10...Compression of Connectivity... Direct Compression Methods o Triangle strips (and triangle fans) used in graphics API (e.g., OpenGL) o Generalized triangle meshes (Deering 1995; Evans et al., 1996; Chow, 1997) o Topological surgery (Taubin and Rossignac, 1996)

11 11...Direct Methods... Triangle Strips o Each strip is a sequence of vertices o Each triangle in a strip has its vertices at three consecutive positions o A TIN is encoded as a collection of strips o Drawbacks: meach vertex is encoded twice on average mit is difficult to obtain few long strips [Evans et al., 1996] 1 2 3 4 5 6 7..

12 12 Generalized Triangle Meshes (Deering, 1995) o Sequence of vertices with alternate strip-like and fan-like behavior o Behavior at each vertex specified by a code bit o A small buffer allows to reuse some past vertices o A TIN is encoded as a collection of generalized strips o Cost: ~11 bits per vertex for connectivity...Direct Methods... 1 2 3 4 5 6 7.. 2 6 5 1 4 3 Strip-like (zig-zag) Fan-like (turning)

13 13 Topological Surgery (Taubin and Rossignac, 1996) o It cuts a mesh and opens into a connected set of triangles shaped as a tree (triangle spanning tree) o The edges along which the mesh is cut form another tree (vertex spanning tree) o The bitstream produced by the method contains the two trees o Algorithms rather complicated...Direct Methods...

14 14 Progressive Compression o Efficient encoding of the mesh produced by a simplification algorithm o A sequence of progressive LODs generated by iteratively applying a destructive operator which removes details from a mesh o An inverse constructive operator recovers such details o Encoding: mcoarsest mesh produced in the simplification process + sequence of construction operations

15 15...Progressive Compression... Progressive Compression Methods o Progressive meshes (Hoppe, 1996) mdestructive operator = edge collapse o Sequence of ordered vertex sequences (Snoeyink and van Kreveld, 1997) mdestructive operator = removal of a set of vertices

16 16...Progressive Compression... Progressive Meshes (Hoppe, 1996) o Destructive operator = edge collapse o Inverse constructive operator = vertex split o A TIN is progressively simplified by repeated edge collapses o The bitstrean contains the sequence of edge collapses o The TIN is reconstructed by applying a vertex split for each edge collapse v1 v2 e1 e2 e

17 17...Progressive Compression... Sequence of ordered vertex sequences (Snoeyink and van Kreveld, 1997) o Destructive operator = removal of a set of vertices from a Delaunay triangulation o Inverse constructive operator = reinsertion of the vertices o The bitstream contains the sequence of sets of vertices removed

18 18 Our Proposal o Direct method: mSequence of triangles in a shelling order o Progressive Method: mSequence of edge swaps where destructive operator = vertex removal

19 19 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

20 20...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

21 21...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

22 22...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

23 23...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

24 24...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

25 25...Sequence of Triangles in a Shelling Order... Experimental Results Exp #vert #tri #code bits compress. decompr. bits /vert time(tri/s) time(tri/s) U1 42943 85290 182674 4.2538 1.644(51879) 2.414(35331) U2 28510 56540 123086 4.3173 1.077(52483) 1.603(35271) U3 13057 25818 57316 4.3897 0.479(53899) 0.734(35174) U4 6221 12240 27180 4.3690 0.215(56930) 0.348(35172) A1 15389 30566 64678 4.2029 0.565(54099) 0.855(35749) A2 15233 30235 63958 4.1986 0.561(53894) 0.853(35455) A3 15515 30818 65210 4.2030 0.572(53877) 0.867(35545) A4 15624 31042 65520 4.1935 0.577(53798) 0.880(35275) B1 5297 10570 22392 4.2273 0.182(58076) 0.298(35469) B2 5494 10959 23468 4.2716 0.188(58292) 0.308(35581) B3 5397 10768 23060 4.2727 0.186(57892) 0.304(35421) B4 5449 10874 23136 4.2459 0.187(58149) 0.308(35305) 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

26 26 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 

27 27 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’

28 28...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

29 29...Sequence of Edge Swaps... 1) Split triangle t into three triangles T’

30 30...Sequence of Edge Swaps... 2) Swap edge indicated by number 2 around v

31 31...Sequence of Edge Swaps... 3) Swap edge indicated by number 0 around v

32 32...Sequence of Edge Swaps... 4) Swap edge indicated by number 2 around v T ==> swap sequence: 2 0 2

33 33...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 31.4*2 16 bits of connectivity

34 34 Conclusions o Direct method: mVery simple, yet efficient, fully implemented mCompression rates better than those of other simple methods (e.g., triangle strips), comparable with those of more complex methods (e.g., topological surgery) mIt generalizes to triangulated surfaces with arbitrary genus: GIt automatically cuts the surface into simply connected patches with a small overhead GCost: experimentally, less than 5.5n bits of connectivity

35 35 …Conclusions... Experimental Results of the direct method on 3D triangulations whole mesh patch 1 patch 2 …. + other 4 patches with few triangles each

36 36 …Conclusions... o Progressive method: mMore general than other proposed methods (e.g., Hoppe, 1996; Snoeyink and van Kreveld, 1997) since no specific retriangulation criterion is assumed mAdaptivity to LOD generation is good since vertices are removed by taking into account the accuracy of the resulting approximation mVertex removal algorithms with different error-driven selection criteria experimented in (De Floriani, Magillo, Puppo, IEEE Visualization 1997)


Download ppt "1 Compressing TINs Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)"

Similar presentations


Ads by Google