Lossless Compression of Floating-Point Geometry

45
Lossless Compression of Floating-Point Geometry Martin Isenburg UNC Chapel Hill Peter Lindstrom LLNL Livermore Jack Snoeyink UNC Chapel Hill

description

Lossless Compression of Floating-Point Geometry. Martin Isenburg UNC Chapel Hill. Peter Lindstrom LLNL Livermore. Jack Snoeyink UNC Chapel Hill. Overview. Motivation Geometry Compression Predictive Schemes Corrections in Floating-Point Results Conclusion. connectivity. - PowerPoint PPT Presentation

Transcript of Lossless Compression of Floating-Point Geometry

Page 1: Lossless Compression of Floating-Point Geometry

Lossless Compressionof

Floating-Point Geometry

Martin IsenburgUNC

Chapel Hill

Peter LindstromLLNL

Livermore

Jack SnoeyinkUNC

Chapel Hill

Page 2: Lossless Compression of Floating-Point Geometry

Overview

• Motivation

• Geometry Compression

• Predictive Schemes

• Corrections in Floating-Point

• Results

• Conclusion

Page 3: Lossless Compression of Floating-Point Geometry

127 MB

12,748,510 triangles11,070,509 vertices

Meshes and Compression

• connectivityface1 1 2 3 face2 2 1 4face3 3 2 5

facem

3m * 32 bits

3n * 32 bits

146 MB

UNCpower-plant

3 MB

25 MB 20uniform quantization

vertex1 ( x, y, z )vertex2 ( x, y, z )vertex3 ( x, y, z )

vertexn

• geometry

Page 4: Lossless Compression of Floating-Point Geometry

Floating-Point Numbers

• have varying precision

• largest exponent least precise

- 4.095 190.974

0 1286432

x - axis

1684

23 bits ofprecision

23 bits ofprecision

23 bits ofprecision

Page 5: Lossless Compression of Floating-Point Geometry

Samples per Millimeter16 bit 18 bit 20 bit 22 bit 24 bit

97 388 15532.7 m

327 1311 20 cm

5 22 86195 m

Page 6: Lossless Compression of Floating-Point Geometry

No quantizing possible …

• stubborn scientists / engineers – “Do not touch my data !!!”

• data has varying precision– specifically aligned with origin

• not enough a-priori information– no bounding box

– unknown precision

– streaming data source

Page 7: Lossless Compression of Floating-Point Geometry

• Geometry Compression [Deering, 95]– Fast Rendering

– Progressive Transmission

– Maximum Compression

Geometry Compression [Deering, 95]

Mesh Compression

Maximum Compression

Page 8: Lossless Compression of Floating-Point Geometry

• Geometry Compression [Deering, 95]– Fast Rendering

– Progressive Transmission

– Maximum Compression

• Connectivity

• Geometry

Geometry Compression [Deering, 95]

Mesh Compression

Maximum Compression

Geometry

Page 9: Lossless Compression of Floating-Point Geometry

• Geometry Compression [Deering, 95]– Fast Rendering

– Progressive Transmission

– Maximum Compression

• Connectivity

• Geometry

– lossy

– lossless

Geometry Compression [Deering, 95]

Mesh Compression

lossless

Maximum Compression

Geometry

Page 10: Lossless Compression of Floating-Point Geometry

Overview

• Motivation

• Geometry Compression

• Predictive Schemes

• Corrections in Floating-Point

• Results

• Conclusion

Page 11: Lossless Compression of Floating-Point Geometry

Geometry Compression

• Classic approaches [95 – 98]:– linear prediction

Geometry Compression[Deering, 95]

Geometric Compression through topological surgery [Taubin & Rossignac, 98]

Triangle Mesh Compression[Touma & Gotsman, 98]

Java3D

MPEG - 4

Virtue3D

Page 12: Lossless Compression of Floating-Point Geometry

Geometry Compression

• Classic approaches [95 – 98]:– linear prediction

• Recent approaches [00 – 03]:– spectral

– re-meshing

– space-dividing

– vector-quantization

– angle-based

– delta coordinates

Page 13: Lossless Compression of Floating-Point Geometry

Geometry Compression

• Classic approaches [95 – 98]:– linear prediction

• Recent approaches [00 – 03]:– spectral

– re-meshing

– space-dividing

– vector-quantization

– angle-based

– delta coordinates

Spectral Compressionof Mesh Geometry

[Karni & Gotsman, 00]

expensive numericalcomputations

Page 14: Lossless Compression of Floating-Point Geometry

Geometry Compression

• Classic approaches [95 – 98]:– linear prediction

• Recent approaches [00 – 03]:– spectral

– re-meshing

– space-dividing

– vector-quantization

– angle-based

– delta coordinates

Progressive GeometryCompression

[Khodakovsky et al., 00]

modifies mesh priorto compression

Page 15: Lossless Compression of Floating-Point Geometry

Geometry Compression

• Classic approaches [95 – 98]:– linear prediction

