1 meshcompressionmeshcompression eg99 tutorial mesh compression
TRANSCRIPT
1
MESH
COMPRESSION
EG99 Tutorial
Mesh Compression
2
MESH
COMPRESSION
EG99 Tutorial
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
3
MESH
COMPRESSION
EG99 Tutorial
...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
4
MESH
COMPRESSION
EG99 Tutorial
Compression of Geometry(Deering, 1995; Chow, 1997)
Positions, normals and colors quantized to significantly fewer than 32 bits (single-precision IEEE floating point) with little loss in visual quality
Example: quantization for position information:
normalizing object geometry to a unit cube
positions quantized to q bits (q<=16) by truncating the less significant m bits of position components, where m=16-q
Optimizations:
positions are "delta-encoded", i.e., just the difference between a vertex position and that of its predecessor in the bitstream is encoded
quantization assignment can be done by partitioning the triangle mesh into parts of similar detail based on triangle size and curvature
5
MESH
COMPRESSION
EG99 Tutorial
Compression of Connectivity
Two kinds of compression techniques:
Direct techniques:
Goal: minimize the number of bits needed to encode connectivity
Progressive techniques:
Goal: an interrupted bitstream must provide a description of the whole object at a lower level of detail
6
MESH
COMPRESSION
EG99 Tutorial
Direct Methods
Triangle strips (and triangle fans) used in graphics API (e.g., OpenGL)
Generalized triangle meshes (Deering 1995; Evans et al., 1996; Chow, 1997; Bar Yehuda and Gotsman 1996)
Topological surgery (Taubin and Rossignac, 1996)
Sequence of triangles in a shelling order (De Floriani, Magillo and Puppo, 1998)
7
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods... Triangle Strips Defined as a collection of sequences of vertices Each triangle in a strip has its vertices at three
consecutive positions
Encoding: number and lengths of the strips two vertex references per strip one vertex reference per triangle one bit per triangle (swap code)
Drawbacks: each vertex must be encoded twice on average it is difficult to obtain few long strips from
a generic mesh [Evans et al., 1996]
Sequence: 1,2,3,4,5,6,71
2
3
4
5
6
7
. . . .
8
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods... Generalized Triangle Strips (with direct vertex encoding)
1,2,3,4,5,6,7,8 NO!
1,2,3,4,5,6,7,5,8 YES
Another way of encoding with swap codes:
it tells on which open side the new vertex must be attached
1,2,0,3,0,4,0,5,0,6,0,7,1,8
1
2
3
4
5
6
7
8
6
8
7
5
10
9
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
Generalized Triangle Meshes (Deering, 1995) Definition of a new syntax for a generalized strip Use of a mesh buffer: a queue of maximum length 16 of previously used vertices
Encoding: one bit per vertex to indicate whether the vertex must be inserted into the mesh buffer two bits per triangle to indicate how to continue the current strip (three possible codes) one bit per triangle to indicate whether a new vertex should be read or a vertex from the mesh buffer must be used 4 bits of address to access a vertex of the mesh buffer
Cost: ~11 bits per vertex for connectivity
10
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
Generalized Triangle Meshes
Example:
R = Restart RO = Replace Oldest RM = Replace Middle P = Push number = vertex index in mesh -number = vertex index in
buffer (from top)
R 6 P RO 1 RO 7 P RO 2 RO 3 RM 4 RM 8 P RO 5 RO 9 P RO 10 RM 11 RO 17 P RM 16 P RM -3 RO 15 P RM -5 RO 6 RM 14 P RO 13 RM -9 RO 12 RM 18 P RM -3 RO 15 P RO -5 RO 6 RM 14 P RO 13 P RM -9 RO 23 RO -10 RO -7 RM 30 RM 29 RM 28 RM -1 RO -2 RM -3 RM 27 RO 26 RM -4 RO 25 RO -5
QUEUE: 6,7,8,9,17,16,...
11
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
Topological Surgery (Taubin and Rossignac, 1996)
Vertex spanning tree formed by selecting the minimum number of edges in the input mesh which connect all its vertices
The edges of the vertex spanning tree decompose the mesh into a collection of non-overlapping triangle strips (runs)
Such triangle strips form a spanning tree of the triangles of the mesh
12
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
Topological Surgery
Example:
13
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
Topological Surgery
Encoding structure: vertex + triangle spanning trees
Order imposed on the vertices by the spanning tree exploited for computing estimates of the position of a vertex from the position of its 3 or 4 ancestors in the tree
Cost: between 2.5 and 7 bits per vertex to encode connectivity
Drawbacks: decompression stage complicated by large memory requirements (all information must be kept in main memory when reconstructing the mesh)
difficult to implement
14
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
A Compression Method based on Shelling
(De Floriani, Magillo and Puppo, 1998)
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
The compression algorithm works for every triangulated surface homeomorphic to a sphere or a disk
Encoding: four 2-bits codes per edge: SKIP, VERTEX, LEFT, RIGHT
15
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
A Compression Method based on Shelling
Start from an arbitrary triangle, whose boundary forms the current polygon
Loop on the edges of the current polygon:
for each edge e: try to add the triangle t externally adjacent to e if successful, update the current polygon in any case, send a code when necessary, send a vertex
Each vertex is sent just once Each edge is examined at most once
16
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
A Compression Method based on Shelling
if t brings a new vertex ==> VERTEX + vertex coordinates if t does not exist or cannot be added ==> SKIP
17
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
A Compression Method based on Shelling
if t shares the polygon edge to the left of e ==> LEFT if t shares the polygon edge to the right of e ==> RIGHT
18
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
A Compression Method based on Shelling
Properties of the Shelling Method Every vertex is encoded only once Each edge is examined at most once Compression and decompression algorithms:
work in time linear in the size of the mesh no numerical computations conceptually simple and easy to implement
Adjacencies between triangles are reconstructed directly from the sequence at no additional cost Cost:
in theory: at most 6 bits of connectivity per vertex in practice: less than 4.5 bits of connectivity per vertex
19
MESH
COMPRESSION
EG99 Tutorial
...Sequence of Triangles in a Shelling Order...
Experimental Results (on TINs)
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
20
MESH
COMPRESSION
EG99 Tutorial
...Direct Methods...
A Compression Method based on Shelling
The method generalizes to surfaces with arbitrary genus The algorithm automatically cuts the surface into simply
connected meshes with a small overhead
No additional control codes required Vertices belopnging to more than one patch are repeated
Cost: in practice, less than 5.5 bits of connectivity per vertex
21
MESH
COMPRESSION
EG99 Tutorial
...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
22
MESH
COMPRESSION
EG99 Tutorial
...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
23
MESH
COMPRESSION
EG99 Tutorial
...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
24
MESH
COMPRESSION
EG99 Tutorial
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
25
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression...
Each LOD can be seen as a form of lossy compression of the original mesh
There is a trade-off between loading/transmission times and loss of detail
Compression rates are usually lower than those achieved by direct techniques
26
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression... Progressive Compression Methods
Progressive meshes (Hoppe, 1996)
destructive operator = edge collapse
Sequence of edge swaps (De Floriani, Magillo and Puppo, 1998)
destructive operator = vertex removal
Sequence of ordered vertex sequences (Snoeyink and van Kreveld, 1997)
destructive operator = removal of a set of vertices
27
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression...
Progressive Meshes (Hoppe, 1996) Edge collapse:
replace an edge e with a vertex v1 and the two triangles sharing e with two edges incident at v1
Vertex split (inverse operation): expand a vertex v1 into an edge e=v1v2 and two edges e1 and e2 among those
incident at v1 into two triangles
v1
v1 v2
e1
e2
e
28
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression... Progressive Meshes (Hoppe, 1996)
Encoding: new vertex v2 reference to v1 code specifying the position of e1 and e2 in the set of edges incident at v1
Cost: n(log n + log(b(b-1))) bits of connectivity, where b = maximum degree of a vertex at any step
for instance, for n=216 and b=23 ==> about 21.8*216 bits of connectivity
29
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression...
Sequence of Edge Swaps
(De Floriani, Magillo, Puppo, 1998)
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
30
MESH
COMPRESSION
EG99 Tutorial
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
...Progressive Compression...
T
T’
31
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression...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'
T’
T
Vertex: wTriangle index: 0Swap sequence: 2 0 2
32
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression...
Sequence of Edge Swaps
Cost:
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
Properties:
adaptivity to LOD generation is good since the vertices are removed by taking into account the accuracy of the resulting approximation
the criterion used in the retriangulation is encoded in the sequence of swaps: more general than other progressive methods
33
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression...
Snoeyink and van Kreveld's Method
It applies to Triangulated Irregular Networks (TINs) based on Delaunay triangulation
Delaunay triangulation:
a triangulation is called a Delaunay triangulation if the circumcircle of any of its triangles does not contain any vertex in its interior
34
MESH
COMPRESSION
EG99 Tutorial
...Progressive Compression... Snoeyink and van Kreveld's Method
LOD generation process:
at each step, a maximal set of independent vertices (i.e., vertices which are not connected by an edge) of bounded degree is removed
The process of removing a set of vertices terminates in a logarithmic number of steps