Ray Tracing Essentials Part 4: The Ray Tracing Pipeline

NVIDIA Developer · Beginner ·📰 AI News & Updates ·6y ago
Skills: CV Basics80%

Key Takeaways

NVIDIA's Eric Haines discusses the ray tracing pipeline, including the five types of ray tracing shaders and how they fit together, with a focus on real-time ray tracing and its applications in games and other fields.

Full Transcript

hi my name is Eric Haynes with Nvidia and this talk is about the ray-tracing pipeline I'd like to start with a quote and this one's from Matt far around year 2008 GPUs are the only type of parallel processor that has ever seen widespread success because developers generally don't know they are parallel rasterization and ray-tracing both make use of parallelism restoration is straightforward in that you send a triangle to the screen you do vertex shading you do pixel shading and then whatever the result is you do a raster operation to blend it into the screen with ray tracing we have a similar kind of flow you start with array you traverse the environment and then you shade it however at this point we actually have the ability to recurse to go back to the beginning and shoot more rays to spawn off more possibilities such as shadow race or reflection race this bottom part in the green box is what we actually do with our TX acceleration as we can do that traversal and intersection piece very rapidly in DirectX for ray tracing and invoking for ray tracing there are five new kinds of shaders that are added there's a ray generation shader and what that does is it's kind of the manager it basically starts the rate going and keeps track of it and gets its final result there are intersection shaders so if you wanted to intersect a sphere you'd have an intersection shader for that or a subdivision surface or whatever you want there's a different kind of shader for each one then there's these last three shaders which are sort of a group there's a miss shader which says well I shot a ray and it didn't hit anything what do I get there's a closest hit shader which is well I hit something what shall I do with it kind of a traditional shader but you can also spawn off Ray's at that point such as reflection or shadow and there's also any hit shaders which I'll talk a little bit more about in a second so just to sum up again we have the regeneration shader which controls all the shaders there's the intersection shader which essentially defines the object shape and there are these control per ray behavior shaders mists closest hit in any hit so how do these fit together well there's the complicated many boxes kind of version here here's the simple version of that same flowchart we do is we have a trace ray which is called to generate the Ray and then it goes into this acceleration structure loop where we walk through the bounding volume hierarchy and find out objects that could potentially be hit by the Ray the intersection shader is then applied to that object and if we hit and if it's the closest hit we keep track of that information we also then use the any hid shader if available for testing if the object's transparent and the Ray should actually just continue on once we get through this traversal loop we eventually get to the end where there's nothing else in the acceleration structure to hit it's gone through the whole bounding volume parky and now we take our closest hit and say okay what's that shaded s or if we missed everything then we use our miss shader and that's what color we get back for the pixel the NE head shader I wanted to talk about it a little bit more it's an optional shader it's one that basically is used for transparency so imagine you have this leaf on the right which you're doing a tree of leaves and so you're not really caring about each individual leaf so you really just take a rectangle and you put a texture of a leaf on it now much of that texture is empty it's blank it's transparent so what the annahit shader does is it goes and checks the texture so let's say I hit with my ray in the upper left hand corner of that rectangle the anahit shader would say oh well that's transparent so don't really count this as a hit and let's just keep going so real-time ray tracing can clearly be used for games here are three shipping titles they're showing reflections global illumination and shadows what's also cool about real-time ray tracing or interactive ray tracing accelerated ray tracing is that you can use it for all kinds of other things for example you can do faster baking baking is where you shoot lots and lots of rays it's an offline process that takes a bit and you basically bake the results into a bunch of texture maps I was reading about how one studio went from 14 minutes of bake time to 16 seconds of bake time once they switched over to GPU ray tracing even if you don't want to use ray tracing particularly in your title you can use it for a ground truth test shaders that are part of DirectX can be used on any machine you can basically put your shaders into a ray tracer and get the to answer so if you're trying to do some approximation you can always get the ground truth and know what you're aiming for and then back off and try to figure out you know what your faster method might be the other cool thing you can do with ray tracing hardware is that you can abuse it in other words we're now looking into researching ideas or what else can we do with this could we do collision detection or could we do volume rendering or could we do other kinds of queries and work is just starting on this and I think it's a really interesting open field where there's all kinds of possible ways we can use and abuse the new hardware and that's it for this talk for more information about ray tracing and plenty of other good free resources such as free books go to this website you can also get a free book that's very modern and full of all kinds of articles about practice of how to use real time rendering it's called ray tracing gems it's downloadable [Music]

