Presentation is loading. Please wait.

Presentation is loading. Please wait.

Coding with ASCII: compact, yet text-based 3D content Martin Isenburg Jack Snoeyink University of North Carolina at Chapel Hill and INRIA Sophia-Antipolis.

Similar presentations


Presentation on theme: "Coding with ASCII: compact, yet text-based 3D content Martin Isenburg Jack Snoeyink University of North Carolina at Chapel Hill and INRIA Sophia-Antipolis."— Presentation transcript:

1 Coding with ASCII: compact, yet text-based 3D content Martin Isenburg Jack Snoeyink University of North Carolina at Chapel Hill and INRIA Sophia-Antipolis

2 Overview Motivation Polygon Meshes Coding of Indices Position Indices + TexCoord Indices Quantizing & Coding of Coordinates Positions + Texture Coordinates Example Results, Demos & Conclusion

3 Motivation

4 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

5 Why Compression? authors “want” compressed 3D content faster download Web3D Developer survey: “very important” data-heavy nodes audio images video geometry interpolators

6 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...)

7 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

8 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 ?)

9 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 <<

10 Polygon Meshes

11 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 ]

12 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 ] }

13 coord ( Geometry ) 4 0 0 1 1 2 2 3 3 5 5 6 6 7 7

14 coordIndex ( Connectivity ) 03 12 4 7 5 6 face 0 0123 0 2 3 5 41 face 1 3257 face 2 1452 face 3 6037 face 4 6410 face 5 6754

15 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 ] }

16 0.0 v u 1.0 0.0 1 1 1 1 2 2 2 2 3 3 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 11 13 12 0 0 0 0 texCoord ( Property Values )

17 texCoordIndex ( Property Mapping ) face 0 0123 0 2 3 5 41 0 1 2 3 0 0 1 1 2 2 3 3 4 5 6 7 8 9 1011 10 11 13 12 face 1 3245 face 2 1672 face 3 100311 face 4 8910 face 5 10111312

18 Coding of Indices (1) Position Indices

19 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” <

20 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

21 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 Face Fixer F4F4 F5F5 R F3F3 LS E HnHn M

22

23 Encoding 5 9 2 0 22 25 29 78 31 43 67 98 11 86 53 68 14 27 77 72 91 6

24 Encoding F4F4 5 9 2 0 22 25 29 78 31 43 67 98 11 86 53 68 14 27 77 72 91 6

25 Encoding F4F4 F3F3 5 9 2 0 22 25 29 78 31 43 67 98 11 86 53 68 14 27 77 72 91 6

26 Encoding F4F4 F3F3 R 5 9 2 0 22 25 29 78 31 43 67 98 11 86 53 68 14 27 77 72 91 6

27 Encoding F4F4 F3F3 F5F5 R 5 9 2 0 22 25 29 78 31 43 67 98 11 86 53 68 14 27 77 72 91 6

28 Encoding F4F4 F3F3 F5F5 R F5F5 5 9 2 0 22 25 29 78 31 43 67 98 11 86 53 68 14 27 77 72 91 6

29 Encoding F4F4 F3F3 F5F5 R F5F5 R 5 9 2 0 22 25 29 78 31 43 67 98 11 86 53 68 14 27 77 72 91 6

30 Encoding F4F4 F3F3 F5F5 R F5F5 R R 5 9 2 0 22 25 29 78 31 43 67 98 11 86 53 68 14 27 77 72 91 6

31 Mapping Labels to ASCII Resulting label sequence: F4F4 F3F3 F5F5 R F5F5 R F4F4... RR F4F4 R R 0 L 1 S 2 E 3 M 4 F3F3 5 F4F4 6 F5F5 7 H3H3 5 6 H4H4 H5H5 7

32 Decoding R 61 42 43 44 45 46 47 26 27 26 25 24 23 11 12 13 14

33 Decoding R 62 61 42 43 44 45 46 47 26 27 26 25 24 23 11 12 13 14

34 Decoding F5F5 63 62 61 42 43 44 45 46 47 26 27 26 25 24 23 11 12 13 14

35 Decoding F5F5 63 62 61 42 43 44 45 46 47 26 27 26 25 24 23 11 12 13 14

36 Decoding R 63 62 61 42 43 44 45 46 47 26 27 26 25 24 23 11 12 13 14

37 Decoding F3F3 64 63 62 61 42 43 44 45 46 47 26 27 26 25 24 23 11 12 13 14

38 Decoding F4F4 64 63 62 61 42 43 44 45 46 47 26 27 26 25 24 23 11 12 13 14

