+ All Categories
Home > Documents > 1 Compressing TINs Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo...

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

Date post: 18-Jan-2016
Category:
Upload: eric-bryant
View: 214 times
Download: 0 times
Share this document with a friend
36
1 Compressing TINs Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)
Transcript
Page 1: 1 Compressing TINs Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

1

Compressing TINs

Leila De Floriani, Paola MagilloUniversity of Genova

Genova (Italy)

Enrico PuppoNational Research Council

Genova (Italy)

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

2

Why Terrain Compression?

Availability of large terrain datasets in GIS

Need for

speeding up transmission of terrain models through a communication line

reducing the costs of memory and of auxiliary storage required by terrain models

speeding up loading of a terrain model from disk into memory

enhancing rendering performances: limitations on on-board memory and on data transfer speed

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

3

...Why Terrain Compression?...

Objective:

Design compact structures for encoding a terrain model as a sequential bitstream

Regular Square Grids (RSGs) can be compressed through techniques similar to those used for compressing images

This is not true for Triangulated Irregular Networks (TINs)

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

4

...Why Terrain Compression?...

Compression methods for TINs aimed at two complementary tasks:

compression of geometry: efficient encoding of numerical information attached to the vertices (i.e., position, surface normal, texture parameters)

compression of connectivity: efficient encoding of the topology of the TIN

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

5

Data Structures for TINsList of triangles:

It encodes the list of triangles of the TIN

For each triangle: the geometrical information associated with its three vertices (position in space, surface normal, etc.)

Drawback:

each vertex is repeated for all triangles incident in it

Storage cost:

in a TIN with n vertices, there are ~2n triangles

cost: 18n floats, if geometric information associated with a vertex is just its position in space

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

6

...Data Structures for TINs...Indexed data structure:

List of vertices + list of triangles

For each vertex: its geometrical information

For each triangle: references to its three vertices

Storage cost:

6n log n bits +

3n floats (cost of storing geometrical information)

since a vertex reference for a triangle requires log n bits

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

7

...Data Structures for TINs...Indexed data structure with adjacencies:

List of vertices + list of triangles

For each vertex: its geometrical information

For each triangle: references to its three vertices + references to its three adjacent triangles

Storage cost:

(12n log n + 6n) bits + 3n floats (cost of storing geometrical information), since each triangle reference requires (log n + 1) bits

t

t1

t2t3

P1

P2

P3

t: (P1,P2,P3) (t1, t2, t3)

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

8

...Data Structures for TINs...Comparison of the three data structures

n = number of vertices, let one float = 32 bits

list of triangles: 18n floats

if n = 216 ==> 18*216 floats = 578*216 bits

indexed data structure: 6n log n bits + 3n floats

if n = 216 ==> 96*216 bits+ 3*216 floats = 150*216 bits

indexed data structure with adjacencies: (12n log n + 6n) bits+ 3n floats

if n = 216 ==> 198*216 bits + 3*216 floats = 252*216 bits

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

9

Compression of Connectivity

Two kinds of compression methods:

direct methods:

Goal: minimize the number of bits needed to encode connectivity

progressive methods:

Goal: an interrupted bitstream must provide a description of the whole object at a lower level of detail

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

10

...Compression of Connectivity...

Direct Compression Methods

Triangle strips (and triangle fans) used in graphics API (e.g., OpenGL)

Generalized triangle meshes (Deering 1995; Evans et al., 1996; Chow, 1997)

Topological surgery (Taubin and Rossignac, 1996)

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

11

...Direct Methods...

Triangle Strips

Each strip is a sequence of vertices Each triangle in a strip has its vertices at three consecutive positions A TIN is encoded as a collection of strips

Drawbacks: each vertex is encoded twice on average it is difficult to obtain few long strips [Evans

et al., 1996]

1

2

3

4

5

6

7

. . . .

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

12

Generalized Triangle Meshes (Deering, 1995)

Sequence of vertices with alternate strip-like and fan-like behavior

Behavior at each vertex specified by a code bit A small buffer allows to reuse some past vertices A TIN is encoded as a collection of generalized strips 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)

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

13

Topological Surgery (Taubin and Rossignac, 1996)

It cuts a mesh and opens into a connected set of triangles shaped as a tree (triangle spanning tree) The edges along which the mesh is cut form another tree (vertex spanning tree)

The bitstream produced by the method contains the two trees Algorithms rather complicated

...Direct Methods...

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

14

Progressive Compression Efficient encoding of the mesh produced by a simplification algorithm

A sequence of progressive LODs generated by iteratively applying a destructive operator which removes details from a mesh

An inverse constructive operator recovers such details

Encoding:

coarsest mesh produced in the simplification process + sequence of construction operations

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

15

...Progressive Compression...

Progressive Compression Methods

Progressive meshes (Hoppe, 1996)

destructive operator = edge collapse

Sequence of ordered vertex sequences (Snoeyink and van Kreveld, 1997)

