Introduction to Real-Time Ray Tracing

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.

   

Syllabus

   

Slides

Section Duration Presenter Download
1. Course Overview 65 min Shirley PDFPPT
2. Going fast: Parallelizing your ray tracer 50 min Wyman PDFPPT
3. Production-scale real-time ray tracing 60 min McGuire PDFPPT

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 volumes 1, 2, and 3, Amazon Digital Services, 2016 US$9. Free to download, code repository.
  2. Wyman, Introduction to DirectX RayTracing, SIGGRAPH'18 Courses, 2018
  3. McGuire, The Graphics Codex, 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 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 unless explicitly noted otherwise.

All source code is licensed as 2-clause BSD, “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

@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}
}

formatted by Markdeep 1.17