CS413 Assignment 4: Texture and Antialiasing

General Configurations:
# Light is at [4,4,4], color [1,1,1]
# Eye [-3,3,3], Look-at [0,-1,0], Up [0,0,1]
# Image plane is at [0,4,2] (distance of 1 from eye), Dimensions 2x2 (width and height)
# Development Platform: Visual C++ 8, Release build
Source Code: reTracer

Results

Results from testing different techniques to sample and filter the pixels is given below. Click on the image to see the image in actual resolution. The scene were rendered from a different view point than the previous assignment.

Test #1

First I rendered the image using multiple samples (nxn) uniformly distributed over the pixel area:

Samples 4 Samples Per Pixel 16 Samples Per Pixel 36 Samples Per Pixel 128 Samples Per Pixel
Images

Discussion: As seen from the images, as we trace more and more rays per pixel the jaggies get less apparent. However, in the horizon their is still some aliasing present, since a regular, uniform sample distritribution was used for each pixel.

Test #2

Next, I used Random and Jittered sampling over the pixel area:

Samples 36 (6x6) Samples Per Pixel 128 (11x11) Samples Per Pixel
Random
Jittered

Discussion: To resolve better results than before a Random or Jittered sample distribution was used for the pixels. This introduces some noise generated in a orderly pattern that makes the horizon of the plane much plane. Also it reduces the appearance of jaggy aliases. Obviously Jittered sampling works much better than Random, and introduces much less and orderly noise.

Test #3

Finally, I tried applying a filter over 2x2 dimensions of a pixel area:

Samples (11x11) Box Filter Triangle Filter
Images

Discussion: In this test I added some filtering function to re-distribute the samples over 2 unit pixel area. In box filtering the samples are just moved over 2x2 area from 1x1. And the tringle filter re-distributes the pixels from 1x1 to 2x2 pixels using a linear decline from the center. The result of applying a filter blurs the jaggy edges that some times makes the appearance better. As seen from the images the more the resolution the better the filter works.

Test #4

If a same sample distribution is used for all the pixels aliasing can still occur, as seen in the checker boarded plane in the horizon. So, I experimented by generating a new sample set for each pixel. This is more time consuming but produces much better results, as it replaces aliasing with noise, that looks nicer in the horizon.

Samples (4x4) One set of samples for each pixel Different set of samples for each pixel
Images

Discussion: In all the tests above I was using one set of samples for each pixels. This do not work very well for all areas of the scene. Generating a new set of samples for each pixels makes the horizong of the plane look much better.