Open Source Animation - 2009-10-02 05:23:57
Ray tracing is a computer graphics technique which helps create the illusion of a photorealistic image. It refers to the way the light simulated in a digital environment (or “ray”) interacts with digital objects. Under a normal, non-ray tracing technique, the individual particles of light simply end at the first surface they interact with and illuminate it. Under a ray tracing technique, the computer uses a model to simulate the illumination caused when light bounces off a surface.
In real life, not all the light particles react with the surfaces in the same way: some bounce off at each angle, some are absorbed by the surface, some shine right through. The model determines how each light particle will react based on the location of the light source and the properties of the object in question. The characteristic of the surface will determine whether the object will cast a shadow, refract the light all the way to the other side, or reflect the light back to the camera. It is useful to direct the computer’s resources to focus on the digital light since shadows, refractions, and reflections are all properties of light.
The image below highlights a normal, non ray traced technique. Notice the lack of shadows and the ghostly feeling that the colored balls are not three-dimensional objects. This is because the light is simply a flat projection and does not calculate how the light should react with the other objects.

In the ray traced image below, it possible to see the reflections, the shadows, and the refractions of light. The relationship of the individual objects to one another and each object’s position in digital space are more clear. The final ray traced image has greater definition and better subtle illumination than the non-ray traced image.

Ray tracing is computationally intensive. Because the system needs to calculate the path of millions of light particles, it takes time and computing resources to create the final image. As a result, the current application of ray tracing is limited to visualizations which can be created in advance, such as computer-animated films. Video games, for example, have a basic structure similar to a computer-animated film but cannot take advantage of ray tracing because the environment is being continuously updated by the user and cannot be pre-visualized. As computing power increases, however, it will be possible to utilize the technique in real-time.