What's the relation between Cycles' sampling pattern and the pixel filter?
Simple Answere


  What is the link between these settings?


The Pixel Filter randomly changes the coordinte of every sample with the given distribution, meaning for example: When the Sobol Sampling Pattern samples near the edge of the pixel, the neighbouring pixel might be lit instead with a rather high probability. This is used to get rid of aliasing on the sharp edge of very bright objects, like mesh lights.

Look at these examples with a mesh light with a strength of 100. You can see the noisy Gauss distributed white dots during the whole sampling process.

Gauss with width of 0:



Gauss with width of 2:



Gauss with width of 10:



With more samples the last two would both result in a smooth image. The higher the width of the Gauss the less antialiasing you get, but at the cost of loosing some sharpness.


  Could one use a sampling pattern that goes outside of the pixel boundaries to combine the sampling pattern and filtering into a single procedure?


Actually, this is a not a bad idea, but I never heard of any renderer doing this. Convoluting the Sampling Pattern with the Pixel Filter and using the resulting function as the new Sampling Pattern should result a render that converges to the same image.

This is however not desired probably because being able to separately choose these two functions rather than from a huge list of all possible convolutions is better. And the common Pixel Filter functions are used in other type of renderers, where sampling is done over the whole image rather than pixel-by-pixel, and one sample really lits multiple pixels, which is not stochastically sampled but fully calculated, like LuxRender.

Mathematical Explanation

First Possibility

Given the i-th columns k-th pixel indexed from 0, the Sobol Sampling Pattern gives a uniform pseudo random 2D vector (x, y) inside the [i, i + 1) x [k, k + 1) set, which is the mathematical notation for the square of the pixel. The rendering engine traces the related direction and returns with the color. The Gauss Pixel Filter samples a Gaussian distributed pseudo random 2D vector (dx, dy). The pixel containing the (x + dx, y + dy) vector gets lit with the traced color.

Probably this is done in Blender.

Second Possibility

Given the i-th columns k-th pixel indexed from 0, the Sobol Sampling Pattern gives a uniform pseudo random 2D vector (x, y) inside the [i, i + 1) x [k, k + 1) set, which is the mathematical notation for the square of the pixel. The Gauss Pixel Filter samples a Gaussian distributed pseudo random 2D vector (dx, dy). The rendering engine traces the (x + dx, y + dy) related direction and returns with the color. The original pixel gets lit with the traced color.

Why these result the Same

For every x, y, dx, dy where (x, y) is contained in the i-th columns k-th pixel pixel and (dx, dy) is a possible outcome of the Pixel Filter, the events below have the same probability:

First Possibility: The Sampling Pattern sampled (x, y) in the mentioned pixel and the Pixel Filter sampled (dx, dy).

Second Possibility: The Sampling Pattern sampled (x + dx, y + dy) in some pixel and the Pixel Filter sampled ( - dx, - dy).

These events have the same probability because all Sampling Patterns have uniform distribution and all Pixel Filters have a symmetrical distribution.

This means that both possibilities converge to the same image.