Top Banner
Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill Peter Lindstrom Lawrence Livermore National Labs
46

Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Streaming Compressionof Triangle Meshes

Martin IsenburgUniversity of California

at Berkeley

Jack SnoeyinkUniversity of North Carolina

at Chapel Hill

Peter LindstromLawrence Livermore

National Labs

Page 2: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Compression

Page 3: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Compression• physical

– sleeping bags

– compressed air

JPG GIF

• digital– text, programs …

– images

– voice, music

– movies

Page 4: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

– Efficient Rendering

– Progressive Transmission

– Maximum Compression

• Connectivity

• Geometry

• Properties

Mesh Compression

“Geometry Compression” [Deering, 95]

storage / network

main memory

Maximum Compression

Page 5: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Current Schemes

“Triangle Mesh Compression” [Touma & Gotsman ‘98]

“Cut-Border Machine” [Gumhold & Strasser ‘98]

“Edgebreaker” [Rossignac ‘99]

“Face Fixer” [Isenburg & Snoeyink ‘00]

“Degree Duality Coder” [Isenburg ‘02]

“Angle Analyzer” [Lee, Alliez & Desbrun ‘02]

“FreeLence” [Kälberer et al. ‘05]

“Out-of-Core Compression” [Isenburg & Gumhold ‘03]

Page 6: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Current Approach

Page 7: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Current Approach

Page 8: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

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

Page 9: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Original Orderings

rendering the first 20to 40 percent of thetriangle array

Page 10: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Connectivity TraversalEntire Mesh As Input

triangles

vertices beforecompression

starts

createdata structurefor queryingand markingconnectivity

getNext(h_edge);getInv(h_edge);getOrigin(h_edge);isBorder(h_edge);isEncoded(h_edge);markAsEncoded(h_edge);

inv flags

Auxiliary Data Structures

001

11

1

1

1

1

11

11

1

1

1

1

1

1

1

0

0

0

00

0 0

00

0

00

0

0

0

0

00

0

0

0

Page 11: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Large Meshes

3D scans isosurfaces

Page 12: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Large Meshes

3D scans isosurfaces

Page 13: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Limited Main Memory

“Compressing Large Polygonal Models” [Ho et al. ‘01]

• cut mesh into pieces, compress separately, stitch back together

“Out-of-core Compression of Gigantic Polygon Meshes”[Isenburg and Gumhold. ‘03]

• use an external memory structure

• impossible to construct / store data structures for mesh traversal

Page 14: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Out-of-Core Compression• OoC-Mesh

– on-disk clustering

– construct in advance

– cache LRU clusters

• OoC-Compressor– make few queries

Page 15: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Out-of-Core Compression• OoC-Mesh

– on-disk clustering

– construct in advance

– cache LRU clusters

• OoC-Compressor– make few queries

• Decompression– “streaming”

Page 16: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Streaming

Page 17: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Streaming• physical

– water in a pipe

– drip coffee

• digital– streaming formats

• audio

• video

• triangle meshes

Page 18: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Two Types of Streaming• progressive

• non-progressive

Page 19: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Non-Progressive Streaming• consume immediately

• potentially without end

• keep small buffer

• delete data if no longer needed

small window

Page 20: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Streaming Mesh Formats•

interleave introduce finalizev 1.32 0.12 0.23v 1.43 0.23 0.92v 0.91 0.15 0.62f 1 2 3done 2 v 0.72 0.34 0.35f 4 1 3done 1 v 0.72 1.03 0.35

⋮ ⋮ ⋮ ⋮

vertex # 2finalized

not used bysubsequent

triangles

vertex # 2introduced

not used byprecedingtriangles

active

“Streaming Meshes” [Isenburg and Lindstrom ‘05]

number of active vertices“width”

Page 21: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Outputting Streaming Meshes• isosurface

– 235 million vertices

– 469 million trianglesover

8 Gigabyte

• marching cubes– extract layer by layer

– output elements as extracted

– finalize vertices of previous layer

Richtmeyer-Meshkov instability simulation at LLNL

Page 22: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Streaming Simplification

“Stream Algorithm for … ” [Wu & Kobbelt ‘03]

“Large Mesh Simplification …” [Isenburg et al. ‘03]

Page 23: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Streaming Compression

Page 24: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

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 APIbool compress(FILE* file, int bits,

int num_pos, float* positions, int num_tri, int* indices);

Page 25: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Streaming Compression (2)

• when writing a triangle– look-up active vertices

– determine configuration