Original Description

In Part 4: The Ray Tracing Pipeline, NVIDIA's Eric Haines runs through the ray tracing pipeline, including the five types of ray tracing shaders, and how they fit together. Rasterization has a linear pipeline, typically with triangles input and pixel samples output. Interactive ray tracing in DirectX 12 DXR, Vulkan, or OptiX starts with a ray and ends with a pixel sample, but along the way more rays can be generated to influence the final result. Five new types of shaders are introduced for ray generation, intersecting custom primitives, and for controlling per-ray behavior. Fast ray tracing can also be used for accelerating baking, generating ground-truth images, and other purposes. More details about this video can be found here: https://news.developer.nvidia.com/ray-tracing-essentials-part-4-the-ray-tracing-pipeline/ You can watch the all of the videos in the series on this YouTube Playlist: https://www.youtube.com/playlist?list=PL5B692fm6--sgm8Uiava0IIvUojjFOCSR Ray tracing resources page: http://bit.ly/rtrtinfo Ray Tracing Gems: http://raytracinggems.com Additional links: Much of this talk is distilled from Chris Wyman’s in-depth presentation at the SIGGRAPH 2019 Introduction to Real-Time Ray Tracing course http://rtintro.realtimerendering.com/ and from Steven Parker’s HPG 2019 keynote, “The Story of NVIDIA RTX” https://www.highperformancegraphics.org/wp-content/uploads/2019/keynote/story_of_nvidia_rtx.pdf The book Real-Time Rendering has a free, bonus chapter http://www.realtimerendering.com/Real-Time_Rendering_4th-Real-Time_Ray_Tracing.pdf giving an introductory high-level view of interactive ray tracing as a whole At the end, the baking example is from this interactive three.js demo, https://threejs.org/examples/#webgl_materials_lightmap the ground truth example from PBRT’s gallery, https://pbrt.org/gallery.html and the other use shown is from the paper “RTX Beyond Ray Tracing: Exploring the Use of Hardware Ray Tracing Cores for Tet-Mesh Point Locati
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from NVIDIA Developer · NVIDIA Developer · 3 of 60

1 Ray Tracing Essentials Part 2: Rasterization versus Ray Tracing
Ray Tracing Essentials Part 2: Rasterization versus Ray Tracing
NVIDIA Developer
2 Ray Tracing Essentials Part 3: Ray Tracing Hardware
Ray Tracing Essentials Part 3: Ray Tracing Hardware
NVIDIA Developer
Ray Tracing Essentials Part 4: The Ray Tracing Pipeline
Ray Tracing Essentials Part 4: The Ray Tracing Pipeline
NVIDIA Developer
4 NsightGraphics 2020 2 Release Spotlight
NsightGraphics 2020 2 Release Spotlight
NVIDIA Developer
5 Ray Tracing Essentials Part 5: Ray Tracing Effects
Ray Tracing Essentials Part 5: Ray Tracing Effects
NVIDIA Developer
6 Ray Tracing Essentials Part 6: The Rendering Equation
Ray Tracing Essentials Part 6: The Rendering Equation
NVIDIA Developer
7 Ray Tracing Essentials Part 7: Denoising for Ray Tracing
Ray Tracing Essentials Part 7: Denoising for Ray Tracing
NVIDIA Developer
8 Spatiotemporal Importance Resampling for Many-Light Ray Tracing (ReSTIR)
Spatiotemporal Importance Resampling for Many-Light Ray Tracing (ReSTIR)
NVIDIA Developer
9 Announcing Cloud-Native Support for Jetson Platform
Announcing Cloud-Native Support for Jetson Platform
NVIDIA Developer
10 JetsonTV: Build your next project with NVIDIA Jetson
JetsonTV: Build your next project with NVIDIA Jetson
NVIDIA Developer
11 Nsight Compute Feature Spotlight: Roofline Analysis, Asynchronous Copy, Sparse Data Compression
Nsight Compute Feature Spotlight: Roofline Analysis, Asynchronous Copy, Sparse Data Compression
NVIDIA Developer
12 Nsight Systems Feature Spotlight: OpenMP
Nsight Systems Feature Spotlight: OpenMP
NVIDIA Developer
13 Isaac Sim 2020: Deep Dive
Isaac Sim 2020: Deep Dive
NVIDIA Developer
14 NVIDIA Jetson: Enabling AI-Powered Autonomous Machines at Scale
NVIDIA Jetson: Enabling AI-Powered Autonomous Machines at Scale
NVIDIA Developer
15 NVIDIA Tools to Train, Build, and Deploy Intelligent Vision Applications at the Edge
NVIDIA Tools to Train, Build, and Deploy Intelligent Vision Applications at the Edge
NVIDIA Developer
16 Jetson Xavier NX Developer Kit: The Next Leap in Edge Computing
Jetson Xavier NX Developer Kit: The Next Leap in Edge Computing
NVIDIA Developer
17 Synthesizing High-Resolution Images with StyleGAN2
Synthesizing High-Resolution Images with StyleGAN2
NVIDIA Developer
18 NVIDIA Robotics: Isaac SDK and Sim 2020.1
NVIDIA Robotics: Isaac SDK and Sim 2020.1
NVIDIA Developer
19 Accelerating COVID-19 Research with GPUs
Accelerating COVID-19 Research with GPUs
NVIDIA Developer
20 Visualizing 150 Terabytes of Data
Visualizing 150 Terabytes of Data
NVIDIA Developer
21 Boosting Performance and Utilization with Multi-Instance GPU
Boosting Performance and Utilization with Multi-Instance GPU
NVIDIA Developer
22 Running Multiple Workloads on a Single A100 GPU
Running Multiple Workloads on a Single A100 GPU
NVIDIA Developer
23 NVIDIA Nsight Feature Spotlight: GPU Trace
NVIDIA Nsight Feature Spotlight: GPU Trace
NVIDIA Developer
24 Spark 3 Demo: Comparing Performance of GPUs vs. CPUs
Spark 3 Demo: Comparing Performance of GPUs vs. CPUs
NVIDIA Developer
25 NVIDIA Jetson Nano Wins Edge AI and Vision Alliance Award
NVIDIA Jetson Nano Wins Edge AI and Vision Alliance Award
NVIDIA Developer
26 NVIDIA IndeX on Google Cloud Platform Marketplace
NVIDIA IndeX on Google Cloud Platform Marketplace
NVIDIA Developer
27 DeepStream SDK: Best practices for performance optimization
DeepStream SDK: Best practices for performance optimization
NVIDIA Developer
28 Efficiently Deploying GPU Accelerated 5G CloudRAN for Edge AI Inferencing
Efficiently Deploying GPU Accelerated 5G CloudRAN for Edge AI Inferencing
NVIDIA Developer
29 NVIDIA PhysicsNeMo - Accelerating Scientific & Engineering Simulation Workflows with AI
NVIDIA PhysicsNeMo - Accelerating Scientific & Engineering Simulation Workflows with AI
NVIDIA Developer
30 NVIDIA Deep Learning Institute Instructor-Led Training Available Remotely
NVIDIA Deep Learning Institute Instructor-Led Training Available Remotely
NVIDIA Developer
31 Advancing AR Glasses
Advancing AR Glasses
NVIDIA Developer
32 Blender Cycles: RTX On
Blender Cycles: RTX On
NVIDIA Developer
33 Real-Time GPU-Accelerated Data Analytics of 250 million Flight Data Records of 737 Max grounding
Real-Time GPU-Accelerated Data Analytics of 250 million Flight Data Records of 737 Max grounding
NVIDIA Developer
34 Assessing Property Damage with AI
Assessing Property Damage with AI
NVIDIA Developer
35 RAPIDS: GPU-Accelerated Data Analytics & Machine Learning
RAPIDS: GPU-Accelerated Data Analytics & Machine Learning
NVIDIA Developer
36 DaVinci Resolve Turns RTX On
DaVinci Resolve Turns RTX On
NVIDIA Developer
37 RAPIDS with Plotly Dash : GPU-Accelerated Census 2010 Visualization
RAPIDS with Plotly Dash : GPU-Accelerated Census 2010 Visualization
NVIDIA Developer
38 NVIDIA IndeX for arivis5D Cloud Platform
NVIDIA IndeX for arivis5D Cloud Platform
NVIDIA Developer
39 NVIDIA Backchannel: Behind the Scenes of Marbles at Night RTX
NVIDIA Backchannel: Behind the Scenes of Marbles at Night RTX
NVIDIA Developer
40 NVIDIA Backchannel: Sneak Peek into Marbles RTX in Omniverse
NVIDIA Backchannel: Sneak Peek into Marbles RTX in Omniverse
NVIDIA Developer
41 How to Create "Paint" in Substance Painter
How to Create "Paint" in Substance Painter
NVIDIA Developer
42 Accelerate AI development for Computer Vision on the NVIDIA Jetson with alwaysAI
Accelerate AI development for Computer Vision on the NVIDIA Jetson with alwaysAI
NVIDIA Developer
43 Securing Next Generation Apps over VMware Cloud Foundation with Bluefield-2 DPU
Securing Next Generation Apps over VMware Cloud Foundation with Bluefield-2 DPU
NVIDIA Developer
44 Accelerated Data Centers with NVIDIA and VMware
Accelerated Data Centers with NVIDIA and VMware
NVIDIA Developer
45 GPU-Accelerated Motion Blur in Blender Cycles
GPU-Accelerated Motion Blur in Blender Cycles
NVIDIA Developer
46 NVIDIA Clara Guardian Virtual Patient Assistant
NVIDIA Clara Guardian Virtual Patient Assistant
NVIDIA Developer
47 Revolutionizing Supercomputing with NVIDIA UFM Cyber-AI
Revolutionizing Supercomputing with NVIDIA UFM Cyber-AI
NVIDIA Developer
48 Inventing Virtual Meetings of Tomorrow with NVIDIA AI Research
Inventing Virtual Meetings of Tomorrow with NVIDIA AI Research
NVIDIA Developer
49 Learning a Contact-Adaptive Controller for Robust, Efficient Legged Locomotion
Learning a Contact-Adaptive Controller for Robust, Efficient Legged Locomotion
NVIDIA Developer
50 Getting started with Jetson Nano 2GB Developer Kit
Getting started with Jetson Nano 2GB Developer Kit
NVIDIA Developer
51 NVIDIA Jetson Developer Community AI Projects
NVIDIA Jetson Developer Community AI Projects
NVIDIA Developer
52 Open-source projects on NVIDIA Jetson Nano 2GB Developer Kit
Open-source projects on NVIDIA Jetson Nano 2GB Developer Kit
NVIDIA Developer
53 Real-Time Ray Tracing with Project Lavina
Real-Time Ray Tracing with Project Lavina
NVIDIA Developer
54 Jetson AI Fundamentals - S1E2 - Hello Camera
Jetson AI Fundamentals - S1E2 - Hello Camera
NVIDIA Developer
55 Develop Optimized Conversational AI Models with NVIDIA NeMo on DGX A100
Develop Optimized Conversational AI Models with NVIDIA NeMo on DGX A100
NVIDIA Developer
56 Jetson AI Fundamentals - S1E4 - Image Regression Project
Jetson AI Fundamentals - S1E4 - Image Regression Project
NVIDIA Developer
57 Jetson AI Fundamentals - S2E1 - JetBot Intro and Hardware
Jetson AI Fundamentals - S2E1 - JetBot Intro and Hardware
NVIDIA Developer
58 Jetson AI Fundamentals - S2E2 - JetBot Software Setup
Jetson AI Fundamentals - S2E2 - JetBot Software Setup
NVIDIA Developer
59 Jetson AI Fundamentals - S1E1 - First Time Setup with JetPack
Jetson AI Fundamentals - S1E1 - First Time Setup with JetPack
NVIDIA Developer
60 Jetson AI Fundamentals - S1E3 - Image Classification Project
Jetson AI Fundamentals - S1E3 - Image Classification Project
NVIDIA Developer

This video teaches the fundamentals of the ray tracing pipeline, including the different types of shaders and how they work together to produce real-time ray tracing, and explores its applications in games and other fields.

Key Takeaways
  1. Understand the basics of ray tracing and rasterization
  2. Learn about the five types of ray tracing shaders
  3. Implement ray tracing shaders using DirectX or Vulkan
  4. Optimize real-time ray tracing performance using GPU acceleration
  5. Explore applications of real-time ray tracing in games and other fields
💡 Real-time ray tracing can be used for more than just games, and can be applied to fields such as scientific visualization, product design, and architecture.

Related Reads

Up next
The Surprising Downfall of Google
Matthew Berman
Watch →