parallel poisson disk sampling li-yi wei microsoft

30
Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Upload: madison-combs

Post on 27-Mar-2015

235 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Parallel Poisson Disk SamplingParallel Poisson Disk Sampling

Li-Yi Wei

Microsoft

Page 2: Parallel 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

Page 3: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 4: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 5: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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.

Page 6: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 7: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Spatial samplingSpatial sampling)sin( 22 yx

regular grid jittered grid Poisson disk

(zone plate)

aliasing noisy

Page 8: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

MethodsMethods

Page 9: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 10: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 11: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 12: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 13: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Algorithm in gradual stepsAlgorithm in gradual steps

Uniform sampling, sequential

Uniform sampling, parallel

Adaptive sampling

Page 14: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 15: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Sequential samplingscan-line order + single resolutionSequential samplingscan-line order + single resolution

Bias!

Scanline order

Grid sampling

Page 16: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Sequential samplingrandom order + single resolutionSequential samplingrandom order + single resolution

Removes scanline bias

But still grid-cell biased

scanline random

Page 17: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Sequential samplingrandom order + multi-resolutionSequential samplingrandom order + multi-resolution

Removes both biases

scanline, grid

1 level 3 level 5 level

scan

line

rand

om

Page 18: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 19: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 20: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 21: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 22: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Adaptive samplingAdaptive sampling

Slightly more involved than uniform sampling

Parallelizable as well

Page 23: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

ResultsResults

Page 24: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Spectrum comparison - 2DSpectrum comparison - 2Dda

rt t

hrow

ing

our

met

hod

power spectrum (10 run) radial mean radial variance

Page 25: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Sampling in higher dimensionsSampling in higher dimensions

Algorithm applicable to 2+ dimension

3D samples

power spectrum

radial mean radial variance

Page 26: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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

Page 27: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

Wang tiling[Kopf et al. 2006]

Corner tiling[Lagae & Dutre 2006]

P-pentominoes[Ostromoukhov 2007]

Our method

Page 28: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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)

Page 29: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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]

Page 30: Parallel Poisson Disk Sampling Li-Yi Wei Microsoft

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