Pages

Wednesday 27 October 2010

Improved Supersampling and Antialiasing

I decided to improve the supersampling/antialiasing methods in my raytracer. Previously I applied a blur filter to the image after upsizing and then returned the image to its original size. This is not a very realistic or accurate antialiasing method so I decided to add some real supersampling to the raytracer. The two images below both have the same resolution, but the image on the right appears more realistic with fewer jagged edges. This is achieved by firing multiple rays for each pixel, and based on their relative position, calculate their contribution to the colour of that pixel. The obvious downside to this method is a largely increased rendering time, proportional to the number of rays per pixel. This means that 16 rays per pixel takes 16 times longer than a single ray. Quality definitely comes at a computational price. I think randomising the rays may improve the antialiased image quality, instead of firing them across a uniform grid and I will look into that.


The next updates are likely to be cloud maps and a sun object (infinite directional lighting).

No comments:

Post a Comment