Upload
jarrod-valley
View
222
Download
1
Tags:
Embed Size (px)
Citation preview
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Interactive Visualization and Collision Detection using Dynamic Simplification and Cache-Coherent Layouts
Sung-Eui YoonDissertation defense talk
Advisor: Prof. Dinesh Manocha
2 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Goal
• Design algorithms for interactive visualization and collision detection between massive models
3 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Interactive Visualization
• Walkthrough♦ large man-made structures
• Investigate scientific simulation data
4 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Collision Detection
• Main component of:♦ Dynamic simulation♦ Navigation and path planning♦ Haptic rendering♦ Virtual prototyping
5 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Main Requirements
• Generality♦ Handle any kind of polygonal models♦ (e.g., CAD, scanned, isosurface
models)
• Interactivity♦ Provide at least 10 frames per
second
6 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Challenges
• Complex and massive models♦ Ever-increasing model complexity
Bunny model,70K St. Matthew,
372M (10GB)
Puget sound,400M+
7 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Challenges
• Complex and massive models♦ Ever-increasing model complexity
Power plant, 12M
Double eagle tanker, 82M
Boeing 777,350M
8 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Challenges
• Complex and massive models♦ Ever-increasing model complexity
472M
Isosurface from a turbulence simulation
(LLNL)
9 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Different Approaches
• Approximate algorithms• Cache-coherent algorithms• Output-sensitive algorithms• Parallel algorithms
10 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Different Approaches
• Approximate algorithms• Cache-coherent algorithms• Output-sensitive algorithms• Parallel algorithms
Use simplification while minimizing error
11 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Different Approaches
• Approximate algorithms• Cache-coherent algorithms• Output-sensitive algorithms• Parallel algorithms
CPU or GPU
DiskCaches Memory
Minimize cache misses
12 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Different Approaches
• Approximate algorithms• Cache-coherent algorithms• Output-sensitive algorithms• Parallel algorithms
ViewerVisible
trianglesInvisible triangles
13 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Different Approaches
• Approximate algorithms• Cache-coherent algorithms• Output-sensitive algorithms• Parallel algorithms
14 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Different Approaches
• Approximate algorithms♦ Dynamic simplifications
• Cache-coherent algorithms♦ Cache-oblivious layouts
• Output-sensitive algorithms• Parallel algorithms, etc
15 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
View-Dependent Rendering• [Clark 76, Funkhouser and Sequin
93]
• Static level-of-details (LODs)• Dynamic (or view-dependent)
simplification
ViewerObject
Lower resolution
16 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Static LODs
50,00050,000 facesfaces10,000 faces10,000 faces2,000 faces2,000 faces
poppop poppop
Courtesy of [Hoppe 97]
17 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Courtesy of [Hoppe 97]
Dynamic Simplification
• Provides smooth and varying LODs over the mesh
1st person’s view 3rd person’s view
18 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification
• Progressive mesh [Hop96]• View-dependent progressive
meshes [Hoppe 97]• Merge tree [Xia and Varshney 97]• Octree-based vertex clustering
[Luebke and Erikson 97]• View-dependent tree [El-Sana
and Varshney 99]• Out-of-core approaches [Decoro
and Pajarola 02; Lindstrom 03]
19 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Vertex Hierarchy
Edge CollapseVa
Vb
VaVc
Vertex Split
Vertex Hierarchy
Vc
Va Vb
20 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
View-Dependent Refinement
Vertex Hierarchy
Front representing a LOD mesh
21 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification: Issues
• Representation• Construction• Runtime computation• Integration with other
acceleration techniques
22 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification: Issues
• Representation• Construction• Runtime computation• Integration with other
acceleration techniques
22+GB for 100M triangles [Hoppe 97]
23 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification: Issues
• Representation• Construction• Runtime computation• Integration with other
acceleration techniques
24 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification: Issues
• Representation• Construction• Runtime computation• Integration with other
acceleration techniques
Rendering throughput of 3M triangles per sec
[Lindstrom 03]
25 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification: Issues
• Representation• Construction• Runtime computation• Integration with other
acceleration techniques
GPUSmall vertexcache
Many cache misses
26 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification: Issues
• Representation• Construction• Runtime computation• Integration with other
acceleration techniques
27 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Parallel View-Dependent Rendering [Baxter et al. 02]
Static LODs
SGI RealityMonster
32 processors8 GPUs16GB RAM
(3)(2)
28 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Live Demo – View-Dependent Rendering
Pentium4
GeForce Go 6800 Ultra
1GB RAM
20 Pixels of error
29 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Thesis Statement
We can design interactive visualization and collision
detection algorithms between massive models by using dynamic simplification and cache-coherent
layouts
30 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Thesis Statement
We can design interactive visualization and collision
detection algorithms between massive models by using dynamic simplification and cache-coherent
layouts
31 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Thesis Statement
We can design interactive visualization and collision
detection algorithms between massive models by using dynamic simplification and cache-coherent
layouts
32 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection• Cache-oblivious layouts• Conclusion & future work
33 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection• Cache-oblivious layouts• Conclusion & future work
34 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
New Results
• New dynamic simplification algorithm
Clustered hierarchy of progressive meshes (CHPM)
Out-of-core construction
35 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification♦ CHPM representation♦ Construction♦ Results
• Approximate collision detection
• Cache-oblivious layouts• Conclusion & future work
36 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification♦ CHPM representation♦ Construction♦ Results
• Approximate collision detection
• Cache-oblivious layouts• Conclusion & future work
37 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Clustered Hierarchy of Progressive Meshes (CHPM)• Novel dynamic simplification
representation ♦ Cluster hierarchy♦ Progressive meshes
PM1
PM3
PM2
38 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Clustered Hierarchy of Progressive Meshes (CHPM)• Cluster hierarchy
♦ Clusters are spatially localized regions of the mesh
♦ Used for visibility computations and out-of-core rendering
39 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Clustered Hierarchy of Progressive Meshes (CHPM)• Progressive mesh (PM)
[Hoppe 96]♦ Each cluster contains a PM as an LOD
representation
PM:
Base mesh
Vertex split 0
Vertex split 1
Vertex split n
…..
40 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Two-Levels of Refinement at Runtime
• Coarse-grained view-dependent refinement ♦ Provided by selecting a front in the
cluster hierarchy♦ Inter-cluster level refinements
Front
41 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Two-Levels of Refinement at Runtime
• Coarse-grained view-dependent refinement ♦ Provided by selecting a front in the
cluster hierarchy♦ Inter-cluster level refinements
Cluster-split
42 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Two-Levels of Refinement at Runtime
• Coarse-grained view-dependent refinement♦ Provided by selecting a front in the
cluster hierarchy♦ Inter-cluster level refinements
Cluster-split Cluster-collapse
43 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Two-Levels of Refinement at Runtime
• Fine-grained local refinement♦ Supported by performing vertex
splits in PMs♦ Intra-cluster refinements
Vertex split 0
Vertex split 1
Vertex split n
…..PM
44 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Main Properties of CHPM
• Low refinement cost♦ 1 or 2 order of magnitude lower than
a vertex hierarchy
• Alleviates visual popping artifacts♦ Provides smooth transition between
different LODs
45 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Video – Comparison of CHPM with Vertex Hierarchy
4X overall frame rate speedup
38X refinement speedup
46 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification♦ CHPM representation♦ Construction♦ Results
• Approximate collision detection
• Cache-oblivious layouts• Conclusion & future work
47 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Overview of Building a CHPM
Cluster decomposition
Input model
Cluster hierarchy generation
Hierarchical simplification
CHPM
Performedout-of-core
48 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Overview of Building a CHPM
Cluster decomposition
Input model
Cluster hierarchy generation
Hierarchical simplification
CHPM
49 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Overview of Building a CHPM
Cluster decomposition
Input model
Cluster hierarchy generation
Hierarchical simplification
CHPM
50 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Overview of Building a CHPM
Cluster decomposition
Input model
Cluster hierarchy generation
Hierarchical simplification
CHPM
51 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Out-of-Core Hierarchical Simplification
• Simplifies clusters bottom-up
52 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Out-of-Core Hierarchical Simplification
• Simplifies clusters bottom-up
PM PM
PM
53 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Boundary Simplification
CB
Cluster hierarchy
A D
E F
dependency
B C DA
Boundary constraints
54 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Boundary Simplification
CB
Cluster hierarchy
A D
E F
dependency
B C DA
FE
55 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Boundary Constraints
• Common problem in many hierarchical simplification algorithms♦ [Hoppe 98; Prince 00; Govindaraju et
al. 03]
56 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Boundary Constraints
57 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Boundary Constraints
58 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cluster Dependencies
• Replaces preprocessing constraints with runtime dependencies
59 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cluster Dependencies
CB
Cluster hierarchy
A D
E F
dependency
B C DA
E F
60 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cluster Dependencies
CB
Cluster hierarchy
A D
E F
dependency
B C DA
E F
61 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cluster Dependencies at Runtime
CB
Cluster hierarchy
A D
E F
dependencyCluster-splitForce
cluster-split
62 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Chained Dependency
• Inappropriate for refinements
63 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cluster Dependencies
64 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cluster Dependencies
227K triangles 19K triangles92% triangles reduced
After creatingcluster
dependencies
65 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification♦ CHPM representation♦ Construction♦ Results
• Approximate collision detection
• Cache-oblivious layouts• Conclusion & future work
66 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Processing Time and Storage Requirements
• Process 30M triangles per hour
• CHPM requires 88MB per million vertices♦ 224MB (Hoppe’s VDPM) [Hoppe 97]♦ 108MB (XFastMesh) [DeCoro and
Pajarola 02]
67 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Runtime Performance
ModelPixels
of errorFrame rate
Mem. footpri
nt
Refinement time
Power plant
1 28 400MB 1%
Isosurface (100M)
20 27 600MB 2%
St. Matthew
1 29 600MB 2%
512x512 image resolution, GeForce 5950FX
68 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Limitations
• Long preprocessing time♦ 12 hours for St. Matthew model
consisting of 372M triangles
• Performance depends on computed clusters
69 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Summary
• Low refinement time• Combines out-of-core, VDR,
and visibility culling• No assumption on input mesh
♦ Applied to various polygonal meshes (e.g., CAD, scanned, isosurface models)
70 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection• Cache-oblivious layouts• Conclusion & future work
71 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Goal
•Fast algorithm for collision detection between complex and massive models♦ Handle any kind of polygonal
models (e.g., polygon soup)
72 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Problems
• High computation cost of exact query♦ Depends on input model complexity
and the number of colliding triangles
• High memory requirements♦ 40GB for OBB-tree of 100M triangles
[Gottschalk et al. 1996]
73 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Our Solution
• Perform approximate query based on a simplified mesh
74 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
LOD-based Query
Object A
Object B
Exact colliding regions
75 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
LOD-based Query
Object A Simplified object A
Object B Simplified object B
Simplified colliding regions
Exact colliding regions
76 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
LOD-based Query
Object A Simplified object A
Object B Simplified object B
Exact colliding regions
Simplified colliding regions
77 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
New Results
• Conservative LOD-based collision detection algorithm between massive models
Clustered hierarchy of progressive meshes (CHPM)
Conservative error metric
78 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection♦ Conservative error metric♦ Results
• Cache-oblivious layouts• Conclusion & future work
79 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection♦ Conservative error metric♦ Results
• Cache-oblivious layouts• Conclusion & future work
80 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
CHPM Representation
• Serve as a dual hierarchy for collision detection♦ LOD hierarchy♦ Bounding volume hierarchy
• Unified representation for rendering and collision detection
81 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Main Properties of CHPM• Allows a dramatic
acceleration of collision detection♦ Reduces the number of overlap tests
• Alleviates simulation discontinuities♦ Provides smooth transition between
colliding triangles of LODs
82 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
• Given two original models, A0 and B0, and a separation distance,
Exact Collision Detection Query
• Computes triangle pairs (tA0, tB0) such that tA A0, tB B0 and dist (tA0, tB0) <
83 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
LOD-based Query
• Given two CHPM representations, A and B, and a separation distance, with distance error bound,
84 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
such that dist (tA0, tB0) < where tA0 simplifies into tA and tB0 simplifies into tB
• Computes triangle pairs (tA, tB) such that tA A, tB B and dist (tA, tB) <
LOD-based Query
Original meshes Simplified meshes
Simplification
85 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Conservative Error Metric
• Dynamic simplification♦ Determined by the user specified
error,
Original meshes Simplified meshes
Simplification
• Conservative algorithm
86 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection♦ Conservative error metric♦ Results
• Cache-oblivious layouts• Conclusion & future work
87 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Benchmark Models – Dynamic Simulation
Lucy model: 28M triangles
Turbine model: 1.7M triangles
Impulse based rigid body simulation
[Mirtich and Canny 1995]
88 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Live Demo – Rigid Body Simulation
Error bound:0.1% of width of Lucy model
Average query time:18ms
89 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Limitations
• Can be very conservative and compute many “false positives”♦ Two concentric spheres in parallel
proximity with a separation with d
90 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Summary
• Generality• Conservative collision
queries with reduced discontinuities
91 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection• Cache-oblivious layouts• Conclusion & future work
92 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Goal
• Compute cache-coherent layouts of polygonal meshes ♦ For visualization and collision
detection♦ Handle any kind of polygonal models
(e.g., irregular geometry)
93 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Motivation
• High growth rate of computational power of CPUs and GPUs
Improvementfactor
during 1993 - 2004
Courtesy: Anselmo Lastra and http://www.hcibook.com/e3/online/moores-law/
during 99 - 04
94 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Memory Hierarchies and Caches: I/O Model [Aggarwal and Vitter 88]
CPU or GPU
Fast memory or cache
Slow memory
Blocktransfer
Disk
106nsAccess time: 102ns100ns
95 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cache-Coherent Layouts
• Cache-Aware♦ Optimized for particular cache
parameters (e.g., block size)
• Cache-Oblivious♦ Minimizes data access time without
any knowledge of cache parameters♦ Directly applicable to various
hardware and memory hierarchies
96 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification: Issues
• Representation• Construction• Runtime computation• Integration with other
acceleration techniques
97 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Dynamic Simplification: Issues
• Representation• Construction• Runtime computation• Integration with other
acceleration techniques
98 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Low Computation Speed
• Rendering throughput♦ GPU capable of 100M+ triangles per
sec♦ Only achieved 20M triangles per sec
• Low cache utilization♦ Cannot efficiently use triangle strips
for dynamically generated geometry
99 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
New Results
• Algorithm to compute cache-oblivious layouts
Cache-oblivious metric
Multilevel optimization framework
Applicable to multiresolution mesh
100 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Realtime Captured Video – St. Matthew Model
101 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Related Work
• Cache-coherent algorithms• Mesh layouts
102 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cache-Coherent Algorithms
• Cache-aware [Coleman and McKinley 95, Vitter 01, Sen et al. 02]
• Cache-oblivious [Frigo et al. 99, Arge et al. 04]
Focus on specific problems such as sorting and linear algebra computations!
103 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Mesh Layouts
• Rendering sequences♦ Triangle strips♦ [Deering 95, Hoppe 99, Bogomjakov
and Gotsman 02]
• Processing sequences♦ [Isenburg and Gumhold 03, Isenburg
and Lindstrom 04]
Assume that globally the access pattern follows the layout order!
104 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Mesh Layouts
• Space-filling curves♦ [Sagan 94, Velho and Gomes 91,
Pascucci and Frank 01, Lindstrom and Pascucci 01, Gopi and Eppstein 04]
Assume geometric regularity!
Z-curve:
105 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection• Cache-oblivious layouts
♦ Overview♦ Results
• Conclusion & future work
106 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection• Cache-oblivious layouts
♦ Overview♦ Results
• Conclusion & future work
107 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Overview
Multilevel optimizationCache-oblivious metric
Local permutations
va
vb vd
vc
Input graph
va vb vd vc
Result 1D layout
108 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Graph-based Representation
• Undirected graph, G = (V, E)♦ Represents access patterns of
applications
• Vertex♦ Data element ♦ (e.g., mesh vertex or mesh triangle)
• Edge♦ Connects two vertices if they are
likely to be accessed sequentially
va
vb vd
vc
109 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Problem Statement
• Vertex layout of G = (V, E)♦ One-to-one mapping of vertices to
indices in the 1D layout
• Compute a that minimizes the expected number of cache misses
: |}|, ... ,1{ VVva
vb vd
vc
va vb vd vc
1 2 3 4
110 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Local Permutation
va
vb vd
vc
va vb vd vc
va vb vc vd
Layout computation
111 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Edge Span
va
vb vd
vc
va vb vd vc
va vb vc vd
21
Absolute value of index gap of two vertices in the layout
1 2 3 4Indices of vertices
112 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Expected Number of Cache Misses
Cache miss probability function
Edge span
va
vb vd
vc
va vb vd vc
va vb vc vd
Differences of histogramsof edge spans
Edge span
Number of edges
Local permutation
(dot product)
113 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Expected Number of Cache Misses
Cache miss probability function
Edge span
?
• Assume monotonicity
Differences of histogramsof edge spans
Edge span
Number of edges
114 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Probability Computation
Cache miss probability function
Edge span
?
• Compute a probability that cache misses decrease
Differences of histogramsof edge spans
Edge span
Number of edges
115 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Geometric Formulation
Cache miss probability function (pl)
Edge span = l
?
p2
p10
Closed hyperspace
Half-hyperspace mapping to probability
functions reducing cache misses
Differences of histogramsof edge spans
Edge span
Number of edges
2D example
116 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Geometric Volume Computations
• Time complexity♦ Exact: [Lasserre and Zeron
01]♦ Approximate: [Kannan et al. 97]
where n is the number of hyperplanes
)( 1nnO)( 5nO
117 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fast and Approximate Volume Comparison
• Propose an approximate volume comparison♦ Has linear time complexity♦ Has very small error (0.2% compared
to exact method)
118 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Layout Optimization
• Find an optimal layout that minimizes our metric♦ Combinatorial optimization problem
[Diaz et al. 2002]
119 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Multilevel Minimization
Step 1: Coarsening
120 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Multilevel Minimization
Step 2: Ordering of coarsest graph
121 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Multilevel Minimization
Step 3: Refinement and
local optimization
122 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification• Approximate collision
detection• Cache-oblivious layouts
♦ Overview♦ Results
• Conclusion & future work
123 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Layout Computation Time
• Process 140 million triangles per hour♦ Takes 2.6 hours to lay out St.
Matthew model (372 million triangles)
♦ 2.4GHz of Pentium 4 PC with 1 GB main memory
124 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Edge Span Histograms of Different Layouts
Cache-oblivious layout
Spectral layout
Original layout
Edge span
Nu
mb
er o
f ed
ges
>
[Isenburg and Lindstrom 05]
125 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Applications
• View-dependent rendering• Collision detection• Isocontour extraction
126 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
View-Dependent Rendering
• Layout vertices and triangles of CHPM♦ Reduce misses in GPU vertex cache
127 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
View-Dependent Rendering
Models # of Tri.Our
layoutCHPM layout
St. Matthew
372M 106 M/s 23 M/s
Isosurface 100M 90 M/s 20 M/s
Double eagle tanker
82M 47 M/s 22 M/s
4.5X
2.1X
Peak performance: 145 M tri / s on GeForce 6800 Ultra
128 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Comparison with Optimal Cache Miss Ratio
Our layout
CHPM layout
Optimal cache miss ratio
[Bar-Yehuda and Gotsman 96]
Test model: Bunny model
129 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Comparison with Hoppe’s Rendering Sequence
Our layout
[Hoppe 99]
Optimized for 16 vertex cache sizewith FIFO replacement
Optimized for no particular cache size
Test model: Bunny model
130 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Comparison with Space Filling Curve on Power Plant Model
Our layout
Space filling curve (Z-curve) [Sagan 94]
131 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Collision Detection
• Bounding volume hierarchies♦ Widely used to accelerate the
performance of collision detection♦ Traversed to find contacting area♦ Uses pre-computed layouts of OBB
trees [Gottschalk et al. 96]
132 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Rigid Body Simulation
133 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Collision Detection Time
2X on average
Depth-first layout
Cache-oblivious layout
134 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Isocontour Extraction
• Contour tree [van Kreveld et al. 97]
• Use mesh as the input graph
• Extract an isocontour that is orthogonal to z-axis
Puget sound, 134 M triangles
Isocontourz(x,y) = 500m
135 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Comparison – FirstExtraction of Z(x,y) = 500m
Relative Performance
overZ-axis sorted
layout
Nearly optimized for particular isocontour
2
21
13
1
Disk access time is bottleneck
136 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Comparison – Second Extraction of Z(x,y) = 500m
Relative Performance
overZ-axis sorted
layout
2
21
13
379
212
10.8
Memory and L1/L2 cache access times are bottleneck
137 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Limitations
• Monotonicity assumption♦ May not work well for all applications
• Does not compute global optimum♦ Greedy solution
138 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Summary
• General ♦ Applicable to all kinds of polygonal models♦ Works well for various applications
• Cache-oblivious♦ Can have benefit for all levels of the memory
hierarchy (e.g. CPU/GPU caches, memory, and disk)
• No modification of runtime applications♦ Only layout computation
Source codes are available as a library called
OpenCCL
139 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
• Dynamic simplification & visibility culling
• Cache-oblivious layouts• Approximate collision
detection• Conclusion & future work
140 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Conclusion
• Dynamic simplification and cache-oblivious layouts♦ Applied them to visualization and
collision detection♦ Demonstrated with a wide variety of
polygonal models♦ Achieved interactive performance on
commodity hardware
141 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
New Results
• Dynamic simplification method♦ CHPM representation♦ Out-of-core construction method♦ Application to collision detection
• Cache-oblivious layout algorithm♦ Cache-oblivious metric♦ Multilevel minimization
142 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Future Work on Visualization
• Achieve end-to-end interactivity♦ Requires no or minimal
preprocessing
• Handle time-varying geometry
Just one instance among 27K time steps
during simulation
143 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Future Work on Collision Detection
• Handle dynamically deformable models (e.g. cloth simulation)♦ Requires no or minimal
preprocessing
• Support penetration depth computations Obj 1 Obj 2
144 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Future Work on Cache-Coherent Layouts
• Develop cache-aware layouts• Investigate optimality• Apply to other applications
and other representations♦ Shortest path computation, etc.
• Provide multiresolution functionality from layouts♦ [Pascucci and Frank 01]
145 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Publications
S.-E. Yoon, B. Salomon, R. Gayle, and D. Manocha,
Quick-VDR: Interactive View-Dependent Rendering of Massive Models
IEEE Vis. 04 &
Invited at IEEE Tran. on Vis. and Comp. Graphics 05
S.-E. Yoon, B. Salomon, and D. Manocha,Interactive View-Dependent Rendering with
Conservative Occlusion Culling in Complex EnvironmentIEEE Vis. 03
146 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Publications
S.-E. Yoon, P. Lindstrom, V. Pascucci, and D. Manocha,Cache-Oblivious Mesh Layouts
ACM SIGGRAPH (ACM Tran. on Graphics) 05
S.-E. Yoon, B. Salomon, M. Lin and D. Manocha,Fast Collision Detection between Massive Models
using Dynamic SimplificationEurographics Sym. of Geometric Processing 04
147 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Acknowledgements
• Advisor, Dinesh Manocha• Other committee members
♦ Anselmo Lastra, Ming C. Lin, Peter Lindstrom, Valerio Pascucci
• Other faculty and staff members
148 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Acknowledgements
• Coauthors and colleagues♦ Bill Baxter, Russ Gayle, Naga
Govindaraju, Martin Isenburg, Jayeon Jung, Ted Kim, Young Kim, Brandon Lloyd, Miguel Otaduy, Stephane Redon, Brian Salomon, Avneesh Sud, Gokul Varadhan, and Kelly Ward
• English support♦ Elise London, Charlotte Powell, and
Mary Wakeford
149 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Acknowledgements
• Model contributors♦ Boeing company♦ Digital Michelangelo Project♦ Lawrence Livermore National
Laboratory♦ Newport News Shipbuilding♦ Power plant donor
150 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Acknowledgements
• Funding agencies♦ Army Research Office♦ Defense Advance Research Projects
Agency ♦ Ilju foundation♦ Intel company♦ Lawrence Livermore National
Laboratory♦ National Science Foundation♦ Office of Naval Research
151 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Acknowledgements
• My parents, brother, sister, and parents-in-law
152 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Acknowledgements
• My wife, Dawoon Jung
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Questions?
154 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Backup Slides - Collision
155 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
LOD-based Query
• Given two bounding volumes, BVi and BVj
• ConservBVTest (BVi, BVj, , )♦ Similar to LodCollide in a BV level
156 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Conservative Collision Formulation
• Transforms the distance query with into an intersection query
2
2
• Considers the dilated BV, dilated (BV, )♦ Defined as the Minkowski sum of BV
with a sphere of radius
157 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Conservative Collision Formulation
• Defines♦ Hausdorff distance between a
bounding volume, BV, and the original mesh
)(ˆ BVh
BV
Contained original mesh
Hausdorff distance
158 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Lemma 1
• If dilated (BVi , ) and dilated (BVj , ) do not intersect, the distance is greater than
2
2
159 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Lemma 2
• If there is an intersection between dilated (BVi , ) and dilated (BVj , ), the distance has an upper bound of
2
)(ˆ)(ˆ ji BVhBVh
2
)(ˆ jBVh
)(ˆ iBVh
160 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Lemma 2
• If there is an intersection between dilated (BVi , ) and dilated (BVj , ), the distance has an upper bound of
2
)(ˆ)(ˆ ji BVhBVh
2
161 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Conservative Collision Formulation
ConservBVTest (BVi, BVj, , ) =
NoCollision, if
Collision, if
Potential collision, if
162 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cull and Refine Operations
• Culling operation♦ BV pairs whose distance is greater
than are culled
• Refining operation♦ If there is collision and sum of
Hausdorff distance is bigger than , further refinement is performed
LodCollide (A, B, , ) =
163 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Collision Detection between CHPMs
Cluster Level Culling using Bounding Volume Test Tree
PM Refinements
GPU basedTriangle Level Culling
Exact Intersection Tests
Two CHPMs
Potentially colliding clusters
Colliding triangles
Potentially colliding triangles (PCTs)
Reduced number ofPCTs
164 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
BVTT using CHPM
• Recursively perform culling and refining operations♦ Computes potentially colliding
clusters♦ performs coarse-grained LOD
refinement over regions of the mesh in collision
165 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
BVTT using CHPM
• Recursively perform culling and refining operations♦ Computes potentially colliding
clusters♦ performs coarse-grained LOD
refinement over regions of the mesh in collision Culling
operationRefining operation
166 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Benchmark Models – Navigation
Power plant model: 12M triangles
Dragon model: 0.8M triangles
167 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Contact-Dependent LODs [Otaduy and Lin 2003]• Uses hierarchies of static
LODs♦ Has relatively small runtime
overhead♦ Can create “popping” or
discontinuity ♦ Assumes a closed and manifold
model because they use a hierarchy of convex hull
168 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Limitations
• Relies on high temporal coherence
• Can be very conservative and return many “false positives”♦ Two objects in parallel proximity
with a separation with d
169 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Backup Slides – Cache-Oblivious Mesh Layouts
170 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Terminology
• Edge span distribution ♦ where i is in [1, n]|| iE
1|| 3 E1|| 2 E
1|| 4 E
4|| 1 E
Edge span1
Number of edges
2 3 4
1
1
1
1
4
2
3
4
1
171 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Cache Miss Ratio Function (CMRF),
• Probability of a cache miss for a given edge span i
ip
0
1Cache miss ratio =Probability to have
a cache miss
Edge span
ip
1 n-1i
172 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Number of Cache Misses at Runtime
• Estimated by multiplying two factors♦ Runtime edge span distribution♦ CMRF
1D Layout:
Edge span 2 Edge span 4 Edge span 2
2p 2p4p+ + ( 2 1, () 2p 4p, )( )
173 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Number of Cache Misses at Runtime
1D Layout:
Edge span 2 Edge span 4 Edge span 2
2p 2p4p+ + ( 2 1, () 2p 4p, )
Runtime edge span distribution CMRF
( )
174 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Expected Number of Cache Misses
♦ Approximate runtime edge span distribution with one of the layout
1
1
||n
iii pE
Edge span distribution of the layout
The number of vertices
175 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Does a Local Permutation Decrease Cache Misses?
1
1
||n
iii pE
1
1
|)||(|n
iiii pEE
|||| ii EE || iE
?
176 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Does a Local Permutation Decrease Cache Misses?
1
1
||n
iii pE
1
1
|)||(|n
iiii pEE
0||1
1
n
iii pE
177 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Exact Cache-Oblivious Metric
0||1
1
n
iii pE
where
All the possible cache configurations
1...0 1221 nn pppp
Monotonicity of CMRF
178 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Geometric Formulation
where
0||1
1
n
iii pE
1...0 1221 nn pppp
Half hyperspacep2
p10
Closed hyperspace1 n
p2
p10
179 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Geometric Volume Computation
• Assume each CMRF to be equally likely
• Half hyperspace (blue area)♦ Space of CMRFs that reduce cache
misses
p2
p10where
0||1
1
n
iii pE
1...0 1221 nn pppp
180 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
p2
p10
Fast and Approximate Volume Comparison
• Define a top polytope in closed hyperspace
• Compute the centroid, C, of the top polytope
Top polytope Centroid, C
181 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
p2
p10
Fast and Approximate Volume Comparison
• Use the centroid for approximate volume comparison♦ The volume containing the centroid is
likely to be larger
Centroid, C
182 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Final Approximate Metric
0||1
)(
m
jjl jE
Centroid
Pack non-zero to 1,…, m || iE
183 The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Performance during View-Dependent Rendering
Our layout
[Hoppe 99]
Optimized for various resolutions
Optimized for full resolution