PowerPoint Presentation - NSF CARGO: Multi

Download Report

Transcript PowerPoint Presentation - NSF CARGO: Multi

ADVANCES AND CHALLENGES IN THE DESIGN
OF COMPACT REPRESENTATIONS OF
MESHES AND COMPLEXES
Jarek Rossignac
School of Interactive Computing
Georgia Tech
Rossignac
2013
1
/ 22
CATRAT
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; v<V; v++) processVertex(v);
– For (int f = 0; f<F; 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
Rossignac
2013
v v(f,v)
f(f,v)
f
2
/ 22
Example 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
Rossignac
2013
3
/ 22
Prior art: Mesh connectivity storage cost
Theoretical limit [Tutte’62]. Achievable in theory:
Reps [Aleardi, Devillers, Schaefffer’06]: 3.25 bpv
r V = r × 32 bits per vertex
N-tuples [Brisson’89]: 63V
RAT Star vertices [Kallmann,
Thalmann’01]: 15V
Stable catalogs [Castelli,
Devillers’06]: 7.6V
Succinct
[Blandford, Blelloch,
Cardoze,
Kadow,’03]: 2.5V
RAT Half-edge [Mantyle’88, Kettner’99] : 33V
Directed-edge [Campagna,
Kobbelt, Seidel’98]: 13V
Winged-edge [Baumgart’72]: 27V
Tripod [Snoeyink,
Speckmann’99]: 7V
Surface-Mesh [Sieger, Botsch‘11] : 21V
T
T
ECT [Rossignac, Safonova, Szymczak‘01]: 13V
SOT [Gurung, Rossignac’09 SPM]: 6V
ESQ (editable SQuad) [Castelli, Devillers, Rossignac’12 SIBGRAPI ]: 4V
SQuad [Gurung, Laney, Lindstrom, Rossignac’11 Eurographics]: 4V
LR / BELR [Gurung, Luffel, Lindstrom, Rossignac’11 SIGGRAPH]: 2V / 55 bpv
Zipper [Gurung, Luffel, Lindstrom, Rossignac’12 SPM] : 12 bpv
b bpv = b bits per vertex
Rossignac
Locally decompressible RAT [Yoon, Lindstrom’07 TVCG]: 8 bpv
2013
4
/ 22
Corner-based operators
Access:
v(f): an arbitrary vertex bounding given face f (f = 0,1,2…F-1)
f(v): an arbitrary face incident upon given vertex (v = 0,1,2…V-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
v
c
c.s
c.n
f
Bijections between corners and
half-edges, edge-uses, oriented-edges, darts…
Rossignac
2013
5
/ 22
Corners 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)
Rossignac
2013
6
/ 22
Extended 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 C[v] from vertex to one incident corner
Rossignac
2013
7
/ 22
Extended Corner Table (ECT)
Geometry: short int X[V], Y[V], Z[V]
16-bit coordinates relative to AABB
Yields 1/32 mm accuracy over a 2 m aircraft engine
Connectivity: int C[V], V[3T], O[3T]
v.c = C[v], c.v = V[c], c.o = O[c]
stored in look-up tables
c.t = c/3, t.c = 3t
Since corners of t have consecutive IDs
c.n = c.t.c + (c+1)%3
Since corners of t are sorted (orientation)
Storage cost (14.5V = 464 bpv)
Geometry: 3*0.5 = 1.5V
Connectivity ECT= 6T+V = 13.0V (90% of total storage)
For simplicity, assume low-genus, manifold mesh: T ≈ 2V
Rossignac
2013
8
/ 22
SCT: 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
Rossignac
2013
9
/ 22
CT 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
Rossignac
2013
10 / 22
SOT (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 (c=c.s) until c < 3V
Rossignac
2013
11 / 22
Linear cost construction of SOT
Start with V & O tables
Traversal matches each vertex with unique triangle
Rossignac
2013
12 / 22
Extending 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
Rossignac
2013
13 / 22
SOT 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))
Rossignac
2013
14 / 22
SQuad (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 t’s (quad),
sort quads, store only 4 (external) c.s swings per quad
(the internal ones are implicit)
Rossignac
2013
15 / 22
SQuad 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)
97% triangles
are paired
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
Rossignac
2013
16 / 22
SQuad preserves memory coherence
Squad preserves vertex order
So it mostly preserves memory coherence
Except for unmatched triangles (which are stored at the end)
Rossignac
2013
17 / 22
ESQ: 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)
Rossignac
2013
18 / 22
LR : 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
Rossignac
2013
19 / 22
Ring Expander (LR ring construction)
Compute a nearly-Hamiltonian cycle in a mesh
Rossignac
2013
0.005% of vertices
are not in the ring
20 / 22
Triangle 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 T0’s and their T1i neighbors
are exceptions
Triangles in warts: 2.35%
Non-wart T0: 1.05%
Rossignac
2013
21 / 22
Numbering 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 L[v] in L array)
• v.R right neighbor (stored in R array)
2v+1
2v
Triangles:
Match v with 2 triangles sharing edge (v , v.N)
Implicitly numbered 2v and 2v+1
Corners: Numbered around quad: v.i = 8v+i
Skip .3 to avoid cost of division by 3
Rossignac
2013
22 / 22
Computing c.o
A few cases. Here are two examples:
Case 1:
Case 2:
test: v.L.P.L == v.N
test: v.L == v.N.L
Rossignac
2013
23 / 22
Wart “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
L[v.P]=u and L[v]=v.P
Saves 15 refs per wart
20% storage cost reduction, resulting in cost =1.08T
Rossignac
2013
24 / 22
BELR: 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
Rossignac
2013
Optimized
Breadth first
25 / 22
Zipper: 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 [Sieger’11]
35× better than Directed-Edge [Campagna’98]
4.4× better than BELR [GLLR SIGGRAPH’11]
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 [Sieger‘11]
Rossignac
2013
26 / 22
2-bit deltas
Zipper stores a 3-bit code per ring triangle
•2-bit delta: v.ΔL= v.P.L–v.L (when it is 0, 1, 2, or 3)
All deltas are ≥ 0, except at T0’s
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 delta=3 are treated as exceptions.)
Rossignac
2013
27 / 22
Decoding 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 (delta+wart) 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
Rossignac
2013
28 / 22
Computing 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
Rossignac
2013
29 / 22
Computing opposites in T0 (Zipper)
We store T0’s in a 4-ary cuckoo hash [Fotakis&’03])
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
Rossignac
2013
30 / 22
Ring Bender (Zipper)
• Reduce the number of T0 triangles by 2.3x
– Every T0 is connected to a T2 by a corridor of T1’s
– Rearrange ring to remove T1’s in T0:T1…T1:T2 corridors
to make (T0,T2 ) adjacent (wart)
– Increases warts from 2.35% to 3.2%
– Reduces number of exceptions
– Saves about 1 bpt
Rossignac
2013
31 / 22
Storage 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 [Sieger’11]
Rossignac
2013
Representation
Time
Surface Mesh
1.00
CT
0.85
LR
0.83
Zipper
1.18
32 / 22
Summary & future challenges
• Summary for Zipper
– Stores connectivity using only 6T bits
• 35x better than Directed-Edge [Campagna’98]
• 4.4x better than BELR [GLLR SIGGRAPH’11]
– 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 [Sieger’11]
• Interesting (or impossible?) challenges
•
•
•
•
•
•
Rossignac
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?
2013
33 / 22
Zipper 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
Rossignac
2013
34 / 22
Recap
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)
Rossignac
2013
35 / 22