Mark Schmelzenbach
Homework #3
CS684

This assignment demonstrates various sampling techniques. Two different images were used as baseline pictures. The first was a 2D grey-scale plane described by the following function:

L(x,y)=(0.5+0.5*fade*sin(2*Pi*a*e^(5*a)))
where
fade=(1-y/ny)^3
a=x/nx

The second image is a 3D scene of the classic infinite checkerboard. The observer is located at <0,0,1> and is looking at <1,1,0>, with a field-of-view of 90 degrees. The checkerboard plane itself is on the xy plane, and z=0.

Five sampling techniques were used on each of the pictures.
1. Regular Sampling
2. Random Sampling
3. Jittered Sampling
4. Mulitjittered Sampling
5. Adaptive multijittered Sampling

The first 4 sampling techniques used 16 rays per pixel, in the following ways (notice that these are simply representitive cases, actually each pixel is sampled differently--er, except regular sampling, of course):

Regular sampling took a sample in the center of each subpixel.

Random sampling took 16 random samples within the pixel.

Jittered sampling took a stratified random sample within the pixel.

Multijittered sampling generated 2 1D functions, then paired the values

The adaptive sampling method was created as follows:
A 2x2 multijittered sample was taken, and then a 3x3 multijittered sample was taken. If the average values differed by more than a certain threshold, then a 4x4 and a 5x5 theshold was taken. This process continues until the difference is less than the threshold or a 32x32 sample is taken.

This method is terribly inefficient in high frequency areas, since the algorithm must build up to 32x32 (1024 samples at this level), requiring the program to take on the order of 5000 samples total for one pixel!

However, only a small portion of the test images forced the adaptive scheme to its highest level... notably the bottom right of the 2D image and along the horizon of the 3D image.

Originally, I was planning to write a recursive sampling technique (take the four corners and the center of the pixel, if they are too different, break down the appropriate new box, etc)... but I felt that the nature of the images would cause this technique to miss certain features.

(Note: all images were generated with a gamma of 1.7)

First, the 2D function:

Regular Sampling:

Random Sampling:

Jittered Sampling:

Multijittered Sampling:

Adaptive Sampling:

Now, the checkerboard scene:

Regular Sampling:

Random Sampling:

Jittered Sampling:

Multijittered Sampling:

Adaptive Sampling:

For a larger image of this scene, click here.