2Parallel Poisson Disk Sampling Li-Yi WeiMicrosoft
3Parallelism Processors are becoming parallel Intel Larrabee, NVIDIA, AMD/ATI, IBM/Sony Cell, etc.So are programming interfacesBSGP, CUDA, CAL, Ct, DX, OpenGL, etc.As well as applicationsTo take advantage of parallel environment
4Parallelization Traditional parallelization methods Sequential consistency [Lampert]- sorting, FFT, matrix, etc.Not all algorithms need to be seq-consistentGraphics, computer vision, image/video, statisticsApproximate solutions might sufficeOpportunities for new parallelization methods
5First pick: Poisson disk sampling A set of samples that areas random as possibleremain a minimum distance r away from each otherWhy pick this problem?important algorithmseemly non-parallelizable
6Importance of Poisson disk sampling Best quality for N samples [Cook 1986]Natural object distribution (retina cells, ecology)Blue noise spectrumvoid in low freqnoise in high freqApplications inRendering, imaging, geometry processing, etc.
7Optimal spectrum (given # samples) Blue noise: aliasing → noise regular gridjittered gridPoisson diskAll with 1600 samplessamplesspectrum
10Dart throwing [Cook 1986] Loop: O High quality X Slow speed Random sample from the entire domainAccept sample if not in conflict with existing onesO High qualityGround truthX Slow speedInherently sequential
11Speed 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
12Features of our approach Parallel computationEntirely on the fly(no pre-computed data)Good spectrum qualityLike dart throwing+ Adaptive sampling+ Any dimensionParallel GPU run time(in slow motion)Multi-resolution synthesis
13Our basic idea Samples from a grid 1 sample per grid cell Sample grid cells far apart in parallelWatch out for bias!Tricks to avoid bias
14Algorithm in gradual steps Uniform sampling, sequentialUniform sampling, parallelAdaptive sampling
15Sequential sampling Basic data structure Choose grid cell size d so that each cell has at most one sampler = minimum spacingn = dimensionInspired by[Bridson 2007]Texture synthesis
16Sequential sampling scan-line order + single resolution Bias!Scanline orderGrid sampling
17Sequential sampling random order + single resolution Removes scanline biasBut still grid-cell biasedscanlinerandom
18Sequential sampling random order + multi-resolution Removes both biasesscanline, grid1 level3 level5 levelscanlinerandom
19Sequential sampling Summary for bias removal Two sources of biasGrid samplingfixed by multi-resolutionTraversal orderfixed by random orderscanlinerandom1 level3 level5 level
20Sequential sampling Summary for each level low to highvisit cells in a random orderif cell contains no sampledraw one sample randomly from the cell domainadd the sample if not conflicting existing ones
21Parallel sampling Key insight for each level low to highvisit cells in a random orderif cell contains no sampledraw one sample randomly from the cell domainadd the sample if not conflicting existing onesvisit cells in parallel!
22Parallel sampling Key insight Sample cells sufficiently far away in parallel2D example:Cells apart cannot conflict with each othersplit cells → phase groups
23Phase group partition grid partition scanline order random partition random order6789348172651323458461257O easy to computeX bias! (scanline)O good qualityX hard to compute(sequential)O easy to computeO good quality
24Parallel sampling Summary for each level low to highfor each phase group pparallel: for each cell in pif cell contains no sampledraw one sample randomly from the cell domainadd the sample if not conflicting existing ones
25Adaptive sampling Slightly more involved than uniform sampling Parallelizable as well
26Adaptive sampling Multi-resolution as in uniform sampling But uses adaptive tree instead of uniform gridSubdivide only if possible to add more samples
29Sampling in higher dimensions Algorithm applicable to 2+ dimensionpower spectrumradial meanradial variance3D samples
30Performance O: on the fly P: pre-computed dataset # samples per second O Our method(NVIDIA 8800 GTX)4.06 M555 K42.9 K2.43 K179O Boundary sampling[Dunbar & Humphreys 2006]0.20 MXO Hierarchical dart throwing[White et al. 2007]0.21 MP Wang tiling[Kopf et al. 2006]1 ~ 3 MP Polyominoes[Ostromoukhov 2007]>1 M
32Limitations Only empirical, but no theoretical proof yet Slow in high dimensions, adaptive samplingHard to control exact # of samplesNo fine-grain sample rankinge.g. progressive zoom-in [Kopf et al. 2006]Euclidean space only (no manifold surface)
33Future work for parallel algorithm Sequential consistency [Lampert]too strict for some applicationsA looser sense of consistency?parallel texture synthesis [Lefebvre & Hoppe 2005]random number generation [Tzeng & Wei 2008]
34AcknowledgementsAres Lagae Johannes Kopf Victor Ostromoukhov Eric Andres Zhouchen Lin Ting Zhang Kun Zhou Xin Tong Jian SunStanley Tzeng Eric Stollnitz Brandon Lloyd Dwight Daniels Jianwei Han Baining Guo Harry Shum Reviewers
40Future work Parallelizing important algorithms Sequential consistency [Lampert]Dwarfs [Landscape of Parallel Computing 2006]- linear algebra, spectral, N-body, grids, Monte-CarloNew dwarfs that do not need to be seq-con?
42How to start a bar flight I saw people fighting in a bar for the dart board.I asked them why.They told me when they play together, their darts landed too close to each other.
43How to stop the bar flight Parallel GPU run time(slow motion)4M Poisson disk samples / secin parallel!I told them if they play by my rule, I can ensure their darts to land at least a certain distance away from each other.The run also runs on a GPU, producing more than 4 million darts per second in parallel.
45Poisson Disk Sampling Popular pattern Prior methods sequential [Cook 1986]Prior methods sequentiale.g. dart throwingA Poisson disk set contains samples that are randomly distributed, but remain a minimum distance away from each other.It is a popular sampling pattern, used in many graphics applications.However, it is also hard to generate. Existing methods are sequential, such as dart throwing, where samples are drawn randomly, but rejected if too close to existing samples, and accepted otherwise.
46Dart Throwing in Parallel Fast – 4 million samples/sec on GPUEntirely on the fly, no pre-computeGood quality – like (sequential) dart throwingTexture synthesis …To address this, I have figure out a method to throw darts in parallel.It is faster than existing methods, and produce more than 4 million samples per second.The quality is also good, just like traditional dart throwing.The algorithm is actually derived from texture synthesis (old dog with new tricks).
47Parallel sampling Summary for each level low to highfor each phase group pparallel: for each cell in pif cell contains no sampledraw one sample randomly from the cell domainadd the sample if not conflicting existing ones
48Parallel sampling Summary for each level low to highfor each phase group pparallel: for each cell in pif cell contains no sampledraw one sample randomly from the cell domainadd the sample if not conflicting existing ones