310 likes | 555 Views
Parallel Poisson Disk Sampling. Li-Yi Wei Microsoft. Parallelism. 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.
E N D
Parallel Poisson Disk Sampling Li-Yi Wei Microsoft
Parallelism • 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
Parallelization • 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 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 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 All with 1600 samples samples spectrum regular grid jittered grid Poisson disk
Spatial sampling (zone plate) aliasing noisy regular grid jittered grid Poisson disk
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 Dart throwing [Cook 1986]
Speed 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 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 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 steps • Uniform sampling, sequential • Uniform sampling, parallel • Adaptive sampling
Sequential 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
Bias! Scanline order Grid sampling Sequential samplingscan-line order + single resolution
Removes scanline bias But still grid-cell biased Sequential samplingrandom order + single resolution scanline random
Sequential samplingrandom order + multi-resolution • Removes both biases scanline, grid scanline random 1 level 3 level 5 level
Sequential samplingSummary for bias removal • Two sources of bias • Grid sampling fixed by multi-resolution • Traversal order fixed by random order scanline random 1 level 3 level 5 level
Parallel samplingKey insight • Sample cells sufficiently far away in parallel • 2D example: • Cells apart cannot conflict with each other • split cells → phase groups
Phase group partition grid partition random order random partition grid partition scanline order 6 7 8 6 7 8 3 2 8 4 2 7 1 1 3 2 3 2 3 4 5 3 4 5 6 6 3 4 1 1 8 4 6 8 4 6 0 1 2 0 1 2 5 5 9 0 9 0 5 5 0 7 0 7 1 6 7 8 3 2 8 4 2 7 3 2 1 3 2 6 7 8 6 6 3 3 4 5 4 1 1 8 4 6 8 4 6 3 4 5 0 7 0 5 0 1 2 5 5 0 7 5 0 7 8 0 1 2 O easy to compute X bias! (scanline) • O good quality • X hard to compute • (sequential) O easy to compute O good quality
Parallel 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 sampling • Slightly more involved than uniform sampling • Parallelizable as well
Spectrum comparison - 2D dart throwing our method radial variance power spectrum (10 run) radial mean
Sampling in higher dimensions • Algorithm applicable to 2+ dimension power spectrum 3D samples radial mean radial variance
Performance 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
Limitations • 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 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]
Acknowledgements • 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