Topics in mesh-based modelling and computer graphics Presentation of thesis Christopher Dyken

advertisement
Topics in mesh-based modelling
and computer graphics
Presentation of thesis
Christopher Dyken
June 2, 2008
Page 1
Seven papers, four threads of research:
1 Transfinite interpolation
I Transfinite mean value interpolation
2 Delaunay triangulations
II Preferred directions for resolving
the non-uniqueness of Delaunay triangulations
III Simultaneous curve simplification
3 Adaptive tessellation
IV Real-time linear silhouette enhancement
V Real-time GPU silhouette refinement
using adaptively blended Bézier patches
VI Semi-uniform adaptive patch tessellation
4 Stream compaction and expansion
VII High-speed marching cubes using Histogram Pyramids
Page 2
1 Transfinite interpolation
Page 3
Definition
Given Ω ⊂ R2 , a convex or non-convex set, possibly with holes.
Lagrange transfinite interpolation
We are given f : ∂Ω → R.
Find g : Ω → R that interpolates f on ∂Ω.
Hermite transfinite interpolation
We are given f : ∂Ω → R and
∂f
∂n
: ∂Ω → R.
Find g : Ω → R that interpolates f on ∂Ω
∂f
and ∂g
∂n matches ∂n on ∂Ω.
Page 4
Motivation: Smooth mappings
Reference shape
Computational domain
(extended Gordon & Hall)
MV-Lagrange
MV-Hermite
Page 5
Motivation: Partial differential equations
WEB-splines are extended
tensor product B-splines
times a weight function.
MV Hermite =⇒ weight func
MV Lagrange =⇒
boundary conditions
Paired with transfinite
interpolation, inhomogenous
problems can be solved.
Poisson’s equation with
inhomogenous boundary
Page 6
Paper I: Transfinite mean-value interpolation
I
Proved that the Lagrange MV interpolant
does in fact interpolate.
I
Constructed a Hermite MV interpolant.
I
Proved several properties for the MV weight function:
I
I
I
I
I
positive inside Ω,
constant normal derivative on ∂Ω,
bounded by the distance function
no local minima in Ω.
Applied transfinite MV interpolation to two applications:
I
I
Produce smooth mappings between domains in R2
Solve inhomogeous PDE’s using the WEBSpline method.
Page 7
2 Delaunay triangulations
Page 8
Motivation: Triangulation-based image compression
1.
2.
3.
4.
Map color intensity to height at pixel centers
Build a data-dependent triangulation
Simplify triangulation
Reconstruct with linear spline over each triangle
Compression at 0.251 bits pr. pixel :
Original:
Wavelet-based:
Triangulation-based:
(Images from Demaret, Dyn, Floater & Iske 2005)
Can we avoid storing the triangulation?
Page 9
The Delaunay triangulation
The Delaunay triangulation is a strong candidate:
I
Unique for point sets
with no sets of four
co-circular points.
I
Simple to integrate into
a decimation process
However. . .
I
subsets of grided data
tend to have many
co-circular points.
Page 10
Paper II: Preferred directions
I
A simple rule to resolve ties:
I
preferred directions d1 & d2 :
Non-parallell and non-orthogonal.
I
Let αi (`) = ∠`, di .
I
If ` is an ambiguous diagonal, use
score(`) := α1 (`), α2 (`)
to resolve ties.
I
Selects an unique triangulation
among all Delaunay triangulations:
I
Integrates with
Lawson’s edge-swap algorithm.
I
Point removal is a local operation.
I
Exact for integer arithmetics.
d1 = (1, 0),
d1 = (1, −1),
d2 = (1, 1)
d2 = (0, 1)
Page 11
Build a consistent simplification,
2 = 1000m, 8 022 points
32441.6m
32441.6m
32441.6m
1 = 100m, 31 794 points
32441.6m
= 0m, 144 293 points
32441.6m
Motivation: Simplification of carthographic curve sets
32441.6m
q
q
p
p
avoid introducing new intersections.
r
r
Page 12
Paper III: Simultaneous curve simplification
Encode curve set using a constrained Delaunay triangulation.
I
Greedy simplification strategy:
Maintains a valid triangulation.
I
Half-edge collapses along curves.
I
Never remove a junction vertex.
I
Never collapse a curve.
Guided by a distance measure,
three suggestions:
2595.8m
1. Max distance between original
curve and approximation.
2. Max distance scaled by min
distance from candidate to
neighbouring curve (separation).
3. Hybrid that clamps scaling,
separation only in dense regions.
2595.8m
I
I
2595.8m
I
2595.8m
Page 13
3 Adaptive tessellation
Page 14
Motivation: Piecewise linear geometry of coarse geometry
Real-time geometry is usually quite coarse.
Phong shading.
Normal mapped.
Normal mapped,
tessellated along silhouette.
I
Can to some extent be hidden by shading models.
I
Coarseness of geometry is revealed along silhouettes.
I
Idea: Adaptively tessellate the geometry along silhouettes.
Page 15
Motivation: Adaptive tessellation
Curved geometries are tessellated into sets of triangles
I
I
Adjacent tessellations do not match =⇒ cracking:
I
Results in small holes in the surface.
I
Must be handled by the tessellation scheme.
Efficiency: GPUs prefer large homogeneous batches.
Page 16
Paper IV: Real-time linear silhouette enhancement
I
not silhouette
Introduced silhouetteness.
I
“Is edge on silhouette?”
binary test =⇒ popping.
I
Add transition zone
between “silhouette” and
“non-silhouette”.
I
θ
silho
uette
θ
uette
silho
CPU-based algorithm:
I
Calculate silhouetteness of
triangle’s three edges.
I
If non-zero, replace triangle with
a triangle fan.
I
Number of triangles in fan guided
by silhouetteness.
I
Uses PN-triangles.
Page 17
Paper V: Real-time GPU silhouette refinement
I
Based on “Generic mesh
refinement on GPU” [BS05]:
I
Static parameter space
tessellations in VBOs.
I
Patch specific evaluation in
vertex shader.
I
ˆ
˜
ˆ
˜
S3 S0 [F ] S3 S1.5 [F ]
0.5 L 0.5
F
3
s =
s=
0
S1 [F ]
S1.5 [F ]
Scheme for blending tessellations:
I
5
1.
S2 [F ]
S3 [F ]
I
s=
ˆ
˜
S2 S1 [F ]
I
Fractional level-of-detail.
Adjacent patches match
geometrically.
GPU heavy algorithm:
I
I
I
Silhouetteness calculated on GPU
Compacts results on GPU.
Patches instantiated by CPU,
evaluated by GPU.
Page 18
Paper VI: Semi-uniform adaptive patch tessellation
I
Makes adjacent tessellations
topologically compatible:
I
I
Moves points consistently.
A few lines of vertex shader code.
I
GPU bucket sort: organize patches by
tessellation level into render queues.
I
Perfect for instancing.
I
Pure GPU algorithm:
I
I
I
I
Calculate silhouetteness and patch
tessellation levels.
Build render queues.
Trigger rendering of render queues.
Patches made topologically
consistent on the fly.
Page 19
4 Stream compaction and expansion
Page 20
Definition: Stream compaction and expansion
Stream compaction
I
Arbitrarily discard input stream elements
I
Compact output stream of remaining elements
Input stream
Output stream
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 3 4 6 8 9 10 15
Stream compaction and expansion
I
Allow input stream elements repeat in output stream
Input stream
Output stream
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 3 4 4 6 8 8 9 9 10 15
Page 21
Motivation: Marching cubes
Effectively a stream compaction & expansion process
Input: Stream of cubes of 2×2×2 scalar values (8 corners).
I Label corners as inside/outside iso-level.
I Corner labels select 1 out of 256 cases.
I Each class has a fixed set of edges that
pierce the iso-surface.
I Each case has a fixed
triangulation of edge
intersections.
I Find the edge-surface
intersections and emit
triangles.
Output: A fixed number, determined by case, of triangles.
Page 22
Paper VII: High-speed marching cubes using HistoPyramids
The HistoPyramid algorithm (Ziegler, Tevs, Theobalt & Seidel 2006):
I Efficient stream compaction.
The HistoPyramid algorithm
I GPU friendly.
I Runs on SM3 hardware.
0
0
0
0
1
0
0
0
Extended for arbitrary output:
I Stream compaction/expansion.
I CUDA formulation.
0
0
0
0
0
1
0
0
0
1
1
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
1
1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
Input image Output count
Predicate
12
2 2
4 4
0 1 1 0
0 1 1 0
2 0 0 2
0 2 2 0
HistoPyramid
HP-builder
(2,1)
(5,2)
(2,6)
(6,5)
(2,2)
(0,4)
(3,6)
(4,6)
(5,1)
(1,5)
(7,4)
(5,6)
Point list
Extractor
MC using HP stream compaction/expansion:
I No transfer of data between CPU and GPU.
I Integrates directly with regular OpenGL rendering.
I
Extraction of triangles on the fly in the vertex shader.
I
Can produce compact triangle list in GPU-mem.
I Outperforms all known GPU approaches to MC.
Page 23
Summary
I
Brief overview of the four threads of research:
1. Transfinite interpolation
I
I
Smooth mappings
Solving non-homogeneous PDEs
2. Delaunay triangulations
I
I
Triangulation-based image compression
Simplification of carthographic curve sets
3. Adaptive tessellation
I
I
Formulating a GPU-friendly adaptive tessellation scheme
Improving silhouettes of coarse geometry
4. Stream compaction and expansion
I
GPU-friendly high-speed marching cubes
I
Introduced motivating problems.
I
Showed how the seven papers address these problems.
Page 24
Download