39 Decoding 64 63 62 61 42 43 44 45 46 47 26 27 26 25 24 23 11 12 13 14

40 Non-Manifold Meshes cut

41 Coding of Indices (2) TexCoord Indices

42 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” <

43 Per-Corner Mappings “edge bits”, Gumhold & Strasser Real-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

44 Vertex and Corner Bits (1) 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 6 5

45 Vertex and Corner Bits (2) 2 1 1 2 1 3

46 Vertex and Corner Bits (3) crease vertexcorner vertexsmooth vertex smooth corner crease corner

47 Encoding 1

48 0 1 0

49 1 1 0 0

50 1 1 0 0 0

51 1 1 1 0 0 0

52 1 1 1 0 0 0 0 1

53 1 1 1 0 0 0 0 1 0

54 1 1 1 0 0 0 0 1 0 0

55 1 1 1 0 0 0 0 1 0 0 1

56 1 1 1 0 0 0 0 1 0 0 1 0

57 1 1 1 0 0 0 0 1 0 0 1 0 0

58 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1

59 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1

60 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1

61 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0

62 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 1

63 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 1 0

64 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 0 1

65 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 1 0 0

66 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 1 0 0 1

67 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 1 0 0 1

68 Quantizing & Coding of Coordinates

69 Quantize calculate bounding box (min x, min y, min z ) and (max x, max y max z ) calculate extends of bounding box range x = max x – min x range y = max y – min y … quantize with longest extend getting n bits

70 Delta Code coordinates are integer numbers only write difference to last resulting sequence has lower dispersion  there are much better schemes !!!  why delta-coding ??? simple, light-weight implementation submission deadline was close

71 Decoding Example

72 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] size of index arrays [ … ] indices[ ] = texindices[ ] = label E R 0 1

73 0 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] [ … ] indices[ ] = texindices[ ] = R label 1 2 R

74 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] [ … ] indices[ ] = texindices[ ] = R label F4F4

75 [ … ] 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 3 0 1 1 0 3 2 indices[ ] = texindices[ ] = F4F4 label R

76 [ … ] indices[ ] = texindices[ ] = 4 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 3 0 1 1 0 3 2 R label R

77 5 [ … ] indices[ ] = texindices[ ] = 4 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 3 0 1 1 0 3 2 R label F4F4

78 5 [ … ] indices[ ] = texindices[ ] = 4 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 3 0 1 1 0 3 2 F4F4 label 6 8 7 5 R 4 3 5 0

79 [ … ] indices[ ] = texindices[ ] = 4 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 3 0 1 1 0 3 2 6 8 7 5 R label 4 3 5 0 R label 6 5

80 7 [ … ] indices[ ] = texindices[ ] = 4 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 3 0 1 1 0 3 2 6 8 7 5 4 3 5 0 R label 6 5 F5F5 H5H5

81 3 8 H5H5 hole 7 [ … ] indices[ ] = texindices[ ] = 4 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 0 1 1 0 3 2 6 7 5 4 3 5 0 6 5 vertex bit indicating crease vertex 1 0 0 1 R label

82 0 1 hole 7 [ … ] indices[ ] = texindices[ ] = 4 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 0 1 1 0 3 2 6 7 5 4 3 5 0 6 5 1 0 R label 4 F3F3

83 0 1 hole 7 [ … ] indices[ ] = texindices[ ] = 4 3 2 0 1 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] 2 0 1 1 0 3 2 6 7 5 4 3 5 0 6 5 1 0 4 label F3F3 10 11 12 1 4 7 label F3F3

84 [ … ] 1 2 4 3 5 1 0 3 2 code_words [ ] = [ 438 3 0 0 6 0 0 6 0 0 7 -1 6 0 -1 4 5 5 0 …] indices[ ] = texindices[ ] = hole 2 0 1 3 4 5 6 7 4 2 12 15 2 2 2 0 1 6 7 5 10 11 16 14 0 4 1 4 7 0 2 2 1 2 0 0 1 label F3F3 vertex bit indicating smooth vertex 1

85 Results

86 “fish” scene Shape { appearance Appearance { material Material { modulateTextureWithDiffuse true diffuseColor 1 1 1 } texture ImageTexture { url fish.jpg } } geometry IndexedFaceSet { coord Coordinate { point [ -0.0715 4.7609 6.3930 -0.0715... -0.4479 -4.5153 4.5304 ] } coordIndex [ 7 6 209 204 -1 4 217 210 … 4577 -1 4577 4223 4222 -1 ] texCoord TextureCoordinate { point [ 0.3735 0.9441 0.3289 0.9315 … 0.2666 0.4990 0.1082 ] } texCoordIndex [ 0 1 2 3 -1 4 5 6 7 -1 8 … 4311 -1 4311 4293 4683 -1 ] } }