• Recent approaches [00 – 03]:– spectral

– re-meshing

– space-dividing

– vector-quantization

– angle-based

– delta coordinates

Geometric Compressionfor interactive transmission

[Devillers & Gandoin, 00]

poly-soups; complexgeometric algorithms

Page 16: Lossless Compression of Floating-Point Geometry

Geometry Compression

• Classic approaches [95 – 98]:– linear prediction

• Recent approaches [00 – 03]:– spectral

– re-meshing

– space-dividing

– vector-quantization

– angle-based

– delta coordinates

Vertex data compressionfor triangle meshes

[Lee & Ko, 00]

local coord-system +vector-quantization

Page 17: Lossless Compression of Floating-Point Geometry

Geometry Compression

• Classic approaches [95 – 98]:– linear prediction

• Recent approaches [00 – 03]:– spectral

– re-meshing

– space-dividing

– vector-quantization

– angle-based

– delta coordinates

Angle-Analyzer: A triangle-quad mesh codec

[Lee, Alliez & Desbrun, 02]

dihedral + internal =heavy trigonometry

Page 18: Lossless Compression of Floating-Point Geometry

Geometry Compression

• Classic approaches [95 – 98]:– linear prediction

• Recent approaches [00 – 03]:– spectral

– re-meshing

– space-dividing

– vector-quantization

– angle-based

– delta coordinates

High-Pass Quantization forMesh Encoding

[Sorkine et al., 03]

basis transformationwith Laplacian matrix

Page 19: Lossless Compression of Floating-Point Geometry

Overview

• Motivation

• Geometry Compression

• Predictive Schemes

• Corrections in Floating-Point

• Results

• Conclusion

Page 20: Lossless Compression of Floating-Point Geometry

Predictive Coding

1. quantize positions with b bits

2. predict from neighbors

3. compute difference

4. compress with entropy coder

(1.314, -0.204, 0.704) (1008, 68, 718)floating point integer

Page 21: Lossless Compression of Floating-Point Geometry

Predictive Coding

1. quantize positions with b bits

2. predict from neighbors

3. compute difference

4. compress with entropy coder

prediction rule(1004, 71, 723)

prediction

(1.276, -0.182, 0.734)predictionprediction rule

Page 22: Lossless Compression of Floating-Point Geometry

Predictive Coding

1. quantize positions with b bits

2. predict from neighbors

3. compute difference

4. compress with entropy coder

(1004, 71, 723)(1008, 68, 718)position

(4, -3, -5)correctorprediction

(1.314, -0.204, 0.704)position

(1.276, -0.182, 0.734)prediction

?

Page 23: Lossless Compression of Floating-Point Geometry

Predictive Coding

1. quantize positions with b bits

2. predict from neighbors

3. compute difference

4. compress with entropy coder

0

10

20

30

40

50

60

70

position distribution

0

500

1000

1500

2000

2500

3000

3500

corrector distribution

Page 24: Lossless Compression of Floating-Point Geometry

Arithmetic Entropy Coder

for a symbol sequence of t types

# of type tpi =

i = 1

t

Entropy = pi • log2( ) bitspi

1

# total

2.0 bits1.3 bits0.2 bits

Page 25: Lossless Compression of Floating-Point Geometry

Deering, 95

Prediction: Delta-Coding

A

processed regionunprocessed region

P

P = A

Page 26: Lossless Compression of Floating-Point Geometry

Taubin & Rossignac, 98

Prediction: Spanning Tree

A

BC D

E

processed regionunprocessed region

P

P = αA + βB + γC + δD + εE + …

Page 27: Lossless Compression of Floating-Point Geometry

Touma & Gotsman, 98

Prediction: Parallelogram Rule

processed regionunprocessed region

P

P = A – B + C

A

BC

Page 28: Lossless Compression of Floating-Point Geometry

Talk Overview

• Motivation

• Geometry Compression

• Predictive Schemes

• Corrections in Floating-Point

• Results

• Conclusion

Page 29: Lossless Compression of Floating-Point Geometry

Corrective Vectors ?

(1008, 68, 718)position

(1004, 71, 723)prediction

(4, -3, -5)correctorcompute difference vector

with integer arithmetic

(1.314, -0.204, 0.704)position

(1.276, -0.182, 0.734)prediction

(0.038, -0.022, -0.030)correctorcompute difference

vector withfloating-point arithmetic ?

Page 30: Lossless Compression of Floating-Point Geometry

32-bit IEEE Floating-Point

0

- 1-½

- 2.0- 4.0- 8.0-16.0

½1

2.04.0 8.0 16.0

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X

1 bit sign 8 bit exponent 23 bit mantissa

1 82 …1 81 …

1 80 …

1 7E …

1 7D … 0 7D …

0 7E …

0 80 …

0 81 …0 82 …

1 7a 75c28f-0.06

position

1 82 4ccccd-12.8

prediction

corrector

0 82 4bd70812.74

corrector

Page 31: Lossless Compression of Floating-Point Geometry

01999a

32-bit IEEE Floating-Point

0

- 1-½

- 2.0- 4.0- 8.0-16.0

½1

2.04.0 8.0 16.0

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X

1 bit sign 8 bit exponent 23 bit mantissa

1 82 …1 81 …

1 80 …

1 7E …

1 7D … 0 7D …

0 7E …

0 80 …

0 81 …0 82 …

821 75c2847a1 49999a820

1 82 01999a-8.1

1 81 7ccccd-7.9

position prediction

-0.2

1 7a 75c284-0.06

0 7c 0f5c290.14

position prediction

-0.2

0 82 49999a12.6

0 82 4ccccd12.8

position prediction

-0.2

Page 32: Lossless Compression of Floating-Point Geometry

Floating-Point Corrections (1)

0 82 49999a12.6

position

0 82 4ccccd12.8

prediction

0 82 49999a 0 82 4ccccd

0 0 0

49999a 4ccccd -033333use context 82

use context 8282

compress

Page 33: Lossless Compression of Floating-Point Geometry

Floating-Point Corrections (2)

1 82 01999a-8.1

position

1 81 7ccccd-7.9

prediction

1 82 01999a 1 81 7ccccd

1 1 0

01999a 0 01999ause context 82

use context 8182

compress

Page 34: Lossless Compression of Floating-Point Geometry

Floating-Point Corrections (3)

1 7a 75c284-0.06

position

0 7c 0f5c290.14

prediction

1 7a 75c284 0 7c 0f5c29

1 0 1

75c284 0 75c284use context 7a

use context 7c7a

compress

Page 35: Lossless Compression of Floating-Point Geometry

Talk Overview

• Motivation

• Geometry Compression

• Predictive Schemes

• Corrections in Floating-Point

• Results

• Conclusion

Page 36: Lossless Compression of Floating-Point Geometry

gzip -9buddha

david

power plantlucy

55.856.123.778.7

Results [bpv]

rawmodel

96.0 96.0 96.0 96.0

ours

49.934.729.144.4

0.90

0.62

1.21

0.56

ratio

Page 37: Lossless Compression of Floating-Point Geometry

Percentage of Unique Floats

buddha david lucypowerplant

xy

zx

yz

x

y

z

x y z

49.0

%

82.4

%

77.2

%

40.2

% 28.9

%

42.0

%

53.4

%

37.6

%

22.2

%

4.4

%

1.5

%

2.0

%

228,402different

z-coordinates

543,652 vertices

226,235different

z-coordinates

11,070,509 vertices

Page 38: Lossless Compression of Floating-Point Geometry

Completing, not competing !!!

buddha

david

power plantlucy

model 16 bit

bit-rate [bpv]

buddha

david

power plantlucy

54393144

45262430

61473454

52363046

compression ratio [%]

20 bit

32.223.218.526.5

21.8 12.5 11.6 14.6

24 bit

44.034.124.239.1

lossless

49.934.729.144.4

Page 39: Lossless Compression of Floating-Point Geometry

Simpler Scheme (Non-Predictive)

A X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X

buddha

david

power plantlucy

A ours

76.553.961.768.1

78.958.467.369.5

76.4 52.356.468.6

49.934.729.144.4

B Cmodel

32 symbols, each ranging from 0 to 1

B X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X XX X

8 symbols, each ranging from 0 to 15

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X XX XC4 symbols, each ranging from 0 to 63

Page 40: Lossless Compression of Floating-Point Geometry

Simpler Scheme (Predictive)

A

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X XX

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X XX

X

XC

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X

BX X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X XX X

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X XX X

buddha

david

power plantlucy

55.638.238.5

45.4

59.444.044.948.8

53.136.133.644.8

49.934.729.144.4

A oursB Cmodel

Page 41: Lossless Compression of Floating-Point Geometry

Talk Overview

• Motivation

• Geometry Compression

• Predictive Schemes

• Corrections in Floating-Point

• Results

• Conclusion

Page 42: Lossless Compression of Floating-Point Geometry

Summary

• efficient predictive compression of floating-point in a lossless manner

• completing, not competing

– predict in floating-point

– break predicted and actual float into several components

– compress differences separately

– use exponent to switch contexts

Page 43: Lossless Compression of Floating-Point Geometry

Current / Future Work

• investigate trade-offs– compression versus throughput

• improve scheme for “sparse” data• quantize without bounding box

– guarantee precision

– learn bounding box

• optimize implementation– run faster / use less memory

Page 44: Lossless Compression of Floating-Point Geometry

Acknowledgments

funding:• LLNL

• DOE contract No. W-7405-Eng-48

models:• Digital Michelangelo Project

• UNC Walkthru Group

• Newport News Shipbuilding

Page 45: Lossless Compression of Floating-Point Geometry

Thank You!

ขอบคุ�ณมาก,คุรั�บ!