Geometry Compression - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Geometry Compression

Description:

Geometry Compression. Michael Deering. presented by: Hamish Carr. Geometry Compression ... position (x, y, z) (3 x 4 bytes = 12 bytes) normal (x, y, z) (3 x 4 ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 13
Provided by: IRIS54
Category:

less

Transcript and Presenter's Notes

Title: Geometry Compression


1
Geometry Compression
  • Michael Deering
  • presented by
  • Hamish Carr

2
Geometry Compression
  • Compression of geometric models
  • Models consist of triangles, each with
  • 3 vertices, with
  • position (x, y, z) (3 x 4 bytes 12 bytes)
  • normal (x, y, z) (3 x 4 bytes 12 bytes)
  • colour (R, G, B) (3 x 1 byte 3 bytes)
  • Triangle can take nearly 100 bytes storage!

3
Stages of Compression
  • 1) Reduce of vertices used
  • 2) Quantize position, colour, normal
  • 3) Delta-encode quantized values
  • (adjacent vertices have similar values)
  • 4) Huffman-encode the deltas

4
Lower Bound on Vertices
  • How many vertices are needed per triangle?
  • Eulers Theorem v f - e 2 g
  • Simplifies for triangulations to
  • v 0.5 f
  • Raw triangles v 3 f
  • Triangle Strips v f
  • So each vertex is sent twice on average

5
Reducing Vertices
  • How do we reduce the of vertices sent?
  • Use a (small) local buffer of recent vertices
  • In each strip, push vertices into the buffer if
    we know we will reuse them
  • On a buffer overflow, start a new strip
  • Remember, we pre-process to choose strips
  • Saves 94 of redundant data (bufsize16)

6
Encoding the Strip
  • Use the following codes
  • R Restart (i.e. start a new strip)
  • O Replace oldest vertex in triangle
  • M Replace middle vertex in triangle
  • p Also push vertex into buffer
  • O-n Replace oldest with buffertop - n
  • M-n Replace middle with buffertop - n

7
An example
  • Rp

O
Op
O
O
M
Mp
O
O
Op
M
Mp
Mp
M-3
Op
O-5
O-6
Mp
Op
M-9
O
4
8
5
2
6
4
11
3
10
7
9
1
2
1
3
12
16
13
15
14
5
17
9
8
6
7
8
Secondary Information
  • Vertex normals colours change
  • So three modes exist
  • 1) bundled with vertex (explicit)
  • 2) state-based (implicit)
  • 3) replicate from final vertex

9
Position Compression
  • Position is assumed to be 32-bit floats
  • 16-bit fixed-point is sufficient instead
  • Sequential vertices have similar positions
  • So we delta-encode the x, y, z coordinates
  • Compress deltas with Huffman encoding

10
Colour Compression
  • RGBA is assumed to be 32-bit floats
  • 12 bit (or even 8 bit) fixed-point adequate
  • Again, adjacent vertices are similar
  • Delta-encode, then Huffman encode
  • Compression only at vertices pixels still
    interpolated in full colour depth

11
Normal Compression
  • Normals are also assumed to be 32-bit
  • This allows 2-46 radian precision
  • enough to pick out individual pebbles on Mars!
  • Precision of 0.01 radian sufficient
  • 100,000 possible values (roughly)
  • symmetries reduce this to 2,000 normals
  • so store an 18-bit index to lookup table in ROM

12
Summary
  • Mesh encoding avoids repeated vertices
  • Quantization drops data size by 50
  • Delta Huffman encoding drop size more
  • Compression ratio claimed
  • 6x - 10x
  • Visual quality almost as good as original
Write a Comment
User Comments (0)
About PowerShow.com