– compress triangle+ positions of new vertices

– remove finalized data structures

• when writing a vertex– insert in hash

Page 26: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Possible Configurations

start add

start1

fill

join end

written triangle

active elements

Page 27: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Compressing a Triangle– configuration

add

fill

– specify active vertex• log2(width) bits

• better: use cache

– specify other active vertices• use local edge lists

– position of new vertices• parallelogram prediction

– finalization flags

add

fill

Page 28: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Demo• compress triangles immediately

• use delay buffer

Page 29: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Greedy Local Reordering

Improving connectivity compression by reordering triangles in a delay buffer

0

2

4

6

8

10

12

14

16

18

non

e 25 5010

025

050

0 1

K 5

K

10K

50K

delay buffer size

bpv

lucy

(original)

(spectral)

(geometric)

(breadth)

(depth)

st. matthew

(original)

(spectral)

(geometric)

Page 30: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

out-of-core

compressed 344 MB

pre-process 7 hours

4 hourscompress

main memory 384 MB

disk space 11.2 GB

streaming

---

28 min

---

12 MB

392 MB(coordinates uniformly quantized to 18 bits)

Page 31: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Example Processing Pipeline

Page 32: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

P1P1 P2P2 P3P3

P1P1P2P2

P3P3

P1P1 P2P2 P3P3

• pipelined stream-processing

Pipelined Stream-Processing• conventional processing

P1P1 P2P2 P3P3

– super-linear speedup

– minimal end-to-end I/O delay

– optimal disk caching

Page 33: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Demo Pipeline

256

256

256

regular volume grid

smextract | smclean | smsimp | smcompress

P2P2 P3P3P1P1 P4P4

grid.raw mesh.smc

v 1.32 0.12 0.23v 1.43 0.23 0.92v 0.91 0.15 0.62f 1 2 3done 2 v 0.72 0.34 0.35f 4 1 3done 1 ⋮ ⋮ ⋮ ⋮

Page 34: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Conclusion

Page 35: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Current Schemes do not Scale

9 GB1 MB

Page 36: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Problems of Current Schemes

372 milliontriangles

(4 GB)

186 million vertices(2 GB)

dedicatedout-of-core

data structure(11 GB)

global reordering ofmesh duringcompression

entire mesh as input IO-inefficient for large data

Page 37: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Streaming Approach

bool open(FILE* file, int bits);

bool write_vertex(float* position);bool write_triangle(int* index, bool* finalize);

bool close();

Page 38: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

out-of-core

compressed 344 MB

pre-process 7 hours

4 hourscompress

main memory 384 MB

disk space 11.2 GB

streaming

---

28 min

---

12 MB

392 MB(coordinates uniformly quantized to 18 bits)

Page 39: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Alternate Approaches•

– 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, …

• connectivity

Page 40: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Compressing Volume Meshesstandard streaming

torso

fighter

2.14 bpt 3.88 bptrate

time 7 min

115 MB

8 sec

3 MBmemory

1.81 bpt 3.56 bptrate

time 11 min

140 MB

12 sec

6 MBmemory

Page 41: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Current/Future Work• implement more stream modules

– streaming surface reconstruction

– streaming stripification

– streaming re-meshing

– streaming smoothing

– streaming segmentation

– streaming feature extraction

– streaming …

Page 42: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Acknowledgements• meshes

– Stanford University, Cyberware

• support– NSF grant 0429901

"Collaborative Research: Fundamentalsand Algorithms for Streaming Meshes."

– U.S. DOE / LLNL # W-7405-Eng-48

– Max Planck Institute für Informatik

Page 43: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

Thank You

streaming compression API :http://www.cs.unc.edu/~isenburg/smc

Page 44: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.
Page 45: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

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

Page 46: Streaming Compression of Triangle Meshes Martin Isenburg University of California at Berkeley Jack Snoeyink University of North Carolina at Chapel Hill.

# triceratops.obj## 2832 vertices# 2834 polygons#v 3.661 0.002 -0.738v 3.719 0.347 -0.833v 3.977 0.311 -0.725v 4.077 0.139 -0.654 ⋮ ⋮ ⋮ ⋮ f 2806 2810 2815 2821f 2797 2801 2811 2805f 2789 2793 2802 2796f 2783 2794 2788 ⋮ ⋮ ⋮ ⋮

2832! permutations2832! • 2834! • 4

differentorderings

= 1.6E+18810possible

descriptions

2834

4 rotations 2834

2834! permutations

2806