<< Chapter < Page Chapter >> Page >

In computer graphics, ray tracing is a technique used to project three dimensional space onto a two dimensionalplane as seen from an eye point. The basic ray tracing algorithm is to fire a ray from the eye point through every pixel in thedisplay. If the ray intersects something in the scene, keep the closest intersection point and calculate the intensity at thatpoint. The following novel algorithm which we designed, the Stochastic Gain Control operator, was inspired by distributed ray tracing.

Ron Goldman, “Lecture 17: Recursive Ray Tracing” (Houston: Rice University, 25 Oct 2006) 1.
One problem though is that, since each pixel really represents a fixed area of the sceneinstead of a fixed point, one sample for the whole pixel may not capture all of the information in that area. This leads to jaggededges often called aliasing.
Arnold Martin, “Distributed Ray Tracing” (Worcester: Worcester Polytechnic Institute, 1999)<http://www.owlnet.rice.edu/~comp360/lectures/RayTracing.pdf>.
Therefore, anti-aliasing techniques are used to soften the edges in a raytracer.

One such technique is called supersampling. By firing multiple, evenly spaced rays over the pixel area, theintensities calculated for each ray are averaged to find the overall intensity in the pixel.

Donald Hearn and M. Pauline Baker, Computer Graphics (2nd ed. Englewood Cliffs: Prentice Hall, 1994)538-9.
This is similar to the Pattanaik-Yee Adaptive Gain Control operator. Unfortunately, by uniformly sampling each pixel,the image may appear blurry in some parts or have rigid variations in other parts. This can be solved by using distributed raytracing.

In distributed ray tracing, rays are randomly fired over a finite pixel area and then averaged together. Surfacelighting is usually defined as multiple integrals, so using a Monte Carlo method to sample the integrand at randomly chosen pointsresults in a better approximation. While the aliasing is removed, it will lead to a small amount of noise in the picture, but overallthe picture quality will be improved.

Hearn 541.

Using this idea, modifications can be made to the averaging local operator. As the window sweeps across theimage, randomly selected pixels are averaged together. Since the pixels are randomly selected, the same pixel may be selected morethan once. Thus, some pixels are weighted more than others. This acts as a weighted pixel mask or pseudo Gaussian filter.

If only one pixel is randomly selected inside the window, the resulting image will be very blurry. This makessense because while sliding the window the same pixel may have sampled repeatedly and at the same time failed to sample others. Asthe number of pixels selected increases, the image becomes sharper and sharper compared to the image produced by the Pattanaik-YeeAdaptive Gain Control operator. However, if more than 125% of the pixels in the window are selected, there will be no noticeablechange.

1 pixel sampled from a 3-by3 pixel window
5 pixels sampled from a 3-by3 pixel window
10 pixels sampled from a 3-by3 pixel window

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Elec 301 projects fall 2006. OpenStax CNX. Sep 27, 2007 Download for free at http://cnx.org/content/col10462/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Elec 301 projects fall 2006' conversation and receive update notifications?

Ask