Category:Ray Tracing

From DmWiki

(Redirected from Ray tracing)

Ray tracing is a very elegant algorithm to synthesize an image from a geometric scene description. It works by shooting/tracing rays from a virtual observer position into the scene, checking for intersections with the scene's geometry. One of it's particualar strengths is the ability to accuratly display mathematically described surfaces, like spheres or other implicit surfaces. Other algorithms, most notably rasterizing these surfaces need to be tesselated into poylgons/triangles before they can be rendered to an output device.


Table of contents


History of the Algorithm

Short Historic Summary

The idea for the algorithm practically dates back to the ancient greeks, who believed that vision was produced by "rays" shot off by the human eye, which "detect" the surrounding world. While obviously wrong this was still a common belief 400 years ago. The first actual use of the idea in image production was performed by Albrecht Dürer, who used strings, tied to objects and a frame, to accurately project the objects geometry on a two dimensional plane. http://www.devmaster.net/wiki/index.php?title=Category:Ray_Tracing&action=edit The first use in computer aided image generation is usually attributed to Turner Whitted, who released the first paper about the ray tracing algorithm in 1980. Since then the algorithm has been under research for the last two decades, extending it from a mere visibility detection algorithm (ray casting) to a technique for computing near photo-realistic images and movies.

Many of today's famous computer-generated movies, such as Shrek, or movies generated with Pixar's Renderman utilize the ray tracing algorithm. It is technically incorrect to claim that ray tracing can compute the effects used in these movies but most modern renderers stll utilize the basic ray-scene intersection algorithm first used in the ray tracing algorithm. For that reason the name ray tracing is often synonymously used to describe a certain class of rendering algorithms that are based on the original method (which is often called classic or Whitted ray tracing). Path tracing and photon mapping are two popular candidates from this group of algorithms.

The Basics

While capable of accuratly rendering a wide variety of phenomenons, the basic algorithm is rather simple.

An Inventory

In order to perform ray tracing we need a small set of entities, that sufficently describe the scene and the viewing parameters.

  • A viewing position, often called the Eyepoint.
  • An image plane. Combined with the previous this sets up the projection.
  • A description of the objects in the scene. As with any other rendering algorithm, we actually want to project a 3d scene onto an image plane, so we will need some form of scene description.
  • A description of the light sources in the scene. This point is a little controversial, depending on how you want to define rendering, but in general it is safe to say, that we need to agree on how surfaces receive light, even if we define the light to be some constant value.
  • Going with the scene description we need information on how objects reflect light. This is used in what is now generally known as shading.

How it works

...

Relation to other Algorithms

Radiosity and Photonmapping

Often when one talks about rendering, several algorithms are named unanimously. Often it is neglected that some of these algorithms aren't actually rendering algorithms since they only solve part of the rendering problem. Radiosity and Photonmapping are two examples for such algorithms. These algorithms share a lot with general rendering algorithms, in that they try to give an answer to one of the central questions of rendering, which is the transport of light in a scene as formulated by the Rendering equation. In contrast to ray tracing or rasterizing these algorithms are concerned only with that one problem which, central as it may be, does not entirely solve what rendering tries to accomplish. Hence they need a supporting framework, such as ray tracing, which helps to get hold of the second problem found in any rendering task. Of course we talk about visiblity determination.

DevMaster navigation