Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google...

40
Blue Noise Sampling via Delaunay Triangulation Zoltan Szego †* , Yoshihiro Kanamori , Tomoyuki Nishita The University of Tokyo, *Google Japan Inc., University of Tsukuba

Transcript of Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google...

Page 1: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Blue Noise Sampling via Delaunay Triangulation

Zoltan Szego†*, Yoshihiro Kanamori‡, Tomoyuki Nishita†

†The University of Tokyo, *Google Japan Inc., ‡University of Tsukuba

Page 2: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Contents

Background Related Work Our Method Results Conclusions and Future Work

Page 3: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Contents

Background Related Work Our Method Results Conclusions and Future Work

Page 4: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Background

Sampling is essential in CG rendering, image processing, object

placement etc.

HalftoningLight sampling on HDR environment maps

Page 5: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Background

Desired sampling patterns Equally distant samples … e.g. Poisson disk Low energy in low frequency of the Fourier

spectrum … Blue noise

cf. Totally randomEqually distant

→ Blue noise → White noise

Page 6: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Background

Blue noise property Observed in natural objects Considered optimal for human eyes

Layout of human eye photoreceptors [Yellott, 1983]

Page 7: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Background

Quality measures for blue noise spectra Radial average power spectrum▪ The larger the central ring, the better

Anisotropy▪ The lower and flatter, the better

Spectrum

Radial averagepower spectrum

Anisotropy

ring

ring

Page 8: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Our Goal

Efficient, high-quality blue noise sampling Adaptive sampling should be supported

Uniform

Adaptive

Page 9: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Our Goal

Support for sampling in various domains 2D 3D (volumetric sampling) On curved surfaces (spheres, polygonal

meshes)

2D 3D On curved surfaces

Page 10: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Contents

BackgroundRelated Work Our Method Results Conclusions and Future Work

Page 11: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Related Work

Two major approaches Dart throwing▪ Random sampling of equidistant samples

Tiling▪ Tiling of precomputed samples

Page 12: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Related Work

Dart throwing [Cook, 1986] Used for distributed ray tracing High computational cost Quality improvement: Lloyd’s relaxation

… more costly Parallel Poisson disk [Wei, 2008]

GPU-based acceleration # of samples cannot be

determined Only supports 2D and 3D

Our method•# of samples can be specified• Supports 2D, 3D, and curved surfaces

Page 13: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Related Work

Wang tiles [Kopf et al., 2006] Requires precomputation Low quality

Polyominoes [Ostromoukhov, 2007] Requires complicated precomputation

Our method• High quality• No precomputation

Page 14: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Contents

Background Related WorkOur Method Results Conclusions and Future Work

Page 15: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Overview

Input: seed points Given by the user

Output: blue noise samples

Features: Deterministic (reproducible with the

same seeds) No precomputation Supports various sampling domains

Page 16: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Overview

Sequentially sample atthe most sparse region The largest empty

circle problem[Okabe et al., 2000]

Can be solved using Delaunay triangulation▪ Correspond to

finding the largest circumcircle in Delaunay triangles

2D example

Page 17: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Basic Algorithm

Loop:1. Find the largest

empty circle2. Add a sample

at the center

2D example

Page 18: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Basic Algorithm

Loop:1. Find the largest

empty circle2. Add a sample

at the center3. Update

Delaunay triangles

2D example

Page 19: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Basic Algorithm

Acceleration for search: Use of heap To find the largest circumcircle

in O(1) Costs for insert / delete:

O(log N) Support for adaptive sampling

Scale the radii stored in the heapusing density functions

The greater the density, the higher the priority

Heap of circumcircles’ radii

Density function

Page 20: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Artifact #1

Regular patterns peaks in the spectrum

Page 21: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Modification #1

Reason of the artifacts Iterative subdivisions of equilateral

triangles

Our solution:1. Detect an equilateral triangle2. Displace the new sample

from the center of its circumcircle(see our paper for details)

Page 22: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Artifact #2

Sparse samplesat boundaries

Reason Very thin triangles

around boundaries

Our solution: Use of periodic boundaries

Tiled samples(tiled just for illustration)

Page 23: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Modification #2

Periodic boundaries Toroidal (torus-like) domain

Page 24: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Modification #2

Pros: Sparse regions disappear Edge lengths of triangles become

balanced▪ Overall centers of circumcircles lie within

their triangles▪ Allows us to specify the position of the new

sample in O(1)

Cons: A little additional cost for modifying

coordinates

Page 25: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Parallelization

Exploit multi-core CPUs Uniform subdivision

of 2D domain

Further subdivision Costs: O(N log N)

4 M log M < N log N (if M = N/4) 4x4 subdivision is the fastest

for a 4-core CPU▪ 1.69 times faster for 100K samples

1 2

3 4

1

2

3

4

1

2

3

4

1

2

3

4

1

2

3

4

Page 26: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Sampling in 3D

3D domain: [0, 1)3

2D → 3D Triangles → Tetrahedra

(Delaunay Tetrahedralization)

Circumcircles→ Circumspheres

Similar to 2D algorithm

Delaunay tetrahedralization

Page 27: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Sampling on Curved Surfaces

Sampling domain: Spherical surfaces Polygonal mesh surfaces

Initial seeds: Vertices of simplified mesh

Similar to 2D New samples are projected

onto the surface

Samples on a sphere

Simplified

Given mesh

Initial seeds

Page 28: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Contents

Background Related Work Our MethodResults Conclusions and Future Work

Page 29: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Results

Uniform sampling

# of samples : 20KTime : 92 ms

Experimental environment:Intel Core 2 Quad Q6700 2.66GHz, 2GB RAM

Page 30: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Comparison – 50,000 samples –

Our method: 378 msec Wang tiles [2006]: 1.35 msec

Radial average Radial averageAnisotropy Anisotropy

Page 31: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Comparison – 50,000 samples –

Radial average Radial averageAnisotropy Anisotropy

Our method: 378 msec Dart throwing [2007]: 420 msec

ours

Page 32: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Results

20K samples in 3D

Page 33: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Results

Spectra for 10K samples in 3D

Low energy spheres in the center → blue noise property

Page 34: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Results

Sampling on a sphere Initial mesh: an equilateral

octahedron

Density functionDense Sparse

Page 35: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Results

Sampling on HDR environment maps Blighter region → denser samples

Page 36: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Contents

Background Related Work Our Method ResultsConclusions and Future Work

Page 37: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Conclusions

High-quality blue noise samplingusing Delaunay triangulation Find centers of largest circumcircles

of Delaunay triangles Adaptive sampling by scaling

circumcircles’ radii Support for sampling on various

domains:2D, 3D, and curved surfaces

Page 38: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Future Work

GPU acceleration using CUDA

Fast Lloyd’s relaxation using the connectivity of Delaunay triangles

Page 39: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.

Thank you

Page 40: Zoltan Szego †*, Yoshihiro Kanamori ‡, Tomoyuki Nishita † † The University of Tokyo, *Google Japan Inc., ‡ University of Tsukuba.