Math 155B - FINAL PROJECT

Student: Matthew Yang

Implementation of Distributed Raytracing

For my final project, I decided to implement a couple kinds of distributed raytracing: depth of field and antialiasing.

 

To create the depth of field effect, I jittered the eye positions for each pixel a various number of times and averaged the results. I found that with a small amount of supersampling (less than 20 times) the blurred areas of the image appeared very rough and pixelated. Increasing the number of eye positions alleviated this problem but at the cost of MUCH longer rendering time. The other problem I faced was with the amount of blurring, or the maximum distance to jitter the eye positions. I found that using the size of the window to determine the amount of blur allowed for the window to be resized while still keeping the depth of field effect.

 

For the antialiasing part, I jittered the actual pixel positions. This has the effect of blurring the borders between colors to eliminate the jagged edges that normally occur. Comparing the pictures below is the best way to see this technique in action.

 

The files I edited were “RayTrace.cpp” and “RayTraceData.cpp”. The controls are the same, except that pressing ‘d’ while in OpenGL mode renders the scene using the distributed raytracing methods above.  

SCREENSHOTS

The scene without any effects.

 

 

Now with antialiasing and depth of field. Notice how there are no longer any jagged edges around the spheres.

 

 

Here is the scene again with more blurring. Notice that there is a lot of pixilation around the front sphere.

 

Finally, here’s the same scene with about twice as much sampling. The pixilation is much less pronounced here.