Progressive Multi-Jittered Sample Sequences Per Christensen - - PowerPoint PPT Presentation

progressive multi jittered sample sequences
SMART_READER_LITE
LIVE PREVIEW

Progressive Multi-Jittered Sample Sequences Per Christensen - - PowerPoint PPT Presentation

Progressive Multi-Jittered Sample Sequences Per Christensen Andrew Kensler Charlie Kilpatrick Pixar Animation Studios EGSR 2018, Karlsruhe Overview Motivation Survey + evaluation of existing sample sequences 3 new algorithms:


slide-1
SLIDE 1

Progressive Multi-Jittered Sample Sequences

Per Christensen Andrew Kensler Charlie Kilpatrick

EGSR 2018, Karlsruhe

Pixar Animation Studios

slide-2
SLIDE 2

Overview

  • Motivation
  • Survey + evaluation of existing sample sequences
  • 3 new algorithms: pj, pmj, pmj02 samples
  • More evaluations: pixel sampling, area lights
  • Variations: blue noise, multi-class
slide-3
SLIDE 3

Motivation

  • RenderMan used to be off-line rendering (final movie frames)
  • But lately: also interactive rendering for faster feedback:

modeling, animation, lighting, …

  • This has consequences for sample pattern choices!
slide-4
SLIDE 4

Sample sets vs. sequences

  • Finite sets:
  • Need to know how many samples
  • No good for incremental rendering, adaptive sampling
  • Infinite sequences:
  • Every prefix has a good distribution
  • No need to know how many samples
slide-5
SLIDE 5

Sample sets vs. sequences

  • Incremental rendering: area light sampling

(same render time) 100 samples from set with 400 100 samples from sequence

slide-6
SLIDE 6

Sample sets

regular grid correlated multijitter multijitter jitter [Kensler13] quasi-random (“qmc”) sets Larcher- Pillichshammer Hammersley [Chiu94]

slide-7
SLIDE 7

Sample sets

regular grid correlated multijitter multijitter jitter [Kensler13] quasi-random (“qmc”) sets Larcher- Pillichshammer Hammersley [Chiu94]

slide-8
SLIDE 8

Sample sequences

random Sobol Halton blue noise quasi-random sequences (best candidate/ Poisson disk) [Ahmed17] [Perrier18] blue noise + stratification

slide-9
SLIDE 9

Sample sequences: randomized quasi- random

Sobol rot Halton rot Halton scr Cranley-Patterson rotations [Cranley76] Sobol xor scr Sobol owen scr bit-wise xor [Kollig02] [Owen97]

slide-10
SLIDE 10

Comparing sample sequences

  • How to measure “best”?
  • Definitely not lowest discrepancy — don’t get me started!
  • Better:
  • measure error when sampling various functions
  • confirm results in actual rendering: sample pixel positions,

area lights, …

slide-11
SLIDE 11

Initial tests of sequences

  • Sample simple discontinuous and smooth functions
  • Known analytical reference value
slide-12
SLIDE 12

Initial tests: discontinuous functions

  • Disk function: f(x,y) = 1 if x2 + y2 < 2/pi, 0 otherwise

x 1 Reference value: 0.5 1 y

slide-13
SLIDE 13

Initial tests: discontinuous functions

bad: O(N-0.5)

0.001 0.01 0.1 100 1000

error samples Disk function: sampling error

random N-0.5

slide-14
SLIDE 14

Initial tests: discontinuous functions

bad: O(N-0.5)

0.001 0.01 0.1 100 1000

error samples Disk function: sampling error

random best cand N-0.5

slide-15
SLIDE 15

Initial tests: discontinuous functions

0.001 0.01 0.1 100 1000

error samples Disk function: sampling error

random best cand Perrier rot Ahmed Halton rot Halton scr Sobol rot Sobol xor Sobol owen N-0.5 N-0.75

bad: O(N-0.5)

  • kay: O(N-0.75)
slide-16
SLIDE 16

Initial tests: discontinuous functions

  • Similar tests for triangle function and step function shows

high error for Sobol rot and Sobol xor, and Ahmed and Perrier

x 1

Reference value: 0.5

1 y x 1

Reference value: 1/pi

1 y

slide-17
SLIDE 17

Initial tests: smooth functions

  • 2D Gaussian function: f(x,y) = exp(-x2 - y2)

x 1

Reference value: ~0.557746

1 y

slide-18
SLIDE 18

Initial tests: smooth functions

bad: O(N-0.5)

1×10-5 1×10-4 1×10-3 1×10-2 1×10-1 100 1000

error samples Gaussian function: sampling error

random best cand N-0.5