87 “fish” scene Shape { appearance Appearance { material Material { modulateTextureWithDiffuse true diffuseColor 1 1 1 } texture ImageTexture { url fish.jpg } } geometry IndexedFaceSet { coord Coordinate { point [ -0.0715 4.7609 6.3930 -0.0715... -0.4479 -4.5153 4.5304 ] } coordIndex [ 7 6 209 204 -1 4 217 210 … 4577 -1 4577 4223 4222 -1 ] texCoord TextureCoordinate { point [ 0.3735 0.9441 0.3289 0.9315 … 0.2666 0.4990 0.1082 ] } texCoordIndex [ 0 1 2 3 -1 4 5 6 7 -1 8 … 4311 -1 4311 4293 4683 -1 ] } } CodedIndexedFaceSet code [ 24045 3 0 3 1 1 2 0 0 0 0 0 0 3 … 5 0 5 0 5 0 5 0 6 0 0 0 0 2 ]

88 lossless-coded “fish” scene Shape { appearance Appearance { material Material { modulateTextureWithDiffuse true diffuseColor 1 1 1 } texture ImageTexture { url fish.jpg } } geometry CodedIndexedFaceSet { coord Coordinate { point [ -0.1195 -2.0148... -4.5153 4.5304 -0.4689 -4.4092 4.4136 ] } texCoord TextureCoordinate { point [ 0.0150 0.5031 … 0.2549 0.3889 0.2581 0.3825 0.2520 ] } code [ 24045 3 0 3 1 1 2 0 0 0 0 0 0 3 … 5 0 5 0 5 0 5 0 6 0 0 0 0 2 ] } } pos 4.884e-3 tex 3.8234e-3

89 lossy-coded “fish” scene Shape { appearance Appearance { material Material { modulateTextureWithDiffuse true diffuseColor 1 1 1 } texture ImageTexture { url fish.jpg } } geometry CodedIndexedFaceSet { coord Coordinate { point [ -2 -4 -1 -3 -3 0 -4 -47... 37 4 -21 24 -0.4689 -4.4092 4.4136 ] } texCoord TextureCoordinate { point [ 0 0 0 0 0 -4 0 1 … -1 -1 0 0 0 -1 5 3 -4 0 2 2 0.3825 0.2520 ] } code [ 24045 3 0 3 1 1 2 0 0 0 0 0 0 3 … 5 0 5 0 5 0 5 0 6 0 0 0 0 2 ] pos 4.884e-3 tex 3.8234e-3 } }

90 lion441.6201.646 %66.215 % wolf183.184.546 %29.416 % raptor199.8100.750 %34.917 % fish122.955.445 %22.819 % snake312.3138.144 %34.811 % horse266.4124.347 %40.915 % cat267.3128.448 %39.915 % dog186.287.347 %34.619 % Results: Dense Scenes model plaincodedquantized

91 ---29895 IFS1836461 % Results: Sparse Scene 33 indexed face sets 5 position interpolators 27 orientation interpolators file size of “swing.wrl.gz” in bytes 31 % 66 % IFS, OI, PI1299643 % 20564 899344 % Only Indexed Face Sets

92 Demos

93 Shout3D ASCII coder :> local web <localweb Various Scenes Swing ( static ) > local web <localweb Swing ( animated ) > local web <localweb Fish > local web <localweb Lion > local web <localweb Snake > local web <localweb http://www.cs.unc.edu/~isenburg/asciicoder/

94 Conclusion geometry coding for ASCII formats compressed, but not binary authors not forced to change habits VRML / X3D geometry compression long wanted feature (`96) VRML-CBF proposal refused (`98) BF call for proposals unanswered (`00) Conformance: ASCII BINARY

95 Current Work “Arithmetic ASCII”  ( nearly ) as compact as a compressed binary format  straight-forward mapping to binary  no compromise on binary compression rates  same decoding algorithm for binary and ASCII version of a node  good for rapid prototyping / proof-of-concept

96 Acknowledgements Paul Isaacs for telling me “… no, we don’t have geometry compression because the Shout3D API does not support binary input …” Curious Labs & Shout3D for the models ARC TéléGeo of INRIA Sophia-Antipolis for partial funding

97 Thank You. http://www.cs.unc.edu/~isenburg/asciicoder/


Download ppt "Coding with ASCII: compact, yet text-based 3D content Martin Isenburg Jack Snoeyink University of North Carolina at Chapel Hill and INRIA Sophia-Antipolis."

Similar presentations


Ads by Google