1 compressing triangle meshes leila de floriani, paola magillo university of genova genova (italy)...

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

Upload: brianna-chapman

Post on 04-Jan-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

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

1

Compressing Triangle Meshes

Leila De Floriani, Paola MagilloUniversity of Genova

Genova (Italy)

Enrico PuppoNational Research Council

Genova (Italy)

Page 2: 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?

Availability of large geometric datasets in mechanical CAD, virtual reality, medical imaging, scientific visualization, geographic information systems, etc.

Need for

speeding up transmission of geometric models

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

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

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

3

...Why Geometric Compression?...

Compression methods aimed at two complementary tasks:

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

compression of mesh connectivity: efficient encoding of the mesh topology

Compression methods developed for triangle meshes

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

4

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 5: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

5

Our Proposal Direct method:

Sequence of triangles in a shelling order

Progressive Method:

Sequence of edge swaps

where destructive operator = vertex removal

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

6

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 7: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

7

...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 Each vertex is sent just once

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

8

...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 9: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

9

...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 10: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

10

...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 11: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

11

...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 12: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

12

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

Experimental Results (on TINs)

Exp #vert #tri #code bits compress.

bits /vert time(tri/s)

U1 42943 85290 182674 4.2538 1.644(51879)

U2 28510 56540 123086 4.3173 1.077(52483)

U3 13057 25818 57316 4.3897 0.479(53899)

U4 6221 12240 27180 4.3690 0.215(56930)

A1 15389 30566 64678 4.2029 0.565(54099)

A2 15233 30235 63958 4.1986 0.561(53894)

A3 15515 30818 65210 4.2030 0.572(53877)

A4 15624 31042 65520 4.1935 0.577(53798)

B1 5297 10570 22392 4.2273 0.182(58076)

B2 5494 10959 23468 4.2716 0.188(58292)

B3 5397 10768 23060 4.2727 0.186(57892)

B4 5449 10874 23136 4.2459 0.187(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

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

13

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

Properties

The method generalizes to surfaces with arbitrary genus The algorithm automatically cuts the surface into simply connected patches with a small overhead

No additional control code required Vertices belonging to more than one patch are repeated

Cost: in practice, less than 5.5n bits of connectivity

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

14

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

Experimental Results (on 3D meshes)

Mesh #vert #tri # #repeated #code bits patches vert bits /vert eight 766 1536 6 198 3856 5.0339shape 2562 5120 1 0 10478 4.0897cow 3078 5804 25 356 13984 4.5432femur 3897 7798 5 124 18894 4.8483pieta 3475 6976 15 468 17124 4.9278skull 10950 22104 80 3242 58150 5.3105bunny 34834 69451 3 323 146986 4.2196fandisk 6475 12946 1 0 27298 4.2159phone 33204 66287 3 12 149058 4.4891

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

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

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

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

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

17

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 18: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

18

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 19: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

19

...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 20: 1 Compressing Triangle Meshes Leila De Floriani, Paola Magillo University of Genova Genova (Italy) Enrico Puppo National Research Council Genova (Italy)

20

...Sequence of Edge Swaps...

1) Split triangle t into three triangles

T’

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

21

...Sequence of Edge Swaps...

2) Swap edge indicated by number 2 around v

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

22

...Sequence of Edge Swaps...

3) Swap edge indicated by number 0 around v

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

23

...Sequence of Edge Swaps...

4) Swap edge indicated by number 2 around v

T

==> swap sequence: 2 0 2

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

24

...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 26.5*216 bits of connectivity

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

25

...Sequence of Edge Swaps...

Properties

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

Unlike other methods (Hoppe, 1996; Snoeyink and van Kreveld, 1997), no specific retriangulation criterion is assumed

The criterion used in the retriangulation is encoded in the sequence of swaps

Coding and decoding algorithms with different error-driven selection criteria experimented in the context of multiresolution triangulations (De Floriani, Magillo, Puppo, IEEE Visualization 1997)