Ray tracing

HomePage | Recent changes | View source | Discuss this page | Page history | Log in |

Printable version | Disclaimers | Privacy policy

Ray tracing is one of the most popular methods used in 3D_computer_graphics to render an image. It works by repeatedly tracing the path taken by a ray of light through the scene and performing computations whenever the ray intersects an object in the world - hence the name.

For example, starting at a light source, we may trace a ray of light to a surface, which is transparent but refracts the light beam in a different direction while absorbing some of the spectrum (and altering the color). From here, the beam may strike another surface, which is not transparent and so the light undergoes both absorption (further changing the color) and reflection (changing the direction). Finally, from this second surface it may be reflected directly into the virtual camera, where its color contributes to the final rendered image.

Ray tracing is popular because unlike other rendering methods (such as scanline algorithms) effects such as reflections and shadows come directly from the algorithm. The main drawback of ray tracing is that it can be an extremely slow process, due mainly to the large numbers of light rays which need to be traced, and the larger number of potentially complicated intersection calculations between light rays and geometry (the result of which may lead to the creation of new rays). Since of very few of the potential rays of light emitted from light sources might end up reaching the camera, a common optimization is to trace hypothetical rays of light in the opposite direction. That is, a ray of light is traced starting from the camera into the scene, and back through interactions with geometry, to see if it ends up back at a light source. This is usually referred to as backwards ray tracing.

Nonetheless, since its invention by Turner Whitted in 1980, much research has been done on acceleration schemes for ray tracing; many of these focus on speeding up the determination of whether a light ray has intersected an arbitrary piece of geometry in the scene, often by storing the geometric database in a spatially organised data structure. Ray tracing has also shown itself to be very versatile, and in the last decade ray tracing has been extended to global_illumination rendering methods such as photon_mapping and Metropolis_light_transport.

/Ray tracing software