**Introduction to Real-Time Ray Tracing** SIGGRAPH 2019 Course Peter Shirley, Chris Wyman, and Morgan McGuire NVIDIA Ray tracing is a fundamental topic in computer graphics, and often the main subject of an introductory university course. This course takes the audience from zero prior computer rendering knowledge to an understanding of modern Monte Carlo path tracing by focusing on a real-time, parallel approach. We use concrete examples in a variety of APIs and programming languages, and provide source code. ![Examples of images that attendees will understand how to render after each third of the course.](teaser.jpg) Syllabus =============================================================================== Slides ------------------------------------------------------------------------------- Section | Duration | Presenter | Download ---------------------------------------------|-----------|-----------|------------ 1. Course Overview | 65 min | Shirley | [PDF](1-Overview.pdf) • [PPT](1-Overview.pptx) 2. Going fast: Parallelizing your ray tracer | 50 min | Wyman | [PDF](2-GPU.pdf) • [PPT](2-GPU.pptx) 3. Production-scale real-time ray tracing | 60 min | McGuire | [PDF](3-Production.pdf) • [PPT](3-Production.pptx) Source code repositories are linked from inside of the slides. Background ------------------------------------------------------------------------------- Recent advances draw new attention to ray tracing and require a modern approach. In academia, ray tracing is now taught extended from Whitted Tracing [#Whitted80] to full Monte Carlo Path Tracing [#Cook84] [#Kajiya86] [#Pharr16]. In the industry, parallel ray tracing is now available everywhere through the Microsoft DirectX 12 API for GPU ray tracing for games, and the OptiX [#Parker10] and Embree [#Wald14] APIs employed in film production and content creation. Across the field, the latest SIMD multicore CPUs and ray-tracing GPUs now enable affordable, _real-time_ ray tracing through parallel processing. This both significantly changes the preferred algorithm structures from those used a decade ago, and encourages an interactive approach to learning the material. Topics ------------------------------------------------------------------------------- Duration | Topic ----------:|---------------------------------------- 10 min | Introduction and Course Overview 20 min | Light Transport and Ray Intersections 20 min | Monte Carlo Path Tracing 10 min | Reflection and Refraction 10 min | Open-Source Falcor API and DirectX Syntax 15 min | Meshes, Texture Maps, and BVHs 10 min | Direct Illumination and Shadows 15 min | Extended Examples 10 min | Realistic Materials 15 min | Importance Sampling 20 min | Scaling Parallel Ray Tracing 15 min | Combining Ray Tracing with Rasterization Light Transport and Ray Intersections : The physically-based model of light transported along paths, whose edges are along rays and nodes are scattering at intersections of those rays with surfaces. Derivation of ray-sphere and ray-plane intersections. Monte Carlo Path Tracing : Derivation of the "pure" path tracing algorithm and its implementation from scratch in the C programming language. This performs random sampling of light paths constructed backwards from the camera and supports spherical light sources and matte surfaces. Reflection and Refraction : Adding perfect mirror reflection and sharp refraction to the path tracer. Moving the cosine factor from the matte term into the random number generator. These collectively introduce importance sampling. Falcor and DirectX : Concrete introduction to GPU path tracing by porting the renderer to this open source framework, with real-time interactive demonstration of the prototyping features in Falcor. Meshes, Texture Maps, and BVHs : Scaling to artist-driven scenes by introducing triangle meshes and texture mapping. Brief discussion of Bounding volume hierarchies (BVHs) and demonstration of how to build them in C++ and DirectX. Direct Illumination and Shadows : Explanation of this optimization and how to restructure a path tracer to incorporate it without biasing the sampling result. Realistic Materials : Discussion of modern materials modeled as bidirectional scattering distribution functions (BSDFs), emission functions, and normal maps. Concrete examples of implementation for CPU and GPU. Importance Sampling : Expanding the sampler to take into account the intensity of lights and properties of materials. This is the key numerical method for reducing noise in ray tracing. Evaluation of the inherent tension between optimal statistical _independence_ and maintaining _coherence_ for efficient parallel execution. Scaling Parallel Ray tracing : Discussion of performance implications of alternative wavefront and kernel strategies for launching rays. Recommended structure for a high-performance real-time path tracer with examples in OptiX and Embree. Survey of the big ideas from _Ray Tracing Gems_ for optimizing ray casts in games and from the _ACM Transactions on Graphics_ special issue on Production Rendering [#Bala2018] on scaling input to billions of triangles. Combining Ray Tracing with Rasterization : Survey of current strategies and research on hybrid rendering and denoising for real-time rendering. [#Whitted80]: T. Whitted, An Improved Illumination Model for Shaded Display, _Comm. ACM_ 23:6, June 1980 [#Cook84]: R. L. Cook, T. Porter, and L. Carpenter, Distributed Ray Tracing, SIGGRAPH'84 [#Kajiya86]: J. T. Kajiya, The Rendering Equation, SIGGRAPH'86 [#Parker10]: S. G. Parker, J. Bigler, A. Dietrich, H. Friedrich, J. Hoberock, D. Luebke, D. McAllister, M. McGuire, K. Morley, A. Robison, and M. Stich, OptiX: A General Purpose Ray Tracing Engine, SIGGRAPH'10 [#Wald14]: I. Wald, S. Woop, C. Benthin, G. S. Johnson, and M. Ernst, Embree: A Kernel Framework for Efficient CPU Ray Tracing, _ACM Trans. Graph_ 33:4, 2014 [#Pharr16]: M. Pharr, W. Jakob, and G. Humphreys, _Physically Based Rendering: From Theory to Implementation_, Morgan Kaufmann, 2016 [#Bala18]: _ACM Trans. Graph. Special Issue On Production Rendering and Regular Papers_, 37:3, K. Bala ed., 2018 Extended Version =============================================================================== This course is a unified three-hour version of our more extensive course notes and books, which are suitable for use in a semester-long course: 1. Shirley, [_Ray Tracing in One Weekend_](https://www.amazon.com/gp/product/B078MM5PZF) volumes [1](https://www.amazon.com/dp/B01B5AODD8), [2](https://www.amazon.com/gp/product/B01CO7PQ8C), and [3](https://www.amazon.com/gp/product/B01DN58P8C), Amazon Digital Services, 2016 US$9. [Free to download](http://www.realtimerendering.com/#books-small-table), [code repository](https://github.com/raytracing/). 2. Wyman, [_Introduction to DirectX RayTracing_](http://intro-to-dxr.cwyman.org/), SIGGRAPH'18 Courses, 2018 3. McGuire, [_The Graphics Codex_](http://graphicscodex.com/), Casual Effects, 2019 US$10 Instructors =============================================================================== **Peter Shirley** is a Distinguished Research scientist at NVIDIA and coauthor of the textbooks _Fundamentals of Computer Graphics_, _Ray Tracing in One Weekend_, and _Realistic Ray Tracing_. He is the author of many research papers on ray tracing, real-time rendering, and sampling. His Ph.D. is from the University of Illinois and he's held faculty appointments at the University of Utah, the University of Indiana, and Cornell University. **Chris Wyman** is a Principal Research Scientist at NVIDIA, working on the real-time rendering research team. He is the author of many research papers on real-time rendering, GPU computing, and ray tracing. His Ph.D. is from the University of Utah and he was a professor at University of Iowa. **Morgan McGuire** is a Distinguished Research scientist at NVIDIA and coauthor of the textbooks _Computer Graphics: Principles and Practice_ and _The Graphics Codex_. He is the author of many research papers on ray tracing, real-time rendering, and video games. His Ph.D. is from Brown University and he's held faculty appointments at Williams College, the University of Waterloo, and McGill University. Reuse =============================================================================== Please use and remix these materials for your own courses, books, blogs, and documentation. We encourage [Fair Use](https://fairuse.stanford.edu/overview/fair-use/what-is-fair-use/) and have licensed the material liberally to support commercial as well as purely scholarly reuse. License ------------------------------------------------------------------------------- All presentation materials on this page are licensed as [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/deed.ast) unless explicitly noted otherwise. All source code is licensed as [2-clause BSD](https://opensource.org/licenses/BSD-2-Clause), "Copyright 2019 Peter Shirley, Chris Wyman, and Morgan McGuire", unless explicitly noted otherwise. Citation ------------------------------------------------------------------------------- McGuire, Shirley, and Wyman, _Introduction to Real-Time Ray Tracing_, 28 Jul 2019, SIGGRAPH'19 Courses Bibtex ------------------------------------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ none @misc{RTRTCourse19, author = {Morgan McGuire and Peter Shirley and Chris Wyman}, title = {Introduction to Real-Time Ray Tracing}, year = {2019}, month = {jul}, day = {28}, note = {SIGGRAPH'19 Course}, url = {http://rtintro.realtimerendering.com} } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~