Title: Advances and challenges in the design of compact representations of meshes and complexes
1Advances and challenges in the design of compact
representations of meshes and complexes
- Jarek Rossignac
- School of Interactive Computing
- Georgia Tech
2CATRAT
- We want Constant Amortized Time (CAT) cost
operators - for Random Access and Traversal (RAT) of the mesh
- Access vertices and faces using (nearly)
consecutive IDs - For (int v 0 vltV v) processVertex(v)
- For (int f 0 fltF f) processFace(f)
- Given vertex, v, obtain an incident face, f(v)
- Given face, f, obtain a bounding vertex, v(f)
- Given tuple (f,v) of a face f and a bounding
vertex v, obtain - Next tuple (swing clockwise) around v
- Next tuple (walk cw) around f
- Want the time cost of each operator
- to be constant (on average) and small
-
3Example of an edge-based scheme
- For each face f, store a reference to one of its
bounding edges - For each vertex v, store a reference to one
incident edge - For each edge e, store references to
- Its 2 bounding vertices
- Its 2 incident faces
- Its 2 following edges along each face
- Cost F V 6E references (32-bit integers)
- In a planar triangulation
- F 2V 4
- E 3V
- Cost 2V V 18 V 21V 672 bpv (bits per
vertex) - Zipper reduces this cost to 12 bpv
-
4Prior art Mesh connectivity storage cost
r V r 32 bits per vertex
T
T
ESQ (editable SQuad) Castelli, Devillers,
Rossignac12 SIBGRAPI 4V
b bpv b bits per vertex
5Corner-based operators
- Access
- v(f) an arbitrary vertex bounding given face f
(f 0,1,2F-1) - f(v) an arbitrary face incident upon given
vertex (v 0,1,2V-1) - Traversal
- n(f,v) next vertex after v (walking cw) around
face f - s(f,v) next face after f (swinging cw) around
vertex v - SIMPLIFIED NOTATION
- Corner c(f,v) as place marker for RAT
- n(f,v) is now written c.n
- s(f,v) is now written c.s
- Bijections between corners and
- half-edges, edge-uses, oriented-edges, darts
6Corners operators for triangle meshes
- Assign consecutive integer IDs to the 3 corners
of each triangle - Core operators
- c.v the vertex of corner c
- c.t the triangle of corner c
- v.c an arbitrary corner of vertex v
- t.c an arbitrary corner of triangle t
- c.n next corner around c.t
- c.o opposite (in adjacent triangle)
- Derived operators
- c.s c.n.o.n swing around c.v
- c.p c.n.n (previous in c.t)
- c.l c.n.o (left)
- c.r c.p.o (right)
- c.u c.r.p (unswing around c.v)
7Extended Corner Table (ECT) 13V
- Based on previously proposed Corner Table (CT)
- Edgebreaker on a Corner Table A simple
technique for representing and compressing
triangulated surfaces, - J. Rossignac, A. Safonova, A. Szymczak.
- Book chapter in
- Hierarchical and Geometrical Methods in
Scientific Visualization, - Farin, G., Hagen, H. and Hamann, B., eds.
- Springer-Verlag, Heidelberg, Germany. Pages
41-50, January 2003. - ECT stores back pointer Cv from vertex to one
incident corner
8Extended Corner Table (ECT)
- Geometry short int XV, YV, ZV
- 16-bit coordinates relative to AABB
- Yields 1/32 mm accuracy over a 2 m aircraft
engine - Connectivity int CV, V3T, O3T
- v.c Cv, c.v Vc, c.o Oc
- stored in look-up tables
- c.t c/3, t.c 3t
- Since corners of t have consecutive IDs
- c.n c.t.c (c1)3
- Since corners of t are sorted (orientation)
- Storage cost (14.5V 464 bpv)
- Geometry 30.5 1.5V
- Connectivity ECT 6TV 13.0V (90 of total
storage) - For simplicity, assume low-genus, manifold mesh
T 2V
9SCT Corner Table for Simplicial Complexes
- SCT Simplicial Corner Table, J. Rossignac X.
Zhu, in preparation. - Same data structure as ECT
- Extends topology to support
- Non-manifold edges
- Non-manifold vertices
- Wires (dangling edges)
- 6 corners per triangle
- 3 on each side
- Side-preserving crawl (spider)
- c.s and c.o do not cross surface
- New operator
- To cross surface
10CT extended to tetrahedra
- TetStreamer Compressed Back-to-Front
Transmission of Delaunay Tetrahedra Meshes, U.
Bischoff and J. Rossignac, Proceedings of the
Data Compression Conference, IEEE Computer
Society, 2005. . - Same data structure as CT
- V and O
- 4 corners per tet
- Use wedge as place marker for RAT
- Wedge operators (mimic corner ones)
- Swing around edge
- Next wedge in tet from vertex
- Cross wedge
- Use test to compute twist
- Between face-adjacent tets
11SOT (Sorted O Table) for triangle meshes 6V
- SOT Compact Representation for Triangle and
Tetrahedral Meshes, - T. Gurung and J. Rossignac,
- Georgia Institute of Technology,
- SIC Technical Report GT-IC-10-01, 2010
- Start with ECT C, V, O tables
- Match each v with unique t
- Sort triangles so that matched t has same ID as
its matching vertex - Discard C V tables (no longer needed)!
- To compute c.v, swing (cc.s) until c lt 3V
12Linear cost construction of SOT
- Start with V O tables
- Traversal matches each vertex with unique
triangle
13Extending SOT to tetrahedron meshes 4T
- SOT Compact representation for Tetrahedral
Meshes, - T. Gurung and J. Rossignac.
- ACM Symposium on Solid and Physical Modeling
(SPM), 79-88. 2009. - 4 references per tet
- Trivial combination of the extension of CT to tet
meshes and of the SOT idea
14SOT Construction
- Start with V O tables (for tet meshes)
- Depth-first traversal to match each vertex with
unique tet - Renumber tets so that matched tet has same ID as
its vertex - Discard the V table
- To compute the ID of vertex v from a corner c, we
may need to visit all tets incident on v - Same as visiting all triangles on a sphere
(boundary of star(v))
15SQuad (sorted quads) 4V
- SQuad Compact Representation for Triangle
Meshes, - T. Gurung, D. Laney (LLNL), P. Lindstrom (LLNL),
and J. Rossignac. Eurographics 2011. - Published as a journal paper in the
- Computer Graphics Forum Journal (CGF) 30(2)
355-364. - Match most v with two adjacent ts (quad),
- sort quads, store only 4 (external) c.s swings
per quad - (the internal ones are implicit)
16SQuad construction and representation
- Starts with depth-first traversal (as for SOT)
- But try to pair each matched triangle with an
unmatched adjacent neighbor that is also incident
on the matching vertex (only 2 candidates, try
right first) - Store only 4 outer swings per quad
- Single triangle groups stored using same
structure - Unmatched triangles stored at the end of the
table - Do not store V instead swing as in SOT
97 triangles are paired
17SQuad preserves memory coherence
- Squad preserves vertex order
- So it mostly preserves memory coherence
- Except for unmatched triangles (which are stored
at the end)
18ESQ Editable SQuad
- ESQ Editable SQuad representation for triangle
meshes, - L. Castelli Aleardi, O. Devillers, J. Rossignac.
- IEEE sponsored Conference on Graphics, Patterns
and Images (SIBGRAPI), - August 22, 2012, Brazil.
- Extend the different types of groups V, VT, VTT,
T, VVT? - Use a separate array for each type (fixe size)
- Support constant time local edits
- Valence-3 Vertex deletion
- Edge flip
- Triangle split
- Reform groups locally
- Many configurations
- Update arrays (no holes)
19LR 2V
- LR Compact connectivity representation for
triangle meshes, - Topraj Gurung, Peter Lindstrom, Mark Luffel,
Jarek Rossignac. - ACM SIGGRAPH 2011.
- Published as a journal paper in the ACM
Transactions on Graphics (TOG), 30(4) 67, August
2011. - Arrange quad diagonals along quasi-Hamiltonian
cycle (ring), store v.L / v.R, exceptions
20Ring Expander (LR ring construction)
0.005 of vertices are not in the ring
Compute a nearly-Hamiltonian cycle in a mesh
21Triangle types (relative to ring)
- Subscripts number of ring edges
- T0 have no ring edges (splits)
- T1 have one ring edge (most common)
- T2 have two ring edge (dead-ends)
- Superscripts warts exceptions
- Wart adjacent (T0w,T2w) pair
- Non-wart T0s and their T1i neighbors
- are exceptions
Triangles in warts 2.35 Non-wart T0 1.05
22Numbering elements and storing data in LR
- Vertices numbered along ring
- v.P previous ring vertex (implicit)
- v.N next ring vertex (implicit)
- v.L left neighbor (stored as Lv in L array)
- v.R right neighbor (stored in R array)
- Triangles
- Match v with 2 triangles sharing edge (v , v.N)
- Implicitly numbered 2v and 2v1
- Corners Numbered around quad v.i 8vi
- Skip .3 to avoid cost of division by 3
2v1
2v
23Computing c.o
A few cases. Here are two examples
Case 2 test v.L.P.L v.N
Case 1 test v.L v.N.L
24Wart skipping (LR)
- Each T2w is associated with two ring edges (has 2
slots) - (v.P,v) and (v,v.N)
- LR stores T0w in the first slot
- u tip vertex of matching T0w
- Lv.Pu and Lvv.P
- Saves 15 refs per wart
- 20 storage cost reduction, resulting in cost
1.08T
25BELR 52 bpv
- Relative indexing
- Stores delta (v.L v)V instead of v.L
- Can often be represented using 16 bits
- Uses a ring-expander that makes shorter corridors
- Compromise between corridor length and (T0 count)
Depth first
Breadth first
Optimized
26Zipper 12 bpv
- Zipper A compact connectivity data structure
for triangle meshes, - T. Gurung, M. Luffel, P. Lindstrom, and J.
Rossignac. - ACM Symposium on Solid and Physical Modeling,
October 2012. - Journal of Computer-Aided Design. 45(2) 262-269
(2013). - Store most v.L and v.R as 2-bit deltas (gaps)
- Use only 6 refs per T0 exception
- An improved ring construction leading to fewer
exceptions
Stores connectivity using only 6 bits per
triangle 57 better than Surface-Mesh
Sieger11 35 better than Directed-Edge
Campagna98 4.4 better than BELR GLLR
SIGGRAPH11 Linear time cost construction
Local connectivity changes non constant
cost Constant time access and traversal
operators 2-3 faster than BELR, 3
slower than LR 15 slower in app than
Surface-Mesh Sieger11
272-bit deltas
- Zipper stores a 3-bit code per ring triangle
- 2-bit delta v.?L v.P.Lv.L (when it is 0, 1, 2,
or 3) - All deltas are 0, except at T0s
- If v has valence 6, then 0 ?L 3
- Stats v.?L 0 (29), 1 (44), 2 (19), 3 (4)
- 1-bit wart marker
- Code 111 identifies an exception v.L stored
explicitly - (The rare warts with delta3 are treated as
exceptions.)
28Decoding v.L and v.R quickly (Zipper)
- To compute v.L without summing all preceding
deltas - Force an exception every 32-vertex block
- Distribute 3-bit (deltawart) codes into three
32-bit words (hi,mid,lo) - Use bitwise AND to compute mask identifying
exceptions (111) - Use a population count (POPCNT ) instruction to
count set bits (number of exceptions) and
identify index of preceding exception - Compute sum of deltas from it to v using POPCNT
- Using POPCNT instead of loop improves speed 10x
29Computing opposites in T1 and T2 (Zipper)
- From T1 to T1 (trivial when delta is 0 or 1)
- From T0 to a T1 or T2
- With each T0 , we store 3 vertex refs (c.v, u, v)
- We use v.L/v.R v.P to infer c.o in constant
time
30Computing opposites in T0 (Zipper)
- We store T0s in a 4-ary cuckoo hash
Fotakis03) - With each T0 we store only 6 references
- 3 IDs of opposite corner (hash values)
- Can discard hash if c.o not required by
application - 3 vertex refs (c.v, u, v)
- To get from a corner c in a T1 to c.o in a T0
- Use c as hash key, which returns 4 candidates for
c.o - For the correct c.o, c.o.t is incident upon c.p.v
and c.n.v
31Ring Bender (Zipper)
- Reduce the number of T0 triangles by 2.3x
- Every T0 is connected to a T2 by a corridor of
T1s - Rearrange ring to remove T1s in T0T1T1T2
corridors - to make (T0,T2 ) adjacent (wart)
- Increases warts from 2.35 to 3.2
- Reduces number of exceptions
- Saves about 1 bpt
32Storage and speed results (Zipper)
- Storage median 5.98 bpt
- Worst case models Buddha (13.37 bpt) and Thai
(7.97 bpt) - Average (excluding Buddha Thai) 5.89 bpt
- Fixed storage cost 5 bpt (5 words for 32
triangles block) - 3 words for codes, a reference into an exception
table, and a reference for the forced exception. - Variable cost increase exception count by 3
adds 1 bpt - Performance of c.v and c.o when mesh fits in
memory - Zipper ops are 2-3x faster than BELR,
- Zipper ops are 1.8-3.6x slower than LR
- In applications (graph distance)
- 15 slower than Surface Mesh Sieger11
Representation Time
Surface Mesh 1.00
CT 0.85
LR 0.83
Zipper 1.18
33Summary future challenges
- Summary for Zipper
- Stores connectivity using only 6T bits
- 35x better than Directed-Edge Campagna98
- 4.4x better than BELR GLLR SIGGRAPH11
- Linear time cost construction
- No constant cost connectivity changes
- Constant time access and traversal operators
- 2x-3x faster than BELR, 3x slower than LR,
- In app (distance) 15 slower than Surface Mesh
Sieger11 - Interesting (or impossible?) challenges
- Zipper-64 5 bpt?
- Application to general polygon mesh connectivity
5 bpv? - Support non-manifold complexes?
- Support streaming?
- Support connectivity changes?
- Apply to tetrahedron meshes?
34Zipper extended to polygon Y-meshes 6 bpv
- General position polygon mesh
- Assume manifold
- No 4 planes intersect
- Each vertex has valence 3
- Use Zipper to represent its dual graph
- 12 bits per primal face
- Primal mesh has twice as many vertices as faces
- For more general polygon meshes
- Must split vertices
- Dual of triangulating polygonal faces
35Recap
- Extend ECT to support simplicial complexes
- SOT 6V
- Match (VT groups), renumber matched triangles,
store O - Extend SOT to tetrahedron meshes
- SQuad 4V
- Match (VTT groups) renumber matched triangles,
store 2 swings per tri - ESQ Modify SQuad to support local edit at
constant cost - LR 2V (BELR 1.6V)
- Build quasi-Hamiltonian ring, store v.L , v.R,
exceptions (T0 and neighbors) - BELR store deltas (v.L - v / v.R v), optimize
ring deltas fit in 16 bits - Zipper 0.19 V
- Store gaps (v.L v.P.L / v.R v.P.R), encode
most of them with 2 bits, improve ring and reduce
number and cost of exceptions - Apply Zipper to Y-meshes (valence-3 polygon
meshes)