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