1 / 17

Ray Tracing

Ray Tracing. By Steven Giovenco. Overview. Definitions Intro to computer graphics What is ray tracing? Why use ray tracing? When and how is ray tracing used? Summary References. Basic Graphics Definitions. RGB

mareo
Download Presentation

Ray Tracing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ray Tracing By Steven Giovenco

  2. Overview • Definitions • Intro to computer graphics • What is ray tracing? • Why use ray tracing? • When and how is ray tracing used? • Summary • References

  3. Basic Graphics Definitions • RGB • Color specification in which intensity values for Red, Green, and Blue components of a color are used • Pixel • Individual unit of display, single “dot” of color • Raster • Block of graphics memory which contains information to be displayed (often as a contiguous block of RGB triplets, each representing a pixel) • Clipping • Determining which virtual objects (or parts of objects) should or should not be shown.

  4. Some More Definitions • “Camera” Specifications • Eyepoint • The logical point (in reference to the origin) at which the “camera” or “eye” is located • View Vector • Direction in which the camera is pointing • Up Vector • Perpendicular to View Vector, orients the camera • Viewing plane • Usually the near clipping plane, this is the “window” you have into the graphical world

  5. Ray Tracing Definitions • Eye Ray • Ray from Eyepoint through a pixel on the viewing plane, used to determine visible points • Secondary Ray • Ray generated from object surface at ray intersection point to gather information about environment effects on the surface • Shadow Ray • Secondary ray toward a light source to determine if an object occludes light source

  6. So What Is Ray Tracing? • Technique for rasterization • For each pixel of the viewing plane • Determine coordinates of pixel center • Generate eyeray • Check for intersection with objects • Determine color at closest intersection • Color • Texture • Shading • Reflection • Refraction • Store color in raster

  7. In More Detail… • Determine coordinates of pixel center • Simple vector addition • Generate eyeray • Simple point subtraction • Check for intersection with objects • Common intersection tests range from 5-7 floating point operations to 15-20 ops for more complex tests (SIGGRAPH website)

  8. The Rest of the Details… • Determine color at closest intersection • Color: determined from object • Texture: determined from object and texture • Shading: generate secondary ray toward light sources • Reflection: generate secondary ray at reflection angle outward from object • Refraction: generate secondary ray at refraction angle through object • Combine information using surface’s lighting equation, and store in raster

  9. Benefits of Ray Tracing • Clipping • Other algorithms need a separate, rather costly, step to clip objects not in scene • Ray tracing only needs to make sure object is not too near • Accurate reflection and refraction • Accurately depicts mirrors, lenses, windows, etc. • Other algorithms approximate reflections and refractions • Can represent any objects for which ray intersections can be determined.

  10. Drawbacks of Ray Tracing • Slow due to many intersection testing operations • 640x480 resolution, objects with 10 ops/test, 3,072,000 ops required per object • Does not include secondary rays • Not appropriate for most games as real-time rendering through ray tracing is nearly impossible with current techniques and hardware

  11. Speeding Up Ray Tracing • Adaptive Depth Control • Before a secondary ray is cast, test if its contribution is significant • Bounding Volumes • Enclose objects and groups of objects in hierarchal spheres or boxes which have easy to compute ray intersections, test bounding objects from top-down to see which objects inside need be tested

  12. Examples

  13. Examples

  14. Examples

  15. Examples - CSG

  16. Summary • Extremely accurate • Lighting • Reflections • Refractions • Texturing • Very slow • Not appropriate for real-time rendering, such as in games • Can represent nearly any object

  17. References • ACM SIGGRAPH website - ray tracing • http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtrace0.htm • Dr. Sumanta N. Pattanaik • CAP 5725 -- Computer Graphics 1 • RayShade Gallery • http://graphics.stanford.edu/%7Ecek/rayshade/gallery/gallery.html

More Related