250 likes | 427 Views
Second generation geometry compression: Edgebreaker is fast, simple, and effective. Rossignac, Szymczak, King, Safonova Gumhold Isenberg&Snoeyink Coors Lopes. Edgebreaker (Rossignac98). Area not yet covered. Decompress. Compress. Specification of the next triangle. Decompress.
E N D
Second generation geometry compression: Edgebreaker isfast, simple, and effective Rossignac, Szymczak, King, Safonova Gumhold Isenberg&Snoeyink Coors Lopes
Edgebreaker (Rossignac98) Area not yet covered Decompress Compress Specification of the next triangle Decompress Compress Binary format Sequence of specification for adding triangles
? Marked (visited) x Not marked x Last visited ? Next to beencoded ? x To-do stack ? x ? Encode sequence of codes x C: 0, L:110, R: 101, S:100, E:111 ? ? and vertices x as encountered by C operations Edgebreaker’s state machine ? C ? L • if tip vertex not marked then C • else if left neighbor marked • then if right neighbor marked then E else L • else if right neighbor marked then R else S ? R ? S Only 2T bits (because |C|=V=T/2) E
Examples of Edgebreaker compression ? ? C x C R C ? ? C L R C C x R C C C CCCCRCCRCRC… ? ? R x R R R ? ? S L C L E x S R E R C ? ? E …CRSRLECRRRLE x
c.v c 2 c.n 3 1 3 2 4 5 0 4 c.o 1 v o Triangle 0 corner 0 1 7 Triangle 0 corner 1 2 8 Triangle 0 corner 235 Triangle 1 corner 3 2 9 Triangle 1 corner 4 1 6 Triangle 1 corner 542 vertex 1 x y z vertex 2 x y z vertex 3 x y z vertex 4 x y z Corner table: data structure for T-meshes • Table of corners, for each corner c store: • c.v : integer reference to vertex table • c.o : integer reference to opposite corner • c.o may be derived from c.v • Make the 3 corners of each triangle consecutive • List them according to ccw orientation of triangles • Trivial access to triangle ID: c.t = INT(c/3) • c.n = 3c.t + (c+1)MOD 3, c.p = c.n.n, c.l = c.p.o, c.r = c.n.o c.l c.r c.p c.t
Edgebreaker compression algorithm v o T1 c0 1 7 T1 c1 2 8 T1 c23 5 T2 c3 2 9 T2 c4 1 6 T2 c54 2 v1 x y z v2 x y z v3 x y z v4 x y z R R R b L C L E a S R E R C c.v c.r c.l c c.t c.o • recursive procedurecompress (c) • repeat{ • c.t.m:=visited; # mark the triangle as visited • if c.v.m==not visited # test whether tip vertex was visited • then{write(vertices, c.v); # append vertex index to “vertices” • write(clers, C); # append encoding of C to “clers” • c.v.m:= visited; # mark tip vertex as visited • c:=c.r} # continue with the right neighbor • elseif c.r.t.m==painted # test whether right triangle was visited • thenif c.l.t.m== visited # test whether left triangle was visited • then{write(clers, E); # append encoding of E to clers string • return } # exit (or return from recursive call) • else{write(clers, R); # append encoding of R to clers string • c:=c.l } # move to left triangle • elseif c.l.t.m == visited # test whether left triangle was visited • then{write(clers, L); # append encoding of L to clers string • c:=c.r } # move to right triangle • else{write(clers, S); # append encoding of S to clers string • compress(c.r); # recursive call to visit right branch first • c:=c.l }} # move to left triangle vertices=…ab, clers = ...CRSRLECRRRLE (2T bit code: C=0, L=110, R=101, S=100, E=111)
Decompression Receive the CLERS sequence Decode it Construct the triangle tree Decode&reconstruct vertices R R R L E L C …CRSRLECRRRLE S R E R C How to zip up the cracks?
C L E R S seed R R R L E C L S R E R C R R R R R R L L C L E E C L S R S R E E R R C C Wrap&Zip decompression (Rossignac&Szymczak99) Orient bounding edges while building triangle tree at decompression. All oriented clockwise (up tree), except for C and the seed triangle: Then ZIP all pairs of adjacent bounding edges when both point away from their common vertex. CRSRLECRRRLE Linear time complexity. Zip only after L and E.
R R R L E C L S R E R C Wrap&Zip properties • Only L and E require checking whether zipping is possible • No new zipping is made possible by C, R, S • L creates at most one zip (one pair of edges, no iteration) • E operation creates at least 2 zips • # of zipping operations = # of edges in vertex tree • An edge can only be tried and rejected for zipping only once • Wrap&Zip has linear time complexity (very fast in practice)
Spirale Reversi (Isenburg&Snoeyink 99) • “Spirale Reversi: Reverse decoding of the Edgebreaker encoding” • Decompression for Edgebreaker similar to Wrap&Zip • Reads CLERS string backward • Reconstructs mesh backwards • Assigns vertices before the C operation defines them
C R L S E Reversi Decompression (Isenburg&Snoeyink 99) compression clers = …CCRRCCRRRCRRCRCRRCCCRRCRRCRCRRRCRCRCRRSCRRSLERERLCRRRSEE reversi = EESRRRCLRERELSRRCSRRCRCRCRRRCRCRRCRRCCCRRCRCRRCRRRCCRRCC… decompression
1 1 O = E O = EES O = EE 1 1 2 O = EESRRRCLR O = EESRRRCLRER 1 2 1 Reversi details O = EESRRRCLRERELSRRC O = EESRRRCLREREL O = EESRRRCLRERELSRRCS O = EESRRRCLRERELSRRCSRRCRCRCRRRCRCRRCRRCCCRRCRCRRCRRRCCRRCC…
Expected/measured results of Edgebreaker • Expected 1.7T bit and guaranteed 2.0T bit code • CL and CE combinations are impossible • Use a shorter code for S (11) and R (10) when they follow a C • On average 36% of symbols are R. Half of them follow a C • Expected 1.3T to 1.6T bits, guaranteed 2.0T bits • Encode CC, CS, CR pairs as single symbols • After even # of Cs: CR (01), CC (00), CS (1101), R (10), S(1111) • L (1110), E (1100) • Stanford Bunny: 1.3T bits, Delaunay triangulation: 1.6T bits • Measured entropy codes 0.91 to 1.26T bits • Huffman code: all words start with a consecutive sequence of C • Bunny: 173 words, 0.85T bits for Huffman codes, 0.91T bits total • Large model: 1,400 word dictionary (32Kb table, large part is fixed) • Gzip on the result improves them by 2%
Edgebreaker + Wrap&Zip Results • Compress: Visit&mark triangles, encode CLERS ops, encode vertices • Decode: Build triangle tree, orient free edges, zip, label & decode vertices • Compression results for connectivity information • Guaranteed2T bitsfor all meshes homeomorphic to a sphere • C: 0, L:110, R: 101, S:100, E:111 (|C|=V=T/2) • Measured entropy code: about 1T bits (dictionary not included) • Publications (http://www.gvu.gatech.edu/~jarek/papers) • Rossignac, Edgebreaker Compression, IEEE TVCG’99 • Sigma Xi Award for Best Paper by Georgia Tech faculty published in 1999 • Rossignac&Szymczak, Wrap&zip, CGTA’99 • King&Rossignac:Guaranteed 3.67V bit encoding...,CCCG’99 • Szymczak&King&Rossignac:Compression of regular meshes, CCCG’00
Edgebreaker Results • Compression results for connectivity information • Guaranteed2T bits, entropy down to 0.9T bits for large models • Source code available: 3 page detailed pseudo-code, arrays of integers, fast • http://www.gvu.gatech.edu/~jarek/edgebreaker/eb • Publications <http://www.gvu.gatech.edu/~jarek/papers> • Rossignac, Edgebreaker Compression, IEEE TVCG’99 • Sigma Xi Best Paper Award • Rossignac&Szymczak, Wrap&zip, CGTA’99 • King&Rossignac:Guaranteed 3.67V bit encoding...,CCCG’99 • Szymczak&King&Rossignac:Mostly regular meshes, CCCG’00 • ….
Edgebreaker extensions and improvements • Better compression • Tighter guaranteed upper bound (King&Rossignac, Gumhold): 1.80T bits • Quadrilateral meshes (with Szymczak and King): 1.34T bits • Sufficiently regular meshes (with Szymczak and King): 0.81T bits guaranteed • Topological extensions • Non manifold solids (with Cardoze) • Handles (with Safonova, Szymczak, Coors, and Lopes) • Holes (with Safonova) • Geometry • Optimal quantization (with King and Szymczak): best B and T • Better predictors from connectivity and neighbors (with Coors) • Higher dimension • Tetrahedra for FEM (with Szymczak): 7T bits(prior to entropy) • Pentatopes for 4D simulations (with Szymczak, and with Snoeyink) • Progressive and error-resilient • Compressed batches of vertex-split upgrades (with Pajarola): 3.5T bits (total) • Tetrahedra (with Pajarola and Szymczak): 5T bits(after entropy)
Guaranteed 1.84T bit (King&Rossignac 99) • “Guaranteed 3.67v bits encoding of planar triangle graphs” • Proc. 11th Canadian Conference on Computational Geometry, August 1999 • Encoding of symbols that follow a C • C is 0, S is 10, R is 11 • 3 possible encoding systems for symbols that do not follow a C • Code I: C is 0, S is 100, R is 101, L is 110, E is 111 • Code II: C is 00, S is 111, R is 10, L is 110, E is 01 • Code III: C is 00, S is 010, R is 011, L is 10, E is 11 • One of these 3 codes takes less than (2-1/6)T bits • Use a 2-bit switch to identify which code is used for each model • Further constraints (Gumhold 00): 1.80T bits guaranteed • E is impossible after C, CCR, … • Because they have increased the length of the bounding loop to more than 3
? x Quad meshes (King,Rossignac,Szymczak 99) • “Connectivity Compression of Irregular Quad Meshes” • Surfaces often approximated by irregular quad meshes • Instead of triangulating, we encode quads directly • Measured 0.24V to 1.14V bits, guaranteed 2.67V bits (vs 3.67) • Equivalent to a smart triangulation + Edgebreaker • Only \-splits (no /-split), as seen from the previous quad • Guarantees the triangle-pair is consecutive in triangle tree • First triangle of each quad cannot be R or E: 13 symbol pairs possible
Improved Edgebreaker code (Gumhold 00) • “New bounds on the encoding of planar triangulations” • Siggraph course notes on “3D Geometry Compression” • 1.8T bits guaranteed • Exploits the length of the outer boundary of T-patch (>2) • Not convenient for treating non-manifolds (See later) • CE is impossible • Was at least 3, C increased it to at least 4, can’t have an E • CCRE is impossible • Was at least 3, CC increased it to at least 5, R reduced it by 1, can’t have an E • These constraints impact the probability of the next symbol and improve coding
Holes (with Safonova) • Many meshes have holes • Plug hole with a triangle fan (Touma&Gotsman’98) • Encode identifiers for dummy vertices • HLog(v) bits • The boundary of holes may by non-manfold • What is a hole?
Connectivity compression: An new problem? • Use vertex permutation to encode incidence • Denny,Sohler:Encoding a triangulation as a permutation of its point set,CCCG, 97 • Compression of the connectivity graph (planar triangle graph) • Itai,Rodeh: Representation of graphs, Acta Informatica, 82 • Turan: On the succinct representation of graphs, Discrete Applied Math, 84 • Naor:Succinct representation of general unlabeled graphs,Discrete Applied Math, 90 • Keeler,Westbrook: Short encoding of planar graphs and maps, Discrete Applied Math, 93 • Deering: Geometry Compression,Siggraph, 95 • Taubin,Rossignac: Geometric compression through topological surgery, ACM ToG, 98 • Taubin,Horn,Lazarus,Rossignac: Geometry coding and VRML, Proc. IEEE, 98 • Touma,Gotsman: Triangle Mesh Compression, GI, 98 • Gumbold,Straßer: Realtime Compression of Triangle Mesh Connectivity, Siggraph, 98 • Rossignac: Edgebreaker: Compressing the incidence graph of triangle meshes, TVCG, 99 • Rossignac,Szymczak: Wrap&Zip: Linear decompression of triangle meshes, CGTA, 99 • Szymczak,Rossignac: Grow&Fold: Compression of tetrahedral meshes, ACM SM, 99 • Compressed inverse of progressive simplification steps or batches • Hoppe: Progressive meshes, Siggraph, 96 • Taubin,Gueziec,Horn,Lazarus: Progressive forest split compression, Siggraph, 98 • Pajarola,Rossignac: Compressed Progressive Meshes, IEEE TVCG99 • Pajarola,Szymczak,Rossignac: ImplantSpray: Compressed Tetrahedral Meshes, VIS 99
Edgebereaker compression contributors Szymczak: Decompression King: Improved code, quads Rossignac: Edgebreaker Safonova: Holes, implementation Isenburg (UCS): Spirale Reversi Gotsman (Israel): Polygons Lopes (Brasil): Handles Gumhold (Germany): Better bounds Coors (Germany): Prediction