CS 6620 Fall 2014 - Project 8

Test Scene with texture filtering: 4.717s


Test Scene without texture filtering: 4.707s



The above images show the benefits of texture filtering: without texture filtering we spend a lot of time supersampling the scene to anti-alias the textures (and don't even do such a good job at it!), while in the scene with filtering we need to supersample in far fewer locations and have nicely filtered textures. Although the difference in render time for these scenes is pretty negligable a lack of texture filtering would probably be a bigger performance hit for more complicated scenes and we'd need to take more samples to have comparable filtering with the scene that does have texture filtering. Both images were rendered using a minimum of 8 samples per pixel and a max of 64 samples per pixel when supersampling.

I did also get my checkerboard anti-aliasing working by scaling my ray differentials to behave properly when taking multiple samples per pixel.

Filters and Bugs

I implemented a few reconstruction filters but am having an issue with filters besides Mitchell-Netravali when using adaptive sampling resulting in rough artifacts on areas where it's determined that supersampling is needed. These artifacts don't appear when using the same sampling pattern non-adaptively (eg. just take max spp always) so I think there's something related to the varying sampling rate that causes this, but at the moment I don't know what/why/how. Each filter covers a 3x3 pixel area on the image and when writing a sample we center the filter at each pixel and write the sample color multiplied by the filter weight to each pixel covered by the filter. I also track the sum of the weights of all samples added to each pixel and when finding the final color divide the color by the total weight. Below are some comparisons of the different filters so you can check out the issue and jaggies, let me know if you've got any ideas!

Non-adaptive Sampling with 64spp

No filter
Box filter
Triangle filter
Gaussian filter with alpha = 2
Lanczos filter with a = 3
Mitchell-Netravali filter with b = 0.33, c = 0.33

Adaptive Sampling: min 8spp, max 64spp

No filter
Box filter
Triangle filter
Gaussian filter with alpha = 2
Lanczos filter with a = 3
Mitchell-Netravali filter with b = 0.33, c = 0.33

Hardware Used and Other Details

Render times were measured using std::chrono::high_resolution_clock and only include time to render, ie. time to load the scene and write the images to disk is ignored. The images were rendered with adaptive anti-aliasing performed by taking 8 samples and using the contrast of their luminance to decide whether we need additional sampling, taking at most 64 samples per pixel for those that need super sampling.

CPU: Intel i5-2500K @ 4.0GHz, 4 hardware threads
RAM: 8GB 1600MHz DDR3
Compiler: gcc 4.9.1 x86_64 (on Windows, built by MinGW-W64 project)
Compilation Flags: -m64 -O3 -march=native -flto