Content deleted Content added
Tag: section blanking |
Undid revision 877864816 by 185.177.200.38 (talk) -- Revert unsubstantiated removal |
||
Line 3:
In [[computer graphics]], '''ray tracing''' is a [[Rendering (computer graphics)|rendering]] technique for generating an [[digital image|image]] by tracing the path of [[light]] as [[pixel]]s in an [[image plane]] and simulating the effects of its encounters with virtual objects. The technique is capable of producing a very high degree of visual realism, usually higher than that of typical [[scanline rendering]] methods, but at a greater [[computation time|computational cost]]. This makes ray tracing best suited for applications where taking a relatively long time to render a frame can be tolerated, such as in still images and film and television [[visual effects]], and more poorly suited for real-time applications such as [[video game]]s where speed is critical. Ray tracing is capable of simulating a wide variety of optical effects, such as [[reflection (physics)|reflection]] and [[refraction]], [[Light scattering|scattering]], and [[dispersion (optics)|dispersion]] phenomena (such as [[chromatic aberration]]).
==Algorithm overview==
[[File:Ray trace diagram.svg|right|thumb|300px|The ray tracing algorithm builds an image by extending rays into a scene.]]
[[File:Ray Tracing Illustration First Bounce.png|right|thumb|300px|Illustration of the ray tracing algorithm for one pixel up to the first bounce.]]
Optical ray tracing describes a method for producing visual images constructed in [[3D computer graphics]] environments, with more photorealism than either [[ray casting]] or [[scanline rendering]] techniques. It works by tracing a path from an imaginary eye through each [[pixel]] in a virtual screen, and calculating the color of the object visible through it.
Scenes in ray tracing are described mathematically by a programmer or by a visual artist (typically using intermediary tools). Scenes may also incorporate data from images and models captured by means such as digital photography.
Typically, each ray must be tested for intersection with some subset of all the objects in the scene. Once the nearest object has been identified, the algorithm will estimate the incoming [[Computer graphics lighting|light]] at the point of intersection, examine the material properties of the object, and combine this information to calculate the final color of the pixel. Certain illumination algorithms and reflective or translucent materials may require more rays to be re-cast into the scene.
It may at first seem counterintuitive or "backward" to send rays ''away'' from the camera, rather than ''into'' it (as actual light does in reality), but doing so is many orders of magnitude more efficient. Since the overwhelming majority of light rays from a given light source do not make it directly into the viewer's eye, a "forward" simulation could potentially waste a tremendous amount of computation on light paths that are never recorded.
Therefore, the shortcut taken in raytracing is to presuppose that a given ray intersects the view frame. After either a maximum number of reflections or a ray traveling a certain distance without intersection, the ray ceases to travel and the pixel's value is updated.
{{Clear}}
==Detailed description of ray tracing computer algorithm and its genesis==
|