1 / 69

3D Compression

3D Compression. Jarek Rossignac GVU Center and College of Computing Georgia Tech, Atlanta http://www. gvu.gatech .edu/ ~ jarek. How should one measure shape complexity ?. Number of components, handles and holes Algebraic degree of bounding surfaces Number of vertices in mesh

claude
Download Presentation

3D Compression

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3D Compression Jarek Rossignac GVU Center and College of Computing Georgia Tech, Atlanta http://www.gvu.gatech.edu/~jarek

  2. How should one measure shape complexity? • Number of components, handles and holes • Algebraic degree of bounding surfaces • Number of vertices in mesh • Stabbing number • Area3/volume2 • Curvature integral • Number of branches in skeleton • … • Number of bits required to store or transmit the model

  3. Error Storage Storage size depends on • The shape, topology, and attributes of the model • Choice of representation • Acceptable accuracy loss • Compression used

  4. 2D 1D 0D  Storage size depends on representation

  5. Overall objective and issues • Find the most compact representation for each object • If you want loss-less encoding • Not much freedom • Triangle mesh or CSG? • Sphere(C,r) or NURBS • If you accept lossy encoding • How do you define the error? • Can you compute it? • How to convert between representations? • Boundary-to-CSG • How to compress each representation? • We focus on triangle meshes • Popular, supported, simplest • Representing polyhedra, Bsplines, and Subdivision surfaces

  6. x y z c vertex 1 Samples (vertices): x y z c vertex 2 x y z c vertex 3 Triangle/vertex incidence: v4 1 2 3 Triangle 1 3 24 Triangle 2 4 5 2 Triangle 3 t3 7 56 Triangle 4 v5 6 5 8 Triangle 5 v2 8 51 Triangle 6 Focus on explicit representation (T-mesh) • Samples: Location and attributes (color, mass) • Connectivity: Triangle/vertex incidence • Fit: Rule for bending triangles (subdivision surfaces, NURBS) V(3B+k) bits T = 2V V(6log2V) bits

  7. (7,7) ET (0,0) T Storage size depends on accuracy • Depends on vertex data quantization • Represent coordinates as normalized integers • Coordinates relative to bounding rectangle • Select unit for desiredresolution [0..2B] • Vertex coordinates = B-bit integers (6<B<14) Error EB • Depends on the sampling density (LOD) • Storage grow with the density of samples • Sub-sampled or simplified down to T triangles: Error ET • Estimate ET = K/T (where K approximates shape complexity) • Optimal choice of B and T (King&Rossignac) • Reduce error with a storage cap: F = T+3BcT/2 • Reduce storage with a cap on error bound: E=EB+ET

  8. Triangle count reduction techniques (LOD) • Quantize & cluster vertex data (Rossignac&Borrel’92) • remove degenerate triangles (that have coincident vertices) • Adapted by P. Lindstrom for out-of-core simplification • Repeatedly collapse best edge (Ronfard&Rossignac96) • while minimizing maximum error bound • Adapted by M. Garland for least square error

  9. Different Error Measures screen • Image (color) fidelity (view dependent) • Error on the color of pixels • Sensitive to view direction and surface orientation • Too constraining for most 3D applications • Shading models are approximate • Users can’t detect shading inaccuracies • Screen space geometric error (view-dependent) • Measures silhouette displacement • Must preserve depth order • Bounded by projection of 3D deviation • Geometric 3D deviation (view-independent) • Bound defined by model/application tolerance • Hausdorff: H(A,B)=max(d(a,B),d(b,A)), aA, bB • Expensive to compute: (F1,F2,F3) • Poor measure of discrepancy • Often approximated conservatively eye Silhouette has moved eye Hidden part appeared

  10. C R C C R C C R C C A C B C D V V=aA+bB+cC+dD+X Storage may be reduced by compression • Vertex coordinates (compress to 2 Bytes/vertex) • Normalize/quantize coordinates • Predict using decoded neighbors • Store corrections using entropy compression • Incidence (< 2 bits/vertex) • Depth-first triangle-tree (spiral) • Encode as string of symbols • Fit rule and parameters (constant cost?) CCCCRCCRCRC…

  11. Simplification & quantization Compression Complexity of a shape = Storage/Error curve Storage Error of the approximating model Curve depends on representation and compression scheme used Estimate ET = K/T

  12. vertex corner triangle border edge Terminology • Vertex: • Location of a sample • Triangles: • Decompose approximating surface • Edge: • Bounds one or more triangles • Joins two vertices • Corner: • Abstract association of a triangle with a vertex • May have its own attributes (not shared by corners with same vertex) • Used to capture surface discontinuities • Border (oriented half-edge, dart): • Association of a triangles with a bounding edge. • Orientation cycle around triangle, inverse of opposite border • A triangle has 3 borders and 3 corners

  13. First, the case of a simple mesh • A simple mesh is homeomorphic to a triangulated sphere • Orientable • Manifold • No boundary (no holes) • No handles (no throu-holes) • Properties • Each edge has exactly 2 incident triangles • Each vertex has a single cycle of incident triangles • May be drawn as a planar graph

  14. Dual graphs and spanning trees From Bosen • Dual graph: • Nodes represent triangles • Links represent edges • That join adjacent triangles • Vertex Spanning Tree (VST) • Edge-set connecting all vertices • No cycles • Cuts mesh into simply connected polygon with no interior vertices • Triangle-Spanning Tree (TST) • Graph of remaining edges • No loops • Connects all triangles TST VST

  15. Euler formula for Simple Meshes • Mesh has V vertices, E edges, and T triangles • E = (V-1)+(T-1) • VST has V nodes and thus V-1 links • TST has T nodes and thus T-1 links • E = 3T/2 • There are 3 borders (edge-uses) per triangle • There are twice more edge-uses then edges • Therefore: T = 2V - 4 • Because (V-1)+(T-1) = 3T/2 • we have V-2 = 3T/2-T = T/2 • There are about twice as many triangles as vertices • The number C of corners (vertex-uses) is about 6V • C=3T=6V-12 • On average, a vertex is used 6 times

  16. Triangle 1 vertex 1 vertex 3 vertex 2 Triangle 2 x y z x y z x y z Triangle 3 x y z x y z x y z x y z x y z x y z Representation as independent triangles • For each triangle: • For each one of its 3 corners, store: • Location • Attributes (may be the same for neighboring corners) • Each vertex location is repeated (6 times on average) • geometry = 36 B/T (float coordinates: 9x4 B/T) • Plus 3 attribute-sets per triangle (6 per vertex) Very verbose! Not good for traversal.

  17. L R R Representation as Triangle strips • Continue a strip by attaching a new triangle to an edge of the previous one • Need only indicate which edge and when to start a new strip • 1 Left/Right bit per triangles • 1 strip-end bit per triangle • Send one vertex per triangle • Plus 2 vertices per strip to start it • Each vertex is transmitted twice on average

  18. vertex 1 vertex 3 vertex 2 x y z x y z x y z Triangle 1 x y z x y z x y z Triangle 2 x y z x y z x y z vertex 1 Triangle 3 vertex 2 vertex 3 L 1 2 3 Triangle 1 x y z c 3 24 7 56 Triangle 2 x y z10 Triangle 4 x y z c vertex 1 R R Strip 1 4 5 2 Triangle 3 x y z7 x y z c vertex 2 Strip 2 8 51 x y z Triangle 6 vertex 3 6 5 8 Triangle 5 36-to-1 compressionratio Independent triangles: 576V bits (coordinates as floats 9x32T bits) Each vertex encoded ~ 6 times Triangle Strips: 214V bits (1.1x3x4B/T + 1B/S + 1b/T) Each vertex encoded ~ twice V and T tables Example: V=1000, B=10, k=0 Samples+incidence storage costs: (3B+6log2V)V = (30+60)V =98V bits V(6log2V) bits V(3B+k) bits Can be compressed to: (14+2)V = 16V bits

  19. Valence-based Gotsman&team Cutborder Gumhold&Strasser Edgebreaker Rossignac&team Spirale Reversi Snoeyink&Isenburg Connectivitycompression: An old challenge • Tutte: Theoretical lower bound (Tutte 62): can’t guarantee < 1.62 bits per triangle • Itai,Rodeh: Representation of graphs, Acta Informatica, 82 • Turan: On the succinct representation of graphs, Discrete Applied Math, 84: 6Tb • Naor:Succinct representation of unlabeled graphs,Discrete Applied Math, 90 • Keeler,Westbrook: Encoding planar graphs, Discrete Applied Math, 93: 2.3Tb • Deering: Geometry Compression,Siggraph, 95 • Denny,Sohler:Encode 2D triangulation as permutation of points,CCCG, 97: 0Tb Topological Surgery Taubin&Rossignac

  20. L L L L R R R R R Connecting vertices into a single spiral (Hamiltonian walk) defines the left and the right boundaries (walls) of a long corridor. A simple and elegant solution (?) Given the left and right boundaries of a triangle strip (corridor), we need T (left/right) bits to encode its triangulation. ex: LRRLLRLRR Store vertices in their order along the wall. (Can use former vertices to predict location of new ones.) Encode connectivity using only 1 (left/right) bit per triangle !

  21. L R ? R But..but..wait a minute! It doesn’t work! The corridor may have warts ? Warts are hard to avoid The spiral may bifurcate The corridor may bifurcate

  22. 4 5 1 3 6 1 2 + 12 12 11 11 10 10 7 8 3Tb encoding of VST and TST suffices Guaranteed 3Tb connectivity (2Tb T-tree + 2Vb V-tree) 2 2 7 3 3 4 4 7 5 5 6 9 7 6 8 7 9 7 8

  23. Topological Surgery (TS) Taubin-Rossignac IBM’95, VRML, MPEG-4 “Geometric compression through Topological Surgery,” G. Taubin and J. Rossignac, ACM Transactions on Graphics, vol. 17, no. 2, pp. 84–115, 1998. “Geometry coding and VRML,” G. Taubin, W. Horn, F. Lazarus, and J. Rossignac, Proceeding of the IEEE, vol. 96, no. 6, pp. 1228–1243, June 1998.

  24. 5 5 4 2 3 Run-length encoding of TST and VST Most nodes have a single child. - Group them into runs - Store structure of each tree (2 bits per run) - Store left/right bit per triangle

  25. TS example

  26. Spiralis better than other traversal orders

  27. TS spiral joins topological layers

  28. Results TS (MPEG-4) vs VRML

  29. Topological Surgery: Results and Impact • Results: • Compresses to less than 12 bits per triangle • Connectivity: about 2.0 T bits (increases for smaller meshes) • Geometry: 6 bits per coordinate (decreases with tessellation&quantization) • Publications and impact of Topological Surgery: • Interfaced to VRML 2.0 offeredby IBM (1995) • Core of the MPEG-4 standard for 3D Compression • Geometric compression through topological surgery,Taubin&Rossignac • ACM Transactions on Graphics, 17(2):84-116, April 1998 (Best Paper Award) • Geometry coding and VRML, Taubin, Horn, Lazarus, & Rossignac • Proceedings of the IEEE, 96(6):1228-1243, June 1998 • Inspired several approaches • Touma,Gotsman: Triangle Mesh Compression, GI, 98 • Gumbold,Straßer: Realtime Compression of Triangle Mesh Connectivity, Siggraph, 98 • Taubin,Gueziec,Horn,Lazarus: Progressive forest split compression, Siggraph, 98

  30. Second generation 3D compressionFaster, simpler, more effective Edgebreaker (EB) “Edgebreaker: Connectivity compression for triangle meshes,” J. Rossignac, IEEE Transactions on Visualization and Computer Graphics, vol. 5, no. 1, pp. 47–61, 1999. “Optimal Bit Allocation in Compressed 3D Models”. D. King and J. Rossignac. Computational Geometry, 14:91–118, 1999. “Wrap&Zip decompression of the connectivity of triangle meshes compressed with Edgebreaker,” J. Rossignac and A. Szymczak. Computational Geometry: Theory and Applications, 14(1-3):119-135, 1999. “Connectivity compression for irregular quadrilateral meshes,” D. King, J. Rossignac, and A. Szymczak, Technical Report TR–99–36, GVU, Georgia Tech, 1999. “An Edgebreaker-based efficient compression scheme for regular meshes,” A. Szymczak, D. King, and J. Rossignac, in Proceedings of 12th Canadian Conference on Computational Geometry, 20(2):257–264, 2000. “3D Compression and progressive transmission,” J. Rossignac. Lecture at the ACM SIGGRAPH conference July 2-28, 2000. “3D compression made simple: Edgebreaker on a corner-table.” J. Rossignac, A. Safonova, and A. Szymczak. In Proceedings of the Shape Modeling International Conference, 2001. “Edgebreaker on a Corner Table: A simple technique for representing and compressing triangulated surfaces”, J. Rossignac, A. Safonova, A. Szymczak, in Hierarchical and Geometrical Methods in Scientific Visualization, Farin, G., Hagen, H. and Hamann, B., eds. Springer-Verlag, Heidelberg, Germany, 2002. “Guess Connectivity: Delphi Encoding in Edgebreaker”, V. Coors and J. Rossignac, GVU Technical Report. June 2002. “A Simple Compression Algorithm for Surfaces with Handles”, H. Lopes, J. Rossignac, A. Safanova, A. Szymczak and G. Tavares. ACM Symposium on Solid Modeling, Saarbrucken. June 2002.

  31. Edgebereaker compression contributors King (Atlanta): 1.84Tbits, quads Gumhold (Germany): 1.80T bits Rossignac (Atlanta): Edgebreaker Safonova (CMU): Holes, code Szymczak (Atlanta): regularity, resampling Shikhare (India): translation Attene (Italy): retiling Isenburg (UCS): Reversi Coors (Germany): Prediction Lopes (Brasil): Handles Gotsman (Israel): Polygons

  32. ? 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 is a 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

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

  34. EB re-numbering of vertices

  35. 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 “3D compression made simple: Edgebreaker on a corner-table.” J. Rossignac, A. Safonova, and A. Szymczak. In Proceedings of the Shape Modeling International Conference, 2001. • Table of corners, for each corner c store: • c.v : integer reference to vertex table • c.o : integer reference to opposite corner • 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

  36. v o a 2 Triangle 1 corner 0 1 a Triangle 1 corner 1 2 b Triangle 1 corner 23 c Triangle 2 corner 3 2 c Triangle 2 corner 4 1 d Triangle 2 corner 54 e 3 1 3 2 4 5 0 4 1 v o a Triangle 1 corner 0 1 a Triangle 1 corner 1 2 b Triangle 1 corner 235 c Triangle 2 corner 3 2 c Triangle 2 corner 4 1 d Triangle 2 corner 542 e 2 3 1 3 2 4 5 0 4 1 Computing adjacency from incidence • c.o can be derived from c.v (needs not be transmitted): • Build table of triplets {min(c.n.v, c.n.n.v), max(c.n.v, c.n.n.v), c} • 230, 131, 122, 143, 244, 125, … • Sort (bins, linear cost): • 122, 125 ...131... 143 ...230...244 … • Pair-up consecutive entries 2k and 2k+1 • (122, 125)...131... 143...230...244… • Their corners are opposite • (122,125)...131...143...230...244…

  37. 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 Source code, examples: http://www.gvu.gatech.edu/~jarek/edgebreaker/eb • recursive procedurecompress (c) • repeat{ • c.t.m:=1; # mark the triangle as visited • if c.v.m == 0 # 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:= 1; # mark tip vertex as visited • c:=c.r } # continue with the right neighbor • elseif c.r.t.m==1 # test whether right triangle was visited • thenif c.l.t.m== 1 # 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 == 1 # 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)

  38. EB decompression: how come it works? 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? “Wrap&Zip decompression of the connectivity of triangle meshes compressed with Edgebreaker,” J. Rossignac and A. Szymczak. Computational Geometry: Theory and Applications, 14(1-3):119-135, 1999.

  39. 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 EB decompression (with Szymczak) 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.

  40. Wrap&Zip more complex example

  41. C R L S E Spirale Reversi decompression for EB M. Isenburg and J. Snoeyink. Spirale reversi: Reverse decoding of the Edgebreaker encoding. Technical Report TR-99-08, Department of Computer Science, University of British Columbia, October 4 1999. compression clers = …CCRRCCRRRCRRCRCRRCCCRRCRRCRCRRRCRCRCRRSCRRSLERERLCRRRSEE reversi = EESRRRCLRERELSRRCSRRCRCRCRRRCRCRRCRRCCCRRCRCRRCRRRCCRRCC… decompression

  42. 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…

  43. Edgebreaker Results • Compression results for connectivity information • Guaranteed2T bits for any simple mesh(improved later to 1.80T bits) • Entropy down to 0.9T bits for non-trivial large models • Frequency: C=50%, R about 35%, S and E = 1-to-5% • 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 • ….

  44. Edgebreaker extensions and improvements • Better connectivity compression • Tighter guaranteed upper bound (King&Rossignac, Gumhold): 1.80T bits • Sufficiently regular meshes (with Szymczak and King): 0.81T bits guaranteed • Delphi Connectivity predictors (with Coors): between 0.2T and 1.5T bits • Topological extensions • Quadrilateral meshes (with Szymczak and King): 1.34T bits • Handles/holes (with Safonova, Szymczak, Lopes, and Tavares) • Non manifold solids (with Cardoze) • Implementation (with Safonova, Coors, Szymczak, Shikhare, Lopes) • Retiling and loss optimization • Optimal quantization (with King and Szymczak): best B and T • Piecewise regular resampling (with Szymczak and King) 1T bits total • Uniform C-triangles (with Attene, Falcidieno, Spagnuolo): 0.4T bits total • Higher dimension • Tetrahedra for FEM (with Szymczak): 7T bits(prior to entropy) • Pentatopes for 4D simulations (with Szymczak, and with Snoeyink)

  45. Triangulated quad1.34T bits guaranteed "Connectivity Compression for Irregular Quadrilateral Meshes" D. King, J. Rossignac, A Szymczak. • Triangulate quads as you reach them • Always \ , never / • Consecutive in CLERS sequence • Guaranteed 2.67 bits/quad • 1.34T bits • Cheaper to encode that triangulation • Less than Tutte’s lowest bound • Fewer Q-meshes than T-meshes • With same vertex count • Theoretical proof • Extended to polygons • Fan boundaries FaceFixer, Isenburg&Snoeyink

  46. Manifold meshes may have handles • Number of handles H • Is half the smallest number of closed curves cuts necessary to make the surface homeomorphic to a disk • T=2V+4(H-S) • T triangles, E edges, V vertices, H handles, S shells • Euler: T-E+V=2S -2H • 2 borders per edge and 3 borders per triangle: 2E=3T • H=S-(T-E+V)/2 • Shared edges: E=3T/2 • 3 borders per triangle, 2 borders per edge disk

  47. S* Simple encoding of handles in Edgebreaker “A Simple Compression Algorithm for Surfaces with Handles”, H. Lopes, J. Rossignac, A. Safanova, A. Szymczak and G. Tavares. ACM Symposium on Solid Modeling, Saarbrucken. June 2002. • VST and TST miss 2 edges per handle • Encode their adjacency explicitly • As corner pairs of “glue” edges • Additional connectivity cost 2Hlog(3T) • Need to restart zipping • From each glue edge

  48. Example: EB compression of torus • Each handle creates two S that will not be able to go left • Encode the pair of opposite corner IDs

  49. Plug holes with dummy triangle fans C. Touma and C. Gotsman, “Triangle mesh compression,” in Graphics Interface, 1998. • Encoder • Create a dummy vertex • Triangulate the hole as a star • Encode mesh with the holes filled • Encode the IDs of dummy vertices • Skip tip ID of biggest hole • RLE number of initial Cs • Decoder • Receives filled mesh and IDs of dummy vertices • Reconstructs complete mesh • Removes star if dummy vertices • What is a hole? • With Safonova, Szymczak

  50. 2 3 1 2 5 0 4 3 4 1 Non-Manifolds • Solid models have non-manifold edges and vertices • Compression exploits manifold data structures • Matchmaker: Manifold BReps for non-manifold r-sets • Rossignac&Cardoze, ACM Symposium on Solid Modeling, 1999. • Match pairs of incident faces for each NME • Respects surface orientation & minimizes number of NMVs

More Related