destructive operator = removal of a set of vertices

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

16

...Progressive Compression... Progressive Meshes (Hoppe, 1996)

Destructive operator = edge collapse

Inverse constructive operator = vertex split

A TIN is progressively simplified by repeated edge collapses The bitstrean contains the sequence of edge collapses The TIN is reconstructed by applying a vertex split for each edge collapse

v1

v1 v2

e1

e2

e

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

17

...Progressive Compression... Sequence of ordered vertex sequences (Snoeyink and van Kreveld, 1997)

Destructive operator = removal of a set of vertices from a Delaunay triangulation Inverse constructive operator = reinsertion of the vertices

The bitstream contains the sequence of sets of vertices removed

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

18

Our Proposal

Direct method:

Sequence of triangles in a shelling order

Progressive Method:

Sequence of edge swaps

where destructive operator = vertex removal

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

19

Sequence of Triangles in a Shelling Order 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

A triangle mesh is shellable if it admits a shelling sequence

A shellable mesh is extendably shellable if any shelling sequence for a submesh can be completed to a shelling sequence for the whole mesh

The method works for every triangulated surface homeomorphic to a sphere or a disk

Encoding: four 2-bits codes per edge: SKIP, VERTEX, LEFT, RIGHT

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

20

...Sequence of Triangles in a Shelling Order...

Algorithm

Start from an arbitrary triangle, whose boundary forms the initial polygon

Loop on the edges of the current polygon:

for each edge e: try to add the triangle t adjacent to e and lying outside the polygon if successful, update the current polygon in any case, send a code when necessary, send a vertex

Each edge is examined at most once

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

21

...Sequence of Triangles in a Shelling Order...

Algorithm

if t brings a new vertex ==> VERTEX + vertex coordinates if t does not exist or cannot be added ==> SKIP

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

22

...Sequence of Triangles in a Shelling Order...

Algorithm

if t shares the polygon edge on the left of e ==> LEFT if t shares the polygon edge on the right of e ==> RIGHT

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

23

...Sequence of Triangles in a Shelling Order...

Properties of the Shelling Method

Every vertex is encoded only once

Compression and decompression algorithms:

work in time linear in the size of the mesh

no numerical computation necessary

conceptually simple and easy to implement

Adjacencies between triangles are reconstructed directly from the sequence at no additional cost

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

24

...Sequence of Triangles in a Shelling Order...

Cost Evaluation

In theory: at most two bits of connectivity information for each edge ==> at most 6n bits for a mesh with n vertices

In practice: less than 4.5n bits of connectivity

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

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

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

26

Sequence of Edge Swaps

Method based on the iterative removal of a vertex of bounded degree (less than a constant b) selected according to an error-based criterion:

the 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

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

27

Sequence of Edge Swaps

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’

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

28

...Sequence of Edge Swaps...

Sequence of Edge Swaps

Encoding:

for each removed vertex v:

a 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: wTriangle index: 0

Sequence of edge swaps

T’ T

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

29

...Sequence of Edge Swaps...

1) Split triangle t into three triangles

T’

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

30

...Sequence of Edge Swaps...

2) Swap edge indicated by number 2 around v

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

31

...Sequence of Edge Swaps...

3) Swap edge indicated by number 0 around v

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

32

...Sequence of Edge Swaps...

4) Swap edge indicated by number 2 around v

T

==> swap sequence: 2 0 2

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

33

...Sequence of Edge Swaps...Cost Evaluation

For each removed vertex v:

log n bits for one vertex reference

log b bits for the index of a triangle

for edge swap:

log r bits for the index of the edge to swap, where r is the current number of triangles incident at v

r is initially 3, and increases by one at each edge swap

at the last swap, r is at most b-1

==> less than log((b-1)!)-1 bits for the whole sequence of swap indexes

==> n(log n +log b+ log((b-1)!)-1 bits of connectivity information

for instance, for n=216 and b=23 ==> about 31.4*216 bits of connectivity

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

34

Conclusions

Direct method:

Very simple, yet efficient, fully implemented

Compression rates better than those of other simple methods (e.g., triangle strips), comparable with those of more complex methods (e.g., topological surgery)

It generalizes to triangulated surfaces with arbitrary genus: It automatically cuts the surface into simply connected patches with a small overhead Cost: experimentally, less than 5.5n bits of connectivity

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

35

…Conclusions...

Experimental Results of the direct method on 3D triangulations

whole mesh patch 1 patch 2 …. + other 4 patches with few triangles each

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

36

…Conclusions...

Progressive method:

More general than other proposed methods (e.g., Hoppe, 1996; Snoeyink and van Kreveld, 1997) since no specific retriangulation criterion is assumed

Adaptivity to LOD generation is good since vertices are removed by taking into account the accuracy of the resulting approximation

Vertex removal algorithms with different error-driven selection criteria experimented in (De Floriani, Magillo, Puppo, IEEE Visualization 1997)


Recommended