2 Parallel Poisson Disk Sampling Li-Yi WeiMicrosoft
3 Parallelism 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
4 Parallelization 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
5 First 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
6 Importance 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.
7 Optimal spectrum (given # samples) Blue noise: aliasing → noise regular gridjittered gridPoisson diskAll with 1600 samplessamplesspectrum
10 Dart 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
11 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
12 Features 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
13 Our 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
15 Sequential 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
16 Sequential sampling scan-line order + single resolution Bias!Scanline orderGrid sampling
17 Sequential sampling random order + single resolution Removes scanline biasBut still grid-cell biasedscanlinerandom
18 Sequential sampling random order + multi-resolution Removes both biasesscanline, grid1 level3 level5 levelscanlinerandom
19 Sequential sampling Summary for bias removal Two sources of biasGrid samplingfixed by multi-resolutionTraversal orderfixed by random orderscanlinerandom1 level3 level5 level
20 Sequential 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
21 Parallel 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!
22 Parallel sampling Key insight Sample cells sufficiently far away in parallel2D example:Cells apart cannot conflict with each othersplit cells → phase groups
23 Phase 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
24 Parallel 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
25 Adaptive sampling Slightly more involved than uniform sampling Parallelizable as well
26 Adaptive sampling Multi-resolution as in uniform sampling But uses adaptive tree instead of uniform gridSubdivide only if possible to add more samples
29 Sampling in higher dimensions Algorithm applicable to 2+ dimensionpower spectrumradial meanradial variance3D samples
30 Performance 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
31 Wang tiling Corner tiling P-pentominoes Our method [Kopf et al. 2006] [Lagae & Dutre 2006]P-pentominoes[Ostromoukhov 2007]Our method
32 Limitations 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)
33 Future 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]
34 AcknowledgementsAres 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
40 Future 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?
42 How 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.
43 How 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.
45 Poisson 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.
46 Dart 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).
47 Parallel 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
48 Parallel 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