when Building Screen-Space Samplers

with Blue-Noise Error Distribution

Laurent Belcour

Eric Heitz

- Blue-noise screen-space sampler

LittlestTokyo - 4 spp

Random Scrambling

Heitz et al. [2019]

Random Scrambling

Heitz et al. [2019]

3D model by Glen Fox

Inset

Power Spectrum

- Blue-noise screen-space sampler
- Please refer to our 2019 talk

- Blue-noise screen-space sampler
- Please refer to our 2019 talk
- Many people seems to like it
- Already in Unity's HDRP and Lightmapper
- A lot of feedbacks and misunderstandings

Unity's Lightmapper

Inset

Power Spectrum

Scrambling mask

Sorting mask

Sobol samples

```
function screen_space_sampler(i, j, index, dimension)
{
// Fetch keys associated with pixel (i,j)
scramble = scrambling_keys(i,j)
sort = sorting_keys(i,j)
// XOR the index
index = index ^ sort
sample = sobol_owen(index, dimension)
// XOR the sample
sample = sample ^ scramble
return sample
}
```

2 texture fetches + 2 XORs

QMC Integration

See [Heitz et al. 2019] for more details

Test integrand

Test integrand

Scrambling mask

Sorting mask

Test 'rendering'

Misunderstanding #1

👨💻

I bet the **blue-noise won't work on smooth integrands** since it is optimized for discontinuities.

@pedanticMathematician - very late in the night.

Test 'rendering'

Test 'rendering'

=

$$\begin{bmatrix} \\ \vdots \\ \vdots \\ \\ \end{bmatrix}$$

Vector of realization

- We are swapping
**2**!^{16}D vectors- Requires a specific loss

**Equivalent**to swapping PCA coordinates**Eigen-test integrands**from PCA- They are quite smooth!

$$\begin{bmatrix} \\ \vdots \\ \vdots \\ \\ \end{bmatrix} = R_\theta \begin{bmatrix} \\ \vdots \\ \vdots \\ \\ \end{bmatrix}$$

$$ f_3(x)$$

$$ f_{49}(x)$$

$$ f_0 $$

$$ f_1 $$

$$ f_2 $$

$$ f_3 $$

$$ f_4 $$

- But
**not that smooth**...

$$ f_0 $$

$$ f_1 $$

$$ f_2 $$

$$ f_3 $$

$$ f_4 $$

$$ f_0 $$

$$ f_1 $$

$$ f_2 $$

$$ f_3 $$

$$ f_4 $$

- But
**not that smooth**...- Impacts the quality of the blue-noise

Sobol+XOR

Independent

- But
**not that smooth**...- Impacts the quality of the blue-noise

- Difference seems due to scrambling
- Sobol+XOR produces few variations
- Independent produces an infinite set sequences

- Works with a different scrambling
- Wait!
**Cranley-Patterson Rotations???**

- Wait!

Sobol+XOR

✔ convergence

✘ blue-noise

✘ blue-noise

Independent

✘ convergence

✔ blue-noise

✔ blue-noise

Sobol+CPR

✘ convergence

✔ blue-noise

✔ blue-noise

Question #1

- Rank-1 Lattices [Keller 2019]

- Rank-1 Lattices [Keller 2019]
- Wrapped 1D points
- Empirically
**do no alter convergence**

- But provides better results
- Large space of variations

Request #1

- A Genetic Algorithm
- Swap random scrambles according to loss
- Extremely
**slow to converge!**

- Start with almost perfect mask
- Only one pixel to move
- We only need to randomly find it ...

- Can we try all possible swap?
- We need a
**collisions-free**scheme - We need to
**preserve neighbourhoods**

- We need a

Dither tile

Dither tile

scramble pairs

{

{

{

{

{

{

{

{

- Still not optimal w.r.t the loss
- Permutation might
**break neighboors**

- Permutation might
- Not a big deal
- Solution: only
**permute a half of the pairs** - We even got
**simulated annealing for free**

- Solution: only
- Allows quick iteration
**~9 times faster**than our CPU-sequential version

- Available for all!
- Check our projet webpage
- Implementation by Sylvain Durand

Dither tile

Question #F

- Assessing blue-noise quality is
**perceptual**- Depends on the medium (screen, printed paper, ...)
- Depends on the conditions (resolution, ...)
- We need a
**numerical criterion**

- Assessing blue-noise quality is
**perceptual**- Depends on the medium (screen, printed paper, ...)
- Depends on the conditions (resolution, ...)
- We need a
**numerical criterion**

- The idea is to
**look at denoising**[Chizhov et al. 2020]- Blue-noise improves L2 after denoising
- But how can we make it scene agnostic?

error after blurring

- Dyadicity is a hot topic
- Its only about per pixel convergence
- Misses
**convergence after denoising** - Maybe not so important?

- Misses

Request #2

🧑🎓

It tried it using BDPT, it doesn't work! Can you debug my code?

@GeekyStudent - 5min before sending his homework.

- BDPT: Dimensions
**must match**- Sub-paths must share random numbers
- Not vanilla!

- More dimensions
- Not best quality for direct illumination
- Takes time to optimize

- We advise to pad dimensions
- We only optimize
**2D tiles** **Pad**with random tile shifts

- We only optimize
- More samples
**Tune your sampler**to you SPPs!

- We
**improved**our 2019 screen-space sampler**Better blue-noise**of rendered frames**Better quality**after denoising- Still
**efficient**and**compatible**with real-time

- Our
**contributions**- New
**insights**on the optimization process **Changed**the sequence and scrambling**Accelerated**optimization using GPU

- New
- Thanks to
**you**- Interaction with a lot of interested folks