by Allen Martin
Traditional ray tracing systems suffer from aliasing artifacts. The term aliasing in computer graphics is loosely defined. It can mean almost anything unwanted in the rendered image. Typically aliasing is used to describe jagged edges. In the real world things are not quite as perfect as in a computer generated world - edges and boundaries are not as sharp, reflections are not as perfect, and things can be in and out of focus. If a renderer is being used to approximate reality then these things must be taken into account.
Distributed ray tracing uses oversampling to reduce aliasing artifacts. Oversampling is a process where instead of sampling a single value, multiple samples are taken and averaged together. The location of where the sample is taken is varied slightly so that the resulting average is an approximation of a finite area covered by the samples. This is called an anti-aliasing method.
Distributed ray tracing uses a slightly better approximation for the illumination and reflectance integrals. The idea is based in the theory of oversampling. Instead of approximating an integral by a single scalar value, the function is point sampled and these samples are used to define a more accurate scalar value. The practical benefits of this are:
Penumbras (soft shadows)
Depth of field
Glossy surfaces are generated in distributed ray tracing by randomly distributing rays reflected by a surface. Instead of casting a single ray out in the reflecting direction, a packet of rays are sent out around the reflecting direction. The actual value of reflectance can be found by taking the statistical mean of the values returned by each of these rays.
This method can also be used to generate specular highlights by using area light sources. If rays that reflect off a surface hit a light source, they will add to the specular component of the surface illumination. This can replace the specular component of the Phong model.
Traditional ray tracing is good at representing perfectly transparent surfaces, but poor at representing translucent surfaces. Real surfaces that are translucent generally transmit a blurred image of the scene behind them. Distributed ray tracing achieves this type of translucent surface by casting randomly distributed rays in the general direction of the transmitted ray from traditional ray tracing. The value computed from each of these rays is then averaged to form the true translucent component.
Distributed ray tracing attempts to approximate soft shadows by modeling light sources as spheres. When a point is tested to see if it is in shadow, a set of rays are cast about the projected area of the light source. The amount of light transmitted from the source to the point can be approximated by the ratio of the number of rays that hit the source to the number of rays cast. This ratio can be used in the standard Phong lighting calculations to scale the amount of light that hits a surface.
Distributed ray tracing creates depth of field by placing an artificial lens in front of the view plane. Randomly distributed rays are used once again to simulate the blurring of depth of field. The first ray cast is not modified by the lens. It is assumed that the focal point of the lens is at a fixed distance along this ray. The rest of the rays sent out for the same pixel will be scattered about the surface of the lens. At the point of the lens they will be bent to pass through the focal point. Points in the scene that are close to the focal point of the lens will be in sharp focus. Points closer or further away will be blurred.
Distributed ray tracing can simulate this blurring by distributing rays temporally as well as spatially. Before each ray is cast, objects are translated or rotated to their correct position for that frame. The rays are then averaged afterwards to give the actual value. Objects with the most motion will have the most blurring in the rendered image.
It was found in the implementation of distributed ray tracing that the number of rays generated can explode exponentially. If N rays are cast initially and then those rays reflect off a glossy surface and each generate N more rays, and each of those hit an object that has to be checked for shadow by casting N more rays, etc. then the computation time of distributed ray tracing can quickly become unmanageable. A mechanism that can cap the number of rays generated without greatly diminishing the quality of the rendered image would be worth studying.
Example 2 - This example shows a technique for generating soft shadows that is not based on distributed ray tracing. This technique is based on uniformly sampling an area light source. Although the penumbra and umbra of the shadow are clearly visible, the variation between them is rigid.
Example 3 - This example shows a soft shadow generated by distributed ray tracing. The light source was sampled using 10 rays.
Example 4 - This example shows a soft shadow generated by distributed ray tracing. The light source was sampled using 20 rays.
Example 5 - This example shows a soft shadow generated by distributed ray tracing. The light source was sampled using 50 rays.
Example 7 - This example shows a glossy reflection generated by distributed ray tracing. The reflection was generated by distributing 10 rays.
Example 8 - This example shows a glossy reflection generated by distributed ray tracing. The reflection was generated by distributing 20 rays.
Example 9 - This example shows a glossy reflection generated by distributed ray tracing. The reflection was generated by distributing 50 rays.
Example 11 - This example shows a fuzzy translucent surface generated by distributed ray tracing. The surface was generated by distributing 10 rays.
Example 12 - This example shows a fuzzy translucent surface generated by distributed ray tracing. The surface was generated by distributing 20 rays.
Allen Martin / firstname.lastname@example.org