slide-19
SLIDE 19

Initial tests: smooth functions

bad: O(N-0.5) good: O(N-1)

1×10-5 1×10-4 1×10-3 1×10-2 1×10-1 100 1000

error samples Gaussian function: sampling error

random best cand Perrier rot Ahmed Halton rot Halton scr Sobol rot Sobol xor N-0.5 N-1

slide-20
SLIDE 20

Initial tests: smooth functions

bad: O(N-0.5) good: O(N-1)

1×10-5 1×10-4 1×10-3 1×10-2 1×10-1 100 1000

error samples Gaussian function: sampling error

random best cand Perrier rot Ahmed Halton rot Halton scr Sobol rot Sobol xor Sobol owen N-0.5 N-1 N-1.5

excellent: O(N-1.5)

slide-21
SLIDE 21

Initial tests: smooth functions

  • Bilinear function f(x,y) = xy: same results

x 1

Reference value: 0.25

1 y

slide-22
SLIDE 22

Summary of initial tests

  • Owen-scrambled Sobol sequence is best:
  • no pathological error for discontinuities at certain angles
  • extraordinarily fast convergence for smooth functions
slide-23
SLIDE 23

Progressive (multi)jittering

  • New framework for stochastic sample generation
  • Three simple algorithms that progressively fill in holes in

increasingly fine stratifications

slide-24
SLIDE 24

Progressive jittered sequences — pj

  • No multi-jitter
  • Stratification goal: increasingly small squares

2x2 4x4

slide-25
SLIDE 25

Progressive jittered sequences — pj

  • Sample 1: random position
slide-26
SLIDE 26

Progressive jittered sequences — pj

  • Sample 2: opposite diagonal
slide-27
SLIDE 27

Progressive jittered sequences — pj

  • Sample 3: one of the two empty squares
slide-28
SLIDE 28

Progressive jittered sequences — pj

  • Sample 4: last remaining square
slide-29
SLIDE 29

Progressive jittered sequences — pj

  • Samples 5-8: opposite squares
slide-30
SLIDE 30

Progressive jittered sequences — pj

  • Samples 9-12: one of remaining squares
slide-31
SLIDE 31

Progressive jittered sequences — pj

  • Samples 13-16: last remaining squares
slide-32
SLIDE 32

Progressive jittered sequences — pj

  • And so on …
  • Simple! Similar to [Dippe85,Kajiya86]
  • See pseudo-code in supplemental material
  • Speed: 170M samples/sec (C++, single core)
  • for comparison: drand48() speed: 73M samples/sec
slide-33
SLIDE 33

Progressive multijittered — pmj

  • Stratification goal: squares, rows, and columns

4 samples 16 samples 8 samples

slide-34
SLIDE 34

Progressive multijittered — pmj

  • Sample 1: random position
slide-35
SLIDE 35

Progressive multijittered — pmj

  • Sample 2: opposite diagonal
slide-36
SLIDE 36

Progressive multijittered — pmj

  • Sample 3: one of the two empty squares + empty 1D strips
slide-37
SLIDE 37

Progressive multijittered — pmj

  • Sample 4: last remaining square + 1D strips
slide-38
SLIDE 38

Progressive multijittered — pmj

  • Samples 5-8: opposite squares (+ empty 1D strips)
slide-39
SLIDE 39

Progressive multijittered — pmj

  • Samples 9-12: one of remaining squares (+ empty 1D strips)
slide-40
SLIDE 40

Progressive multijittered — pmj

  • Samples 13-16: last remaining squares + 1D strips
slide-41
SLIDE 41

Progressive multijittered — pmj

  • And so on …
  • See pseudo-code in supplemental material
  • Speed: 11M samples/sec
  • for comparison: Owen-scrambled Sobol: 7M samples/sec
slide-42
SLIDE 42

Progressive multijittered (0,2): pmj02

  • Stratification goal: all base 2 elementary intervals

4 samples 16 samples 8 samples

slide-43
SLIDE 43

Progressive multijittered (0,2): pmj02

  • Very similar to pmj, but reject samples if in elementary

interval stratum that is already occupied

  • See pseudo-code for details
  • Speed: 39,000 samples/sec
  • too slow during rendering, so pre-generate tables
slide-44
SLIDE 44

Second comparison of sequences

slide-45
SLIDE 45

Pixel sampling

  • Each pixel is a “function” that we sample
  • Image resolution: 400x300
  • Reference images: 5002 = 250,000 jittered samples / pixel
  • Each error curve: average of 100 sequences
slide-46
SLIDE 46

Pixel sampling: checkered teapots

Checkered teapots on checkered ground plane

slide-47
SLIDE 47

Pixel sampling: checkered teapots

bad: O(N-0.5)

  • kay: O(N-0.75)

0.001 0.01 100 1000

rms error samples per pixel Checkered teapots: pixel sampling rms error

random best cand Perrier rot Ahmed Halton rot Halton scr Sobol rot Sobol xor Sobol owen pj pmj pmj02 N-0.5 N-0.75

slide-48
SLIDE 48

Pixel sampling: textured teapots

Textured teapots on textured ground plane discontinuities due to object edges smooth (texture filtering)

slide-49
SLIDE 49

Pixel sampling: textured teapots (1)

bad: O(N-0.5)

  • kay: O(N-0.75)

0.001 0.01 100 1000

rms error samples per pixel Textured teapot: pixel sampling rms error

random best cand Perrier rot Ahmed Halton rot Halton scr Sobol rot Sobol xor Sobol owen pj pmj pmj02 N-0.5 N-0.75

discontinuous

slide-50
SLIDE 50

Pixel sampling: textured teapots (2)

1×10-6 1×10-5 1×10-4 1×10-3 100 1000

rms error samples per pixel Textured groundplane: pixel sampling rms error

random best cand Perrier rot Ahmed Halton rot Halton scr Sobol rot Sobol xor Sobol owen pj pmj pmj02 N-0.5 N-1 N-1.5

smooth bad: O(N-0.5) good: O(N-1) excellent: O(N-1.5)

slide-51
SLIDE 51

Square area light sampling

Teapots on ground plane illum by square light source (no pixel sampling) penumbra: shadow discontinuities smooth illum

slide-52
SLIDE 52

Square area light sampling (1)

bad: O(N-0.5)

  • kay: O(N-0.75)

discontinuous

0.001 0.01 100 1000

rms error samples per pixel Square light: penumbra sampling rms error

random best cand Perrier rot Ahmed Halton rot Halton scr Sobol rot Sobol xor Sobol owen pj pmj pmj02 N-0.5 N-0.75

slide-53
SLIDE 53

Square area light sampling (2)

smooth bad: O(N-0.5) good: O(N-1) excellent: O(N-1.5)

1×10-5 1×10-4 1×10-3 1×10-2 100 1000

rms error samples per pixel Square light: full illum sampling rms error

random best cand Perrier rot Ahmed Halton rot Halton scr Sobol rot Sobol xor Sobol owen pj pmj pmj02 N-0.5 N-1 N-1.5

slide-54
SLIDE 54

Variations and extensions

  • Status: up until this point we have only shown that pmj02

is as good as Owen-scrambled Sobol

  • So what ??
  • BUT: within pmj framework we can add blue noise,

generate interleaved multi-class samples, …

slide-55
SLIDE 55

Pmj with blue noise

  • Simple variation: when generating a new pj/pmj/pmj02

sample, generate N candidate points and pick the one that’s most distant from previous samples

  • For example:

plain pmj pmj w/ blue noise

slide-56
SLIDE 56

Fourier spectra

plain pmj pmj w/ blue noise

slide-57
SLIDE 57

Pmj with blue noise

  • Not clear whether blue noise reduces error
  • But at least the patterns look more pleasing
slide-58
SLIDE 58

Pmj w/ interleaved multiclass samples

  • pj/pmj/pmj02 samples can be divided into two classes on

the fly. Each class almost as well stratified as full sequence.

  • For example:

64 256 16 4 1024

slide-59
SLIDE 59

Pmj w/ interleaved multiclass samples

  • Two classes can provide two independent estimates for

each pixel

  • Useful for adaptive sampling (work in progress)
slide-60
SLIDE 60

Supplemental material

  • Pseudo-code
  • More tests: different error metric, Gaussian pixel filter,

rectangular area light. (Disk light in separate tech report)

  • Comparing sample sets vs sequences (for non-incremental)
  • Discussion of discrepancy
slide-61
SLIDE 61

Conclusion + future work

  • Two contributions: fresh assessment of existing sample

sequences, new framework for sample generation

  • Error equal to best quasi-random sequence, but allows

blue noise, future variations

  • Future work: better pmj02 samples, faster generation
  • Hopefully even more optimal sample sequences ??
slide-62
SLIDE 62

Acknowledgements

  • Colleagues in Pixar’s RenderMan team
  • Brent Burley: Owen scrambling code
  • Victor Ostromoukhov, Matt Pharr, Alexander Keller,

Christophe Hery, Ryusuke Villemin, Emmanuel Turquin, Andre Mazzone, …

slide-63
SLIDE 63

“The generation of random numbers is too important to be left to chance”

— R. Coveyou