970 likes | 1.15k Vues
Coding with ASCII: compact, yet text-based 3D content. Martin Isenburg Jack Snoeyink University of North Carolina at Chapel Hill and INRIA Sophia-Antipolis. Overview. Motivation Polygon Meshes Coding of Indices Position Indices + TexCoord Indices
E N D
Coding with ASCII:compact, yet text-based 3D content Martin Isenburg Jack Snoeyink University of North Carolina at Chapel HillandINRIA Sophia-Antipolis
Overview • Motivation • Polygon Meshes • Coding of Indices • Position Indices + TexCoord Indices • Quantizing & Coding of Coordinates • Positions + Texture Coordinates • Example • Results, Demos & Conclusion
Why ASCII? • authors “like” text-based 3D formats • wide acceptance • read & modify scene with any text editor • Web3D Developer survey: “very important” many Web3D APIs only support ASCII(rather than supporting two formats) no binary VRML specification
Why Compression? • authors “want” compressed 3D content • faster download • Web3D Developer survey: “very important” • data-heavy nodes • audio • images • video • geometry • interpolators
Approaches • readable text-based format: • support only ASCII content • exception: “standard” binary data • VRML and its variants • binary format: • one (or more) binary files • automatically “protects” the content • proprietary (Cult, Shockwave, Viewpoint ...)
Compression Standards (1) • binary compression standards: • image data: JPEG, GIF • audio data: MP3 • movie data: MPEG • geometry data: ? (MPEG-4/7 ??) • interpolator data: ? (MPEG-4/7 ??) • “read” “edit” “write” software is plentiful
Compression Standards (2) • the structure of 3D data is more complex • audio : sequence of numbers • image : block of numbers • video : sequence of blocks of numbers • geometry : + positions + triangles (or polygons ?) + texcoords (1, 2, 3, or 8 layers ?) + normals or smoothing groups (?) + colors (per-face or per-vertex ?) + bones (1, 2 or 3 attachments ?)
Download on Demand • java-based browsers • Shout3D, Blaxxun3D, CortonaJet, Hotmedia • provide decoder with the model. • “light-weight” important • it has to be downloaded also • download less was motivation to compress • proposed decoder: >> 5381 bytes <<
Polygon Meshes • Polygon Mesh = Indexed Face Set (IFS) • minimally : • p positions = float [ 3p ] • f faces with c corners = int [ f + c ] • optionally : • t texCoords = float [ 2t ] • f faces with c corners = int [ f + c ]
Example: “a box” IndexedFaceSet { coord Coordinate { point [ -1.0 1.0 -1.0 , -1.0 -1.0 -1.0 , 1.0-1.0 -1.0 , 1.0 1.0 -1.0 , -1.0 -1.0 1.0 , 1.0 -1.0 1.0, -1.0 1.0 1.0, 1.0 1.0 1.0 ] } coordIndex [ 0 1 2 3 -1 3 2 5 7 -1 1 4 5 2 -1 6 0 3 7 -1 6 4 1 0 -1 6 7 5 4 -1 ] }
3 6 7 6 7 2 0 0 3 1 2 1 4 5 5 coord (Geometry)
6 7 0 3 1 2 4 5 coordIndex (Connectivity) 5 3 face0 0 1 2 3 face1 3 2 5 7 4 1 0 face2 1 4 5 2 face3 6 0 3 7 2 face4 6 4 1 0 face5 6 7 5 4
Example: “a textured box” IndexedFaceSet { . . . . . . texCoord Coordinate { point [ 0.4 0.5 , 0.4 0.3 , 0.6 0.3 , 0.6 0.5, 0.8 0.3 , 0.8 0.5 , 0.4 0.1 , 0.6 0.1 , 0.2 0.5 , 0.2 0.3 , 0.4 0.7 , 0.6 0.7 , 0.4 0.9 , 0.6 0.9 ] } texCoordIndex [ 0 1 2 3 -1 3 2 4 5 -1 1 6 7 2-1 10 0 3 11 -1 8 9 1 0 -1 10 11 13 12 -1 ] }
10 11 11 10 8 5 0 3 1.0 12 13 3 0 0 3 11 10 1 2 1 2 1 2 v 5 8 0 3 9 4 6 7 2 4 13 1 9 12 6 7 0.0 u 0.0 1.0 texCoord (Property Values)
texCoordIndex (Property Mapping) 5 10 11 11 10 3 8 5 face0 0 1 2 3 0 3 3 face1 3 2 4 5 0 0 3 4 1 0 face2 1 6 7 2 1 2 1 2 face3 10 0 3 11 1 2 2 9 4 face4 8 9 1 0 6 7 13 12 face5 10 11 13 12
Coding Position Indices > don’t code indices “directly” < • Assumption: “order of position doesn’t matter” • Approach: “change order of positions” • code connectivity graph • enumerate positions based on traversal order • re-order accordingly > code indices “implicitly” <
Connectivity Coders for Triangle Meshes • Topological Surgery, Taubin et al., `97 • Triangle Mesh Compression, Touma & Gotsman, `98 • Cut-Border-Machine, Gumhold & Strasser, `98 • Edgebreaker, Rossignac, `99 for Polygon Meshes • Face Fixer, Isenburg & Snoeyink, `00 • Degree Duality Coder, Isenburg, `02 • Near-Optimal Connectivity Encoding, Khodakovsky, Alliez, Desbrun & Schröder, `02
R F4 L S E F5 F3 M Hn Face Fixer • region growing • encodes connectivity graph as a sequence of labels: • one label . . . . per face • one label per hole • one label per handle • labels and fix it all together • number of labels = number of edges • reverse decoding
Encoding 29 0 6 91 27 14 68 5 72 98 53 86 31 67 77 9 22 11 25 43 2 78
F4 Encoding 29 0 6 91 27 14 68 5 72 98 53 86 31 67 77 9 22 11 25 43 2 78
F4 F3 Encoding 29 0 6 91 27 14 68 5 72 98 53 86 31 67 77 9 22 11 25 43 2 78
R F4 F3 Encoding 29 0 6 91 27 14 68 5 72 98 53 86 31 67 77 9 22 11 25 43 2 78
R F4 F5 F3 Encoding 29 0 6 91 27 14 68 5 72 98 53 86 31 67 77 9 22 11 25 43 2 78
R F4 F5 F5 F3 Encoding 29 0 6 91 27 14 68 5 72 98 53 86 31 67 77 9 22 11 25 43 2 78
R R F4 F5 F5 F3 Encoding 29 0 6 91 27 14 68 5 72 98 53 86 31 67 77 9 22 11 25 43 2 78
R R R F4 F5 F5 F3 Encoding 29 0 6 91 27 14 68 5 72 98 53 86 31 67 77 9 22 11 25 43 2 78
R R R R R R F4 F4 F4 F4 L 4 0 S E F5 F5 F5 F3 F3 1 5 5 -1 6 6 -1 2 3 7 7 -1 M H3 H4 H5 Mapping Labels to ASCII • Resulting label sequence: . . . . . . . . . . . .
R Decoding 14 12 23 11 13 47 24 26 26 46 27 25 44 43 42 45 61
R Decoding 14 12 23 11 13 47 24 26 26 46 27 25 44 43 42 45 61 62
F5 Decoding 14 12 23 11 13 47 24 26 26 46 27 25 44 43 42 45 63 61 62
F5 Decoding 14 12 23 11 13 47 24 26 26 46 27 25 44 43 42 45 63 61 62
R Decoding 14 12 23 11 13 47 24 26 26 46 27 25 44 43 42 45 63 61 62
F3 Decoding 14 12 23 11 13 47 24 26 26 46 27 25 44 43 42 45 63 61 64 62
F4 Decoding 14 12 23 11 13 47 24 26 26 46 27 25 44 43 42 45 63 61 64 62
Decoding 14 12 23 11 13 47 24 26 26 46 27 25 44 43 42 45 63 61 64 62
cut cut Non-Manifold Meshes
Coding TexCoord Indices > don’t code indices “directly” < • Assumption: “order of texCoords doesn’t matter” • Approach: “change order of texCoords” • code “on top” of connectivity graph • enumerate texCoords based on traversal order • re-order accordingly > code indices “implicitly” <
Per-Corner Mappings • “edge bits”, Gumhold & StrasserReal-time compression of triangle mesh connectivity, SIGGRAPH ‘98 • “discontinuity bits”, Taubin et al.Geometry coding and VRML, Proceedings of the IEEE ‘98 • “vertex and corner bits”, Isenburg & Snoeyink Face Fixer: Compressing Polygon Meshes with Properties, SIGGRAPH ‘00
1 1 1 2 2 3 6 5 5 1 1 1 4 4 4 2 2 2 3 3 3 Vertex and Corner Bits (1)
1 1 1 3 2 2 Vertex and Corner Bits (2)
smooth corner crease corner smooth vertex crease vertex corner vertex Vertex and Corner Bits (3)
Encoding 1
Encoding 1 0 0
Encoding 1 0 0 1
Encoding 1 0 0 0 1