Tuesday 19 July 2011

Anti-Aliasing

From what I learned in class, there are a few ways to perform anti-aliasing and they all involved super-sampling, or shooting more than one ray at a particular region and averaging the resulting colours. My tracer has the ability to render with no anti-aliasing, grid sampling, random/stochastic sampling, or jitter sampling.
Grid sampling fires one ray at each cell of a pixel divided into a regular grid. Random sampling fires a bunch of rays at the pixel randomly. Jittering combines the two by firing one ray at each cell of the pixel, but it's position in the cell is random.
Beyond the distribution method, the program provides an option of sample sizes. Sample size determines the number of rays that are fired at each pixel. The sample sizes range from 3x3 to 11x11.
To illustrate, here is a simple image with no anti-aliasing:


Now here is the same image rendered with a 3x3 grid distribution. You can see the edges of the spheres are smoother (you might have to click on the image to zoom in and see the difference).
And finally, the same image with an 11x11 jitter distribution. It is smoother than the above image, but not by much. It also takes forever to render.

No comments:

Post a Comment