in their Metal API.
Unreal Engine 4.22 includes ray tracing support. The Ray Tracing in Unreal talk from GDC 2019 covers the new features (though go here to watch the Troll demo).
Eye candy includes the Star Wars demo from GDC 2018, the Porsche demo, and NVIDIA's Project SOL demo and followup, which includes an explanation.
For real-time demos using RTX cards, see the path-traced Quake II RTX demo (YouTube, source code here) or join the Minecraft RTX beta program (tech. talk). NVIDIA provides other tech demos, with the newer ones using RTX.
Denoising is critical for real-time DXR performance when using path tracing or other Monte Carlo techniques. Alain Galvan's summary posts on ray tracing denoising and filtering, and machine-learning denoising, are good places to start. Zwicker et al. give a state of the art report about this area; note that it is from 2015, however, so is not fully up to date. Intel provides free code in their Open Image Denoise filter collection. The Quake II RTX demo includes shader code for the A-SVGF filter for denoising. NVIDIA has an early access program for their denoiser.
The DirectX Raytracing Functional Spec is a good place to start for learning about DXR. NVIDIA's DXR tutorial part 1 (setup) and part 2 (rendering) gets you programming with . Version 1.1 of DXR 12 adds more features. The DirectX-Specs website provides additional documentation in web form about other new features, such as mesh shaders.
Adam Marrs gives a pure DXR tutorial to allow you to get right into the specification.
The RTXGI SDK provides real-time global illumination by using ray tracing to form light probes in a way that minimizes light and shadow leaks found in traditional probe systems.
Working with DXR directly can be a bit painful. Confetti's The Forge supports DXR and much else. NVIDIA's Falcor 4.0 framework is useful for research and prototyping. One project built atop this framework is ray-traced ambient occlusion, though sadly this project has not been updated to Falcor 4.0.
You can find all DXR-related posts on NVIDIA's website with this link. A best practices page was developed by NVIDIA for running DXR on RTX hardware. Freshness date: March 20, 2019. Newer is the video for the GTC 2020 talk "RTX Real Time Ray Tracing Best Practices." Older resources follow.
Our blog entry on DXR contains a large set of links to resources, demos, and related articles that came out around or soon after GDC 2018.
There have been many videos about DXR effects and demos. Fortnite uses real-time ray tracing to make trailers. SEED's Pica Pica demo gives a quick runthrough of some possible effects and their benefits. Digital Foundry's runthrough of Battlefield V has fairly detailed explanations of effects and how they were done with DXR, though one or two things appear incorrect, e.g., BVH varying with image resolution. You can read an analysis and Q&A here. The Atomic Heart explanation is short and sweet, and is particularly good at showing the limitations of screen-space reflections. Metro Exodus use of ray tracing has a significant effect on the atmosphere of the game; you can use a slider to compare the differences yourself. Read about Metro Exodus's use of ray tracing and other features, watch their presentation, and see Digital Foundry's video and this post that looks under the hood.
DXR implies GPU hardware dedicated to improving ray tracing performance, such as . However, for simpler scenes, or for powerful clusters of machines, interactive ray tracing is possible using traditional CPUs or less-specialize GPUs. 3Dmark's Port Royal benchmark is designed for interactive ray tracing.
The SIGGRAPH 2018 course Introduction to DirectX RayTracing has notes and sample code available, as well as much other useful information for getting started with DXR shaders. You can watch the entire course on YouTube. This code has been polished and expanded, and blogged about here. NVIDIA's Wednesday SIGGRAPH 2018 courses have more recorded presentations on real-time ray tracing.
NVIDIA has older tutorials on Github for learning about more low-level DXR calls.
NVIDIA has an Vulkan ray tracing tutorial, using their extensions. HLSL shaders for ray tracing can now be converted to VKRay. Keep this article in mind for writing an efficient Vulkan renderer in general.
Basic Vulkan ray tracing tutorials with code are available from one user.
Christoph Schied and many others have released open-source for a fully ray traced version of Quake 2, on Vulkan.
"Interactive" here means "not DXR-based."
If you want to see hardware-independent progressive rendering path tracing, a good place to start is Eric Loftis's rendering demos. Go to the Live Demos section and give them a whirl - they're browser-based, using Javascript and WebGL through three.js, so no installation or download is needed. Open source. One takeaway for me is how the rate of reduction of variance over time decreases, as described in section 15.3 in Ray Tracing Gems. That is, it takes a lot more samples later on to decrease noise a bit, which points towards denoising as the other key part of high-performance ray tracing.
In a similar vein, many shadertoy demos are based on ray marching or other ray casting techniques run in (often complex) shaders. Mikael Christensen has a series of articles on modeling surfaces for such rendering. Electric Square provides a tutorial on ray marching techniques.
A number of hardware vendors provide free ray tracing software in various forms:
Enscape provides a rundown of their approach to building an interactive hybrid raster/path-tracing system.
KeyShot uses ray tracing for all rendering, even when positioning objects and lights in a scene. Nice eye candy, too.
Historically, the idea of interactive ray tracing has been around for over thirty years, with the introduction of .
There have been other (commercially unsuccessful) efforts over the years, such as from 1998, and Imagination Technologies' mobile (!) offering from 2013.
Baking global illumination into models is a common use of ray tracing. One company notes a 50x speed-up in bake time - from 14 minutes down to 16 seconds - in moving from a CPU to GPU baking system.
The demoscene has had simple interactive ray traced demos since 1995.
Don't bother trying to download and run code, though; better is to watch these on YouTube.
Ray tracing has been used in film production for decades, first seen in Blue Sky Studio's work which won an Oscar in 1998. Ray tracing is now the standard way CGI effects are rendered by every major studio. Frames are computed on render farms, clusters of
upwards of tens of thousands of processors.
For technical information, the notes from the Path Tracing in Production SIGGRAPH course give valuable information about techniques used in film production. Another worthwhile resource is the Special Issue On Production Rendering in ACM TOG.
There are a wide range of offline rendering systems, based on ray and path tracing and other related techniques. Here's a short list:
- Nori is a simple C++ ray tracer, written for educational purposes.
- pbrt is well-established, with a great book about the code.
- Mitsuba - a research-oriented ray tracer which is somewhat like pbrt.
- Tungsten is often compared with Mitsuba, built on Embree, with a liberal license.
- OptiX focuses on GPU acceleration of ray tracing.
- OSPRay is geared towards scientific visualization.
- Cycles is the standard ray tracer for Blender.
- Lux works with Blender.
- Appleseed works with Maya.
Models suitable for these can be found in the Models listing on our portal page.
There are thousands of other ray tracers on Github alone - let me know which you think is the best.
Back in the day POV-Ray was a popular hobbyist ray tracer, and is now over 30 years old; the Github repository still shows activity and the code works fine.
This ray tracer
and older resources such as the Ray Tracing News helped lure people such as Marcos Fajardo to get into the field.
There's even a path tracer specifically for rendering Minecraft worlds - a few examples here and here.
Our free chapter on interactive ray tracing is just a starting spot, and
our book has but a few more pages on ray tracing.
What follows are books focused on the subject of ray tracing and related algorithms, in reverse year order of the latest edition.