Streaming Compression of Triangle Meshes Martin Isenburg Peter
Streaming Compression of Triangle Meshes Martin Isenburg Peter Lindstrom Jack Snoeyink University of California at Berkeley Lawrence Livermore National Labs University of North Carolina at Chapel Hill
Compression
Compression • physical – sleeping bags – compressed air • digital – text, programs … – images – voice, music – movies JPG GIF
Mesh Compression “Geometry Compression” [Deering, 95] – Efficient Rendering – Progressive Transmission – Maximum Compression main memory • Connectivity • Geometry • Properties storage / network
Current Schemes “Triangle Mesh Compression” [Touma & Gotsman ‘ 98] “Cut-Border Machine” “Edgebreaker” “Face Fixer” “Angle Analyzer” “Degree Duality Coder” “Out-of-Core Compression” “Free. Lence” [Gumhold & Strasser ‘ 98] [Rossignac ‘ 99] [Isenburg & Snoeyink ‘ 00] [Lee, Alliez & Desbrun ‘ 02] [Isenburg & Gumhold ‘ 03] [Kälberer et al. ‘ 05]
Current Approach
Current Approach
Underlying Assumption • original ordering of vertices and triangles is not important – no need to preserve it – compressor is allowed to re-order • impose “canonical” ordering – only encode connectivity graph – re-order mesh based on some deterministic traversal
Original Orderings rendering the first 20 to 40 percent of the triangle array
Connectivity Traversal Entire Mesh As Input vertices Auxiliary Data Structures before compression starts get. Next(h_edge); get. Inv(h_edge); get. Origin(h_edge); is. Border(h_edge); is. Encoded(h_edge); mark. As. Encoded(h_edge); inv flags 0 0 1 0 0 triangles create data structure for querying and marking connectivity 1 0 1 0 0 0 1 1 1 0 00 0 0 1 1 1 1
Large Meshes 3 D scans isosurfaces
Large Meshes 3 D scans isosurfaces
Limited Main Memory • impossible to construct / store data structures for mesh traversal • cut mesh into pieces, compress separately, stitch back together “Compressing Large Polygonal Models” [Ho et al. ‘ 01] • use an external memory structure “Out-of-core Compression of Gigantic Polygon Meshes” [Isenburg and Gumhold. ‘ 03]
Out-of-Core Compression • Oo. C-Mesh – on-disk clustering – construct in advance – cache LRU clusters • Oo. C-Compressor – make few queries
Out-of-Core Compression • Oo. C-Mesh – on-disk clustering – construct in advance – cache LRU clusters • Oo. C-Compressor – make few queries • Decompression – “streaming”
Streaming
Streaming • physical – water in a pipe – drip coffee • digital – streaming formats • audio • video • triangle meshes
Two Types of Streaming • progressive • non-progressive
Non-Progressive Streaming • consume immediately • potentially without end • keep small buffer • delete data if no longer needed small window
Streaming Mesh Formats • “Streaming Meshes” [Isenburg and Lindstrom ‘ 05] interleave v 1. 32 v 1. 43 v 0. 91 f 1 2 done 2 v 0. 72 f 4 1 done 1 v 0. 72 ⋮ ⋮ 0. 12 0. 23 0. 92 0. 15 0. 62 3 0. 34 0. 35 3 1. 03 0. 35 ⋮ ⋮ introduce vertex # 2 introduced finalize not used by preceding triangles active vertex # 2 finalized not used by subsequent triangles number of active “width” vertices
Outputting Streaming Meshes • isosurface – 235 million vertices – 469 million triangles over 8 Gigabyte • marching cubes – extract layer by layer – output elements as extracted – finalize vertices of previous layer Richtmeyer-Meshkov instability simulation at LLNL
Streaming Simplification “Stream Algorithm for … ” [Wu & Kobbelt ‘ 03] “Large Mesh Simplification …” [Isenburg et al. ‘ 03]
Streaming Compression
Streaming Compression (1) • streaming API bool open(FILE* file, int bits); bool write_vertex(float* position); bool write_triangle(int* index, bool* finalize); bool close(); • compare to standard API bool compress(FILE* file, int bits, int num_pos, float* positions, int num_tri, int* indices);
Streaming Compression (2) • when writing a vertex – insert in hash • when writing a triangle – look-up active vertices – determine configuration – compress triangle + positions of new vertices – remove finalized data structures
Possible Configurations written triangle start add fill start 1 join end active elements
Compressing a Triangle – configuration – specify active vertex • log 2(width) bits • better: use cache add – specify other active vertices • use local edge lists – position of new vertices • parallelogram prediction fill – finalization flags
Demo • compress triangles immediately • use delay buffer
Greedy Local Reordering Improving connectivity compression by reordering triangles in a delay buffer 18 16 14 10 8 6 4 2 delay buffer size 10 K 5 K 1 K 0 50 0 25 0 10 50 25 ne 0 no bpv 12 lucy (original) (spectral) (geometric) (breadth) (depth) st. matthew (original) (spectral) (geometric)
compressed out-of-core streaming 344 MB 392 MB (coordinates uniformly quantized to 18 bits) pre-process 7 hours --- disk space 11. 2 GB --- main memory 384 MB 12 MB compress 4 hours 28 min
Example Processing Pipeline
Pipelined Stream-Processing • conventional processing P 1 P 2 P 3 • pipelined stream-processing P 1 P 2 P 3 – super-linear speedup – minimal end-to-end I/O delay – optimal disk caching
Demo Pipeline regular volume grid v 1. 32 v 1. 43 v 0. 91 f 1 2 done 2 v 0. 72 f 4 1 done 1 ⋮ ⋮ 256 0. 12 0. 23 0. 92 0. 15 0. 62 3 0. 34 0. 35 3 ⋮ ⋮ 256 smextract | smclean | smsimp | smcompress P 1 grid. raw P 2 P 3 P 4 mesh. smc
Conclusion
Current Schemes do not Scale 1 MB 9 GB
Problems of Current Schemes entire mesh as input 186 million vertices (2 GB) 372 million triangles (4 GB) IO-inefficient for large data dedicated out-of-core data structure (11 GB) global reordering of mesh during compression
Streaming Approach bool open(FILE* file, int bits); bool write_vertex(float* position); bool write_triangle(int* index, bool* finalize); bool close();
compressed out-of-core streaming 344 MB 392 MB (coordinates uniformly quantized to 18 bits) pre-process 7 hours --- disk space 11. 2 GB --- main memory 384 MB 12 MB compress 4 hours 28 min
Alternate Approaches • connectivity – different re-ordering strategy • higher correlation – deterministic growing strategy • let compressor choose & correct – degree-based coding • need to relax “max delay” constraint • geometry – local coordinate system, angles, …
Compressing Volume Meshes torso fighter standard streaming rate 2. 14 bpt 3. 88 bpt time 7 min 8 sec memory 115 MB 3 MB rate 1. 81 bpt 3. 56 bpt time 11 min 12 sec memory 140 MB 6 MB
Current/Future Work • implement more stream modules – streaming surface reconstruction – streaming stripification – streaming re-meshing – streaming smoothing – streaming segmentation – streaming feature extraction – streaming …
Acknowledgements • meshes – Stanford University, Cyberware • support – NSF grant 0429901 "Collaborative Research: Fundamentals and Algorithms for Streaming Meshes. " – U. S. DOE / LLNL # W-7405 -Eng-48 – Max Planck Institute für Informatik
Thank You streaming compression API : http: //www. cs. unc. edu/~isenburg/smc
Stream-Processing Modules • tasks that process mesh elements one at a time – e. g. for each triangle t … • tasks that only require access to local neighbors – e. g. for each triangle t of vertex v … • tasks that are order independent – e. g. collapse edges shorter than
# # # v v f f triceratops. obj 2832 vertices 2834 polygons 3. 661 0. 002 -0. 738 3. 719 -0. 833 2832! 0. 347 permutations 3. 977 0. 311 -0. 725 4. 077 0. 139 -0. 654 ⋮ ⋮ ⋮ ⋮ 2806 2810 2815 2821 2834 4 2811 rotations 2797 2801 2805 2789 2793 2802 2796 2834! permutations 2783 2794 2788 2832! • 2834! • 4 different orderings = 1. 6 E+18810 possible descriptions 2834
- Slides: 46