parallel poisson disk sampling li-yi wei microsoft
TRANSCRIPT
Parallel Poisson Disk SamplingParallel Poisson Disk Sampling
Li-Yi Wei
Microsoft
ParallelismParallelism
Processors are becoming parallel
Intel Larrabee, NVIDIA, AMD/ATI, IBM/Sony Cell, etc.
So are programming interfaces
BSGP, CUDA, CAL, Ct, DX, OpenGL, etc.
As well as applications
To take advantage of parallel environment
ParallelizationParallelization
Traditional parallelization methods
Sequential consistency [Lampert]
- sorting, FFT, matrix, etc.
Not all algorithms need to be seq-consistent
Graphics, computer vision, image/video, statistics
Approximate solutions might suffice
Opportunities for new parallelization methods
First pick: Poisson disk samplingFirst pick: Poisson disk sampling
A set of samples that are
as random as possible
remain a minimum distance r away from each other
Why pick this problem?
important algorithm
seemly non-parallelizable
Importance of Poisson disk samplingImportance of Poisson disk sampling
Best quality for N samples [Cook 1986]
Natural object distribution (retina cells, ecology)
Blue noise spectrum
void in low freq
noise in high freq
Applications in
Rendering, imaging, geometry processing, etc.
Optimal spectrum (given # samples)Blue noise: aliasing → noise Optimal spectrum (given # samples)Blue noise: aliasing → noise
sam
ples
spec
trum
regular grid jittered grid Poisson disk
All with 1600 samples
Spatial samplingSpatial sampling)sin( 22 yx
regular grid jittered grid Poisson disk
(zone plate)
aliasing noisy
MethodsMethods
Dart throwing [Cook 1986]Dart throwing [Cook 1986]
Loop:
Random sample from the entire domain
Accept sample if not in conflict with existing ones
O High quality
Ground truth
X Slow speed
Inherently sequential
Speed improvementSpeed improvement
Computation on the fly (sequential)Scalloped regions [Dunbar & Humphreys 2006]
Onion layers [Bridson 2007]
Hierarchical dart throwing [White et al. 2007]
Pre-computed data set (parallel access)Penrose tiling [Ostromoukhov et al 2004]
Wang tiles [Cohen et al. 2003; Lagae & Dutre 2005; Kopf et al. 2006]
Polyominoes [Ostromoukhov 2007]
X Potential large data set + quality issue
Features of our approachFeatures of our approach
Parallel computation
Entirely on the fly
(no pre-computed data)
Good spectrum quality
Like dart throwing
+ Adaptive sampling
+ Any dimension
Parallel GPU run time (in slow motion)
Multi-resolution synthesis
Our basic ideaOur basic idea
Samples from a grid
1 sample per grid cell
Sample grid cells far apart in parallel
Watch out for bias!
Tricks to avoid bias
Algorithm in gradual stepsAlgorithm in gradual steps
Uniform sampling, sequential
Uniform sampling, parallel
Adaptive sampling
Sequential samplingBasic data structureSequential samplingBasic data structure
Choose grid cell size d so that each cell has at most one sample
r = minimum spacing
n = dimension
Inspired by
[Bridson 2007]
Texture synthesis
2
rd r
d
Sequential samplingscan-line order + single resolutionSequential samplingscan-line order + single resolution
Bias!
Scanline order
Grid sampling
Sequential samplingrandom order + single resolutionSequential samplingrandom order + single resolution
Removes scanline bias
But still grid-cell biased
scanline random
Sequential samplingrandom order + multi-resolutionSequential samplingrandom order + multi-resolution
Removes both biases
scanline, grid
1 level 3 level 5 level
scan
line
rand
om
Sequential samplingSummary for bias removalSequential samplingSummary for bias removal
Two sources of bias Grid sampling
fixed by multi-resolution
Traversal order
fixed by random order
scan
line
rand
om
1 level 3 level 5 level
r
Parallel samplingKey insightParallel samplingKey insight
Sample cells sufficiently far away in parallel
2D example:
Cells apart cannot conflict with each other
split cells → phase groups
2
rd
d2
9 9
3
3
3
3
4
4
4
4
8
8
8
1 1
1 1
7
7
7
2 2
2 2
6 6
6 6
0 0
0 0
5 5
5 5
8 8
8 8
7 7
7 7
6 6
6 6
5 5
5 5
4 4
4 4
3 3
3 3
2 2
2 2
1 1
1 1
0 0
0 0
8 8
8 8
7 7
7 7
6 6
6 6
5 5
5 5
4 4
4 4
3 3
3 3
2 2
2 2
1 1
1 1
0 0
0 0
Phase group partitionPhase group partition
grid partitionscanline order
random partition grid partitionrandom order
O easy to computeX bias! (scanline)
O good qualityX hard to compute
(sequential)
O easy to computeO good quality
Parallel samplingSummaryParallel samplingSummary
for each level low to high
for each phase group p
parallel: for each cell in p
if cell contains no sample
draw one sample randomly from the cell domain
add the sample if not conflicting existing ones
Adaptive samplingAdaptive sampling
Slightly more involved than uniform sampling
Parallelizable as well
ResultsResults
Spectrum comparison - 2DSpectrum comparison - 2Dda
rt t
hrow
ing
our
met
hod
power spectrum (10 run) radial mean radial variance
Sampling in higher dimensionsSampling in higher dimensions
Algorithm applicable to 2+ dimension
3D samples
power spectrum
radial mean radial variance
PerformancePerformance
# samples per second
2D 3D 4D 5D 6D
O Our method(NVIDIA 8800 GTX)
4.06 M 555 K 42.9 K 2.43 K 179
O Boundary sampling[Dunbar & Humphreys 2006]
0.20 M X X X X
O Hierarchical dart throwing[White et al. 2007]
0.21 M X X X X
P Wang tiling[Kopf et al. 2006]
1 ~ 3 M X X X X
P Polyominoes[Ostromoukhov 2007]
>1 M X X X X
O: on the fly P: pre-computed dataset
Wang tiling[Kopf et al. 2006]
Corner tiling[Lagae & Dutre 2006]
P-pentominoes[Ostromoukhov 2007]
Our method
LimitationsLimitations
Only empirical, but no theoretical proof yet
Slow in high dimensions, adaptive sampling
Hard to control exact # of samples
No fine-grain sample ranking
e.g. progressive zoom-in [Kopf et al. 2006]
Euclidean space only (no manifold surface)
Future work for parallel algorithmFuture work for parallel algorithm
Sequential consistency [Lampert]
too strict for some applications
A looser sense of consistency?
parallel texture synthesis [Lefebvre & Hoppe 2005]
random number generation [Tzeng & Wei 2008]
AcknowledgementsAcknowledgements
Ares Lagae
Johannes Kopf
Victor Ostromoukhov
Eric Andres
Zhouchen Lin
Ting Zhang
Kun Zhou
Xin Tong
Jian Sun
Stanley Tzeng
Eric Stollnitz
Brandon Lloyd
Dwight Daniels
Jianwei Han
Baining Guo
Harry Shum
Reviewers