Martin Isenburg Triangle Strip Compression University of North Carolina at Chapel Hill
Introduction A new edge-based encoding scheme for mesh connectivity.
Introduction A new edge-based encoding scheme for mesh connectivity. compact mesh representations
Introduction A new edge-based encoding scheme for mesh connectivity. compact mesh representations simple implementation
Introduction A new edge-based encoding scheme for mesh connectivity. compact mesh representations simple implementation fast decoding
Introduction A new edge-based encoding scheme for mesh connectivity. compact mesh representations simple implementation fast decoding
Introduction A new edge-based encoding scheme for mesh connectivity. compact mesh representations simple implementation fast decoding include triangle strip information at little additional costs
A Triangle Mesh
A Stripified Triangle Mesh
Triangle Strips
Technique for efficient rendering of triangle meshes. Reduce data transfer between main memory and render engine. Requires built-in buffer for two (previous) vertices. Supported in today’s graphic boards. Triangle Strips
Rendering with Triangles
Rendering with Triangle Strips
v 0 v 1 v 2 v 3 v 4 v 5 v 6 v 7 v 8 v2v2 v1v1 v3v3 v4v4 v5v5 v6v6 v7v7 v8v8 v0v0 7 triangles 9 vertices Sequential Triangle Strip
Sequential Generalized
v2v2 v1v1 v3v3 v4v4 v5v5 v6v6 v7v7 v8v8 v0v0 v 0 v 1 v 2 v 3 v 2 v 5 v 4 v 7 v 6 v 8 7 triangles 10 vertices Generalized Triangle Strip
v2v2 v1v1 v3v3 v4v4 v5v5 v6v6 v7v7 v8v8 v0v0 v 0 v 1 v 2 v 3 v 2 v 5 v 4 v 7 v 6 v 8 7 triangles 10 vertices Generalized Triangle Strip
v2v2 v1v1 v3v3 v4v4 v5v5 v6v6 v7v7 v8v8 v0v0 v 0 v 1 v 2 v 3 v 2 v 5 v 4 v 7 v 6 v 8 7 triangles 10 vertices Generalized Triangle Strip v2v2 swap
finding good set of triangle strips (e.g. few swaps, restarts) isn’t easy computing optimal solution is NP hard proposed tools with good heuristics: –STRIPE(96, Evans et al.) –SWAPS(97, Speckmann & Snoeyink) –FGTS(99, Xiang et al.) Stripification Algorithms
Storing a Mesh
Where are the vertices located ? mesh geometry Which vertices form a triangle? mesh connectivity Storing a Mesh
list of vertices x 0 y 0 z 0 x 1 y 1 z 1 x 2 y 2 z 2 x 3 y 3 z 3 4x 4 y 4 z x n y n z n Standard Representation
list of vertices list of triangles x 0 y 0 z x 1 y 1 z 1 x 2 y 2 z 2 x 3 y 3 z 3 4x 4 y 4 z x n y n z n Standard Representation
list of vertices list of triangles x 0 y 0 z x 1 y 1 z 1 x 2 y 2 z 2 x 3 y 3 z 3 4x 4 y 4 z x n y n z n Standard Representation
list of vertices list of triangles x 0 y 0 z x 1 y 1 z 1 x 2 y 2 z 2 x 3 y 3 z 3 4x 4 y 4 z x n y n z n Standard Representation
list of vertices list of triangles x 0 y 0 z x 1 y 1 z 1 x 2 y 2 z 2 x 3 y 3 z 3 4x 4 y 4 z x n y n z n Standard Representation
list of vertices list of triangles x 0 y 0 z x 1 y 1 z x 2 y 2 z 2 u 2 v 2 w x 3 y 3 z 3 u 3 v 3 w x 4 y 4 z 4 u 4 v 4 w x n y n z n..... Standard Representation
list of vertices list of triangles x 0 y 0 z x 1 y 1 z x 2 y 2 z 2 u 2 v 2 w x 3 y 3 z 3 u 3 v 3 w x 4 y 4 z 4 u 4 v 4 w x n y n z n..... Connectivity Storage costs: 6 log(n) bpv
Storing a Stripified Mesh
Where are the vertices located ? mesh geometry Which vertices form a triangle? mesh connectivity Storing a Stripified Mesh
Where are the vertices located ? mesh geometry Which vertices form a triangle? mesh connectivity Which triangles form a strip? mesh stripification Storing a Stripified Mesh
Which vertices form a triangle strip? mesh connectivity mesh stripification Storing a Stripified Mesh Where are the vertices located ? mesh geometry
list of vertices x 0 y 0 z 0 x 1 y 1 z 1 x 2 y 2 z 2 x 3 y 3 z 3 4x 4 y 4 z x n y n z n Standard Representation
list of verticeslist of triangle strips x 0 y 0 z x 1 y 1 z x 2 y 2 z x 3 y 3 z 3 4x 4 y 4 z x n y n z n Standard Representation
list of verticeslist of triangle strips x 0 y 0 z x 1 y 1 z x 2 y 2 z x 3 y 3 z 3 4x 4 y 4 z x n y n z n Storage costs: 2~3 log(n) bpv Connectivity and Stripification
Connectivity Compression for Triangle Meshes
Keeler Westbrook [ 95 ] Taubin Rossignac [ 96 ] Tauma Gotsman [ 98 ] Rossignac [ 98 ] DeFloriani et al [ 99 ] Isenburg Snoeyink [ 99 ] Compression Techniques
Keeler Westbrook [ 95 ] Taubin Rossignac [ 96 ] Tauma Gotsman [ 98 ] Rossignac [ 98 ] DeFloriani et al [ 99 ] Isenburg Snoeyink [ 99 ] Short Encodings of Planar Graphs and Maps 4.6 bpv (4.6) Compression Techniques
Keeler Westbrook [ 95 ] Taubin Rossignac [ 96 ] Tauma Gotsman [ 98 ] Rossignac [ 98 ] DeFloriani et al [ 99 ] Isenburg Snoeyink [ 99 ] Topological Surgery 2.4 ~ 7.0 bpv (--) Compression Techniques
Keeler Westbrook [ 95 ] Taubin Rossignac [ 96 ] Tauma Gotsman [ 98 ] Rossignac [ 98 ] DeFloriani et al [ 99 ] Isenburg Snoeyink [ 99 ] Triangle Mesh Compression 0.2 ~ 2.9 bpv (--) Compression Techniques
Keeler Westbrook [ 95 ] Taubin Rossignac [ 96 ] Tauma Gotsman [ 98 ] Rossignac [ 98 ] DeFloriani et al [ 99 ] Isenburg Snoeyink [ 99 ] Edgebreaker 3.2 ~ 4.0 bpv (4.0) Compression Techniques
Keeler Westbrook [ 95 ] Taubin Rossignac [ 96 ] Tauma Gotsman [ 98 ] Rossignac [ 98 ] DeFloriani et al [ 99 ] Isenburg Snoeyink [ 99 ] A Simple and Efficient Encoding for Triangle Meshes 4.2 ~ 5.4 bpv (6.0) Compression Techniques
Keeler Westbrook [ 95 ] Taubin Rossignac [ 96 ] Tauma Gotsman [ 98 ] Rossignac [ 98 ] DeFloriani et al [ 99 ] Isenburg Snoeyink [ 99 ] Mesh Collapse Compression 1.1 ~ 3.4 bpv (--) Compression Techniques
strip-internal edges
bpv strip-internal edges
Triangle Fixer
Encoding scheme Define initial active boundary around arbitrary edge of mesh.
Define initial active gate as one of the two boundary edges. Encoding scheme
Label active gate with T, R, L, S, or E. Encoding scheme
Label active gate with T, R, L, S, or E. Which label ? Depends on its adacency relation with the boundary.
Encoding scheme Label active gate with T, R, L, S, or E. Which label ? Depends on its adacency relation with the boundary. Update active boundary and active gate.
Encoding scheme Label active gate with T, R, L, S, or E. Which label ? Depends on its adacency relation with the boundary. Update active boundary and active gate. Boundary is expanded (T), is shrunk (R and L), is split (S), or is terminated (E).
Label T before Active gate not adjacent to other boundary edge.
Label T beforeafter
Label R before Active gate adjacent to next edge along active boundary.
Label R beforeafter
Label L before Active gate adjacent to previous edge along active boundary.
Label L beforeafter
Label S before Active gate adjacent to some other edge of active boundary.
Label S Active gate adjacent to some other edge of active boundary.
Label S before Active gate adjacent to some other edge of active boundary.
Label S beforeafter
Label E before Active gate adjacent to previous and next edge along active boundary.
Label E beforeafter
Example Run: Encoding
T
T
T
T
T
R
T
T
T
T
R
T
T
T
T
R
T
H 10
R
R
R
R
R
R
R
R
E
Example Run: Decoding
E
R
R
R
R
R
R
R
R
H 10
T
R
T
T
T
T
R
T
T
T
T
R
T
T
T
T
T
Holes and Handles
Simple Mesh
Mesh with Holes
Mesh with Handle
Mesh with Handle and Holes
Encoding a hole use new label H associate integer called size with label H that specifies number of edges/vertices around hole one label H size per hole total number of labels remains equal to number of mesh edges
Label H size before hole Active gate adjacent to hole of size edges/vertices.
Label H size beforeafter hole
Encoding a handle use new label M associate three integers called index, offset 1, and offset 2 with label M that specify current configuration one label M idx,off 1,off 2 per handle total number of labels remains equal to number of mesh edges
Label M idx,off 1,off 2 before offset 1 offset 2 index in stack Active gate adjacent to some edge of boundary in stack.
Label M idx,off 1,off 2 beforeafter offset 1 offset 2 index in stack
Triangle Strip Compression
let triangle strips guide the mesh traversal replace label T with labels T R, T L, T B, and T E traversing along strip means progress for both: –encoding connectivity –encoding stripification
Label T R Triangle strip leaves triangle on the right. before
Label T R beforeafter
Label T L Triangle strip leaves triangle on the left. before
Label T L beforeafter
Label T B Triangle strip leaves triangle on the left and on the right. before
Label T B beforeafter
Label T E (case 1) Triangle strip ends in triangle. AND It’s the last triangle of current strip. It doesn’t follow a label of type T B. before
Label T E (case 1) beforeafter
Label T E (case 2) before Triangle strip ends in triangle. AND Not the last triangle of current strip. It follows a label of type T B.
Label T E (case 2) afterbefore
Example Run: Encoding
TLTL
TRTR
TRTR
TRTR
TETE
TBTB
TLTL
TRTR
TRTR
TLTL
TRTR
TRTR
TETE
TETE
H 10
R
R
R
R
R
S
L
L
E
R
R
E
Example Run: Decoding
T L T R T L T L T E T B T L T R T R T L T R T R T E T E H 10 RRR RRSLLE RRE calculate offset * Offset = 6
E
R
R
E
L
L
S
R
R
R
R
R
H 10
TETE
TE*TE*
TE*TE*
TE*TE*
TE*TE*
TRTR
TRTR
TLTL
TRTR
TRTR
TLTL
TBTB
TETE
TRTR
TRTR
TRTR
TLTL
Compressing the label sequence
map label types to unique bit-codes example: frequent labels are mapped to short bit-codes make mapping dependent on last label (e.g. one label memory) very simple implementation Fixed-Bit Encoding T 0R 01S 0001 L 001E 0011
approaches the entropy of the label sequence adaptive version three label memory due to small number of different symbols, probability tables require less than 4 KB implemented with fast bit operations Arithmetic Encoding
Results
Fandisk
Eight
Bunny
Triceratops
Skull
aac-3 vertices mesh Results triceratops bunny skull eight femur bishop shape fandisk fixed
Video
Many polygon meshes include additional information Surface Normals Texture coordinates Colours Mesh Properties
Mesh properties can be attached to Mesh Properties
Mesh properties can be attached to vertices Mesh Properties
Mesh properties can be attached to vertices faces Mesh Properties
Mesh properties can be attached to vertices faces corners Mesh Properties
Make stripification process difficult. Corner attributes must be consistent for vertices in strip. But... mapping attributes to strip corners is cheaper than mapping to triangle corners. Usually requires 1 bit per corner. Immediate savings of 50 % and more! Corner Attributes
Number of Corners strip vertices mesh triceratops bunny skull eight femur bishop shape fandisk triangles
Compact encodings for stripified triangle meshes. Exploit existing correlation between connectivity and stripification. Edge-based encoding has other useful applications (non-triangular meshes). Summary and Current Work
Bettina Speckmann for fruitful discussions on triangle strips Xinyu Xiang for triangulating some of my test models my supervisor Jack Snoeyink for reviewing the paper Acknowledgements