Geometry Compression Michael Deering, Sun Microsystems SIGGRAPH (1995) Presented by: Michael Chung

Preview:

Citation preview

Geometry Compression

Michael Deering, Sun MicrosystemsSIGGRAPH (1995)

Presented by: Michael Chung

Geometry CompressionWhat is it?

• Lossy technique for reducing the size of geometry representation.

Motivation

• Save bandwidth and transmission time in graphics accelerators and networks.

• Save storage space in main memory and on disk.

Proposed Contributions

• Technique for lossy compression ratios of between 6 and 10 to 1

– Claims only slight losses in object quality

– Depends on original representation format and final quality level desired

Geometry CompressionWhat is it?

• Trade-off between quality (subjective) and amount of compression.

• Compression steps can be reversed for decompression

Geometry CompressionWhat is it?

• Goal: represent geometry with geometry compression instructions

Insights

• Reduce size of geometry representation in several ways.

– Reuse vertices in triangle strip via reference

– Bit shaving

– Geometry is local, encode deltas

– Normals as indices

Compression Steps

1. Convert triangle data to generalized triangle mesh

2. Quantization of positions, colors, normals

3. Delta encoding of quantized values

4. Huffman tag-based variable-length encoding of deltas

5. Output binary output stream with Huffman table initializations and geometry compression instructions

Compression Steps

1. Convert triangle data to generalized triangle mesh

2. Quantization of positions, colors, normals

3. Delta encoding of quantized values

4. Huffman tag-based variable-length encoding of deltas

5. Output binary output stream with Huffman table initializations and geometry compression instructions

Step 1: Conversion to Generalized Triangle Mesh

generalized triangle strip generalized triangle mesh

• Generalized triangle strip– Specifies vertices with four vertex replacement

codes (2 bits):• Replace oldest• Replace middle• Restart clockwise• Restart counterclockwise

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle strip (example)

Geometry Compression Instruction Set

Geometry Compression Instruction Set

Geometry Compression Instruction Set

Step 1: Conversion to Generalized Triangle Mesh

generalized triangle strip generalized triangle mesh

• Generalized triangle mesh– Generalized triangle strip– Mesh buffer

• 16 slot queue• 4 bit index

• Explicitly push vertices onto mesh buffer for reuse.– We save because only 4 bits are required to

reference old vertex.

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

• Generalized triangle mesh (example)

Step 1: Conversion to Generalized Triangle Mesh

Step 1: Conversion to Generalized Triangle Mesh

Geometry Compression Instruction Set

Compression Steps

1. Convert triangle data to generalized triangle mesh

2. Quantization of positions, colors, normals

3. Delta encoding of quantized values

4. Huffman tag-based variable-length encoding of deltas

5. Output binary output stream with Huffman table initializations and geometry compression instructions

Step 2: Quantization

Step 2: Quantization

Step 2: Quantization

• Some parts of the geometry may require more or less precision than others.

Step 2: Quantization

• Some parts of the geometry may require more or less precision than others.

• So, the amount of quantization we perform per position, normal, and color is variable.

Step 2: Quantization

• Position

– 32-bit floating-point coordinates are wasteful.

• 8-bit exponent allows an unnecessary range of values.

• 24-bit fixed-point mantissa offers unnecessary precision.

Step 2: Quantization

• Position

– Based on empirical visual tests, allow at most 16 bits per component (X, Y, Z)

Step 2: Quantization

• Color

– Linear reflectivity values R, G, B, (optional) A• Range from 0.0 to 1.0 per component• cap state bit sets alpha ON and OFF

– At most 12 unsigned fraction bits per component

Geometry Compression Instruction Set

Step 2: Quantization

• Normal– 96 bits can represent up to 296 different normals

• We don’t need so many

– Angular density of 0.01 radians between normals visually indistinguishable

• This is about 100,000 normals distributed over a unit sphere• 48 bits to represent a normal (16 bits per X, Y, Z)

– We can do better than 48 bits per normal• Use clever indexing to represent ~100,000 normals with 18

bits…

Step 2: Quantization

• Normal– 96 bits can represent up to 296 different normals

• We don’t need so many

– Angular density of 0.01 radians between normals visually indistinguishable

• This is about 100,000 normals distributed over a unit sphere• 48 bits to represent a normal (16 bits per X, Y, Z)

– We can do better than 48 bits per normal• Use clever indexing to represent ~100,000 normals with 18

bits…

Step 2: Quantization

• Normal– 96 bits can represent up to 296 different normals

• We don’t need so many

– Angular density of 0.01 radians between normals visually indistinguishable

• This is about 100,000 normals distributed over a unit sphere• 48 bits to represent a normal (16 bits per X, Y, Z)

– We can do better than 48 bits per normal• Use clever indexing to represent ~100,000 normals with 18

bits…

Step 2: Quantization• Normal

– Take advantage of symmetry• About 100,000 unit normals distributed across unit

sphere• Split unit sphere into 48 symmetrical parts

Step 2: Quantization

– 3 bits to specify octant– 3 bits to specify sextant within octant– All normals in sextant (~2000) stored in a table

• Two orthogonal angular addresses index into table• At most 6 bits per angular index

– Grand total: 6 – 18 bit index per normal

Step 2: Quantization

– 3 bits to specify octant– 3 bits to specify sextant within octant– All normals in sextant (~2000) stored in a table

• Two orthogonal angular addresses index into table• At most 6 bits per angular index

– Grand total: 6 – 18 bit index per normal

Step 2: Quantization

– 3 bits to specify octant– 3 bits to specify sextant within octant– All normals in sextant (~2000) stored in a table

• Two orthogonal angular addresses index into table• At most 6 bits per angular index

– Grand total: 6 – 18 bit index per normal

Step 2: Quantization

– What about the 26 normals at the shared corners of each sextant?

• These normals belong to more than one sextant, but should be represented only once

– 3-bit indices 110 and 111 have not been assigned to a sextant

• Use one of these indices to represent the unique collection of these 26 normals

Step 2: Quantization

– What about the 26 normals at the shared corners of each sextant?

• These normals belong to more than one sextant, but should be represented only once

– 3-bit indices 110 and 111 have not been assigned to a sextant

• Use one of these indices to represent the unique collection of these 26 normals

Step 2: Quantization

– Angular indices represent a regular grid of coordinates in angular space

Step 2: Quantization

– Angular indices represent a regular grid of coordinates in angular space

Step 2: Quantization

– Angular indices represent a regular grid of coordinates in angular space

Step 2: Quantization

• Summary– Position: 16 bits or less per component

– Color: 12 bits or less per component

– Normal: 6 – 18 bits total• 6 bits to take advantage of symmetry• 0 – 12 bits to index table of normals per sextant

Compression Steps

1. Convert triangle data to generalized triangle mesh

2. Quantization of positions, colors, normals

3. Delta encoding of quantized values

4. Huffman tag-based variable-length encoding of deltas

5. Output binary output stream with Huffman table initializations and geometry compression instructions

Step 3: Delta Encoding

• Represent components with deltas between neighbors

Step 3: Delta Encoding

Step 3: Delta Encoding

• Represent components with deltas between neighbors

Step 3: Delta Encoding

• Represent components with deltas between neighbors

• Store histogram of delta group bit lengths– One histogram per group type (position, normal, color)

Compression Steps

1. Convert triangle data to generalized triangle mesh

2. Quantization of positions, colors, normals

3. Delta encoding of quantized values

4. Huffman tag-based variable-length encoding of deltas

5. Output binary output stream with Huffman table initializations and geometry compression instructions

Huffman Encoding

• Huffman encoding assigns shorter tags to more frequently encountered data.

Huffman Encoding

• Huffman encoding assigns shorter tags to more frequently encountered data.

Huffman Encoding

• Huffman encoding assigns shorter tags to more frequently encountered data.

Huffman Encoding

• Huffman encoding assigns shorter tags to more frequently encountered data.

Huffman Encoding

• Huffman encoding assigns shorter tags to more frequently encountered data.

Huffman Encoding

• Huffman encoding assigns shorter tags to more frequently encountered data.

Step 4: Huffman Tag-Based Variable-Length Encoding

• Assign a Huffman tag to each delta encoded position, normal, or color.

• The tag encodes the bit length of the associated delta data.

Compression Steps

1. Convert triangle data to generalized triangle mesh

2. Quantization of positions, colors, normals

3. Delta encoding of quantized values

4. Huffman tag-based variable-length encoding of deltas

5. Output binary output stream with Huffman table initializations and geometry compression instructions

Geometry Compression Instruction Set

Geometry Compression Instruction Set

• Binary output

– Series of geometry compression instructions.

– Initialize Huffman table first, then describe geometry.

– Header must be placed in stream before the body of the previous instruction:

• …H1 B0 H2 B1 H3 B2…• This gives hardware time to process header

Compression StepsAny Questions?

1. Convert triangle data to generalized triangle mesh

2. Quantization of positions, colors, normals

3. Delta encoding of quantized values

4. Huffman tag-based variable-length encoding of deltas

5. Output binary output stream with Huffman table initializations and geometry compression instructions

Results

• Software implementation

• Compression speed: ~3000 triangles / second

• Decompression speed: ~10,000 triangles / second

• No information about machine used for evaluation

Results

Results

Results

Response

• The technique is supposed to be lossy.– It would be nice to see example images of this.

• Only one image of an original model is shown.– For the other model examples, there is no original to

compare to.

• Paper claims that compression speed is not important.– Is this true for virtual worlds?

Response

• The technique is supposed to be lossy.– It would be nice to see example images of this.

• Only one image of an original model is shown.– For the other model examples, there is no original to

compare to.

• Paper claims that compression speed is not important.– Is this true for virtual worlds?

Response

• The technique is supposed to be lossy.– It would be nice to see example images of this.

• Only one image of an original model is shown.– For the other model examples, there is no original to

compare to.

• Paper claims that compression speed is not important.– Is this true for virtual worlds?

Response

• The technique is supposed to be lossy.– It would be nice to see example images of this.

• Only one image of an original model is shown.– For the other model examples, there is no original to

compare to.

• Paper claims that compression speed is not important.– Is this true for virtual worlds?

Summary

• First paper on geometry compression

• Lossy compression of 3D geometry– Reuse vertices in triangle strip using mesh buffer– Shave bits via variable levels of quantization– 18-bit indices to reference 48-bit normals– Delta compression saves bits since geometry tends to be

local

• Compressed result is 6 to 10 times fewer bits than original geometry data

Summary

• First paper on geometry compression

• Lossy compression of 3D geometry– Reuse vertices in triangle strip using mesh buffer– Shave bits via variable levels of quantization– 18-bit indices to reference 48-bit normals– Delta compression saves bits since geometry tends to be

local

• Compressed result is 6 to 10 times fewer bits than original geometry data

Summary

• First paper on geometry compression

• Lossy compression of 3D geometry– Reuse vertices in triangle strip using mesh buffer– Shave bits via variable levels of quantization– 18-bit indices to reference 48-bit normals– Delta compression saves bits since geometry tends to be

local

• Compressed result is 6 to 10 times fewer bits than original geometry data

Summary

• First paper on geometry compression

• Lossy compression of 3D geometry– Reuse vertices in triangle strip using mesh buffer– Shave bits via variable levels of quantization– 18-bit indices to reference 48-bit normals– Delta compression saves bits since geometry tends to be

local

• Compressed result is 6 to 10 times fewer bits than original geometry data