Bounding Volume Hierarchy - How Computers Test the World

Perhaps the biggest aspect of NVIDIA’s gamble on ray tracing is that traditional GPUs just aren’t very good at the task. They’re fast at rasterization and they’re even fast at parallel computing, however ray tracing does not map very well to either of those computing paradigms. Instead NVIDIA has to add hardware dedicated to ray tracing, which means devoting die space and power to hardware that cannot help with traditional rasterization.

A big part of that hardware, in turn, will go into solving the most basic problem of ray tracing: how do you figure out what a ray is intersecting with? The most common solution to this problem is to store triangles in a data structure that is well-suited for ray tracing. And this data structure is called a Bounding Volume Hierarchy.

Conceptually, a BVH is relatively simple – at least for the purposes of this article. Rather than testing every polygon to see if a ray interacts with it, the idea is to test a portion of a scene to see if it interacts with a ray, and then keep drilling down. If there is an intersection with that portion of the scene, then subdivide it into smaller portions and test again. And again. And again. All the way until you reach the individual polygon, at which point the ray testing is resolved.

For the computer scientists in the crowd, this might sound a lot like an application of a binary search, and it is. Each test allows for a significant number of options (in this case polygons) to be discarded as possible answers. This gets to the right polygon in just a fraction of the time. A BVH, in turn, is stored in what’s essentially a tree data structure, with each subdivision – called bounding boxes – stored as children of their parent bounding box.

Now the catch with BVH is that while it radically cuts down on the amount of ray intersection needed compared to a naïve implementation, it’s still not super cheap. A number of tests are still required for each ray, with both successful and failed tests adding to the total number of tests taken. And all of this is for a single ray, when a significant number of rays are going to be needed for each pixel. Which is why hardware acceleration of the process is so important (and not at all easy).

The other major computational cost here is that BVHs themselves aren’t free. One needs to be created for a scene from the polygons in it, so there is an additional step before ray casting can even begin. This is more a developer concern – when can they modify and reuse a BVH versus building a new one – but it’s another step in the process. Furthermore it’s an example of why developer training and efficient engine implementations are so crucial to the process, as a poor implementation can make ray tracing much too slow to be viable.

Ray Tracing 101: What It Is & Why NVIDIA Is Betting On It The Turing Architecture: Volta in Spirit
Comments Locked

111 Comments

View All Comments

  • StormyParis - Friday, September 14, 2018 - link

    Fascinating subject and excellent treatment. I feel informed and intelligent, so thank you.
  • Gc - Friday, September 14, 2018 - link

    Nice introductory article. I wonder if the ray tracing hardware might have other uses, such as path finding in space, or collision detection in explosions.

    The copy editing was a let down.

    Copy editor: please review the "amount vs. number" categorical distinction in English grammar. Parts of this article, that incorrectly use "amount", such as "amount of rays" instead of "number of rays", are comprehensible but jarring to read, in the way that a computer translation can be comprehensible but annoying to read.

    (yes: "amount of noise". no: "amount of rays, usually 1 or 2 per pixel". yes: "number of rays, usually 1 or 2 per pixel".) (Recall that "number" is for countable items, that can be singular or plural, such as 1 ray or 2 rays. "Amount" is for an unspecified quantity such as liquid or money, "amount of water in the tank" or "amount of money in the bank". But if pluralizable units are specified, then those units are countable, so "number of liters in the tank", or "number of dollars in the bank". [In this article, "amount of noise" does not refer to an event as in 1 noise, 2 noises, but rather to an unspecified quantity or ratio.] A web search for "amount vs. number" will turn up other explanations.)
  • Gc - Friday, September 14, 2018 - link

    (Hope you're all staying dry if you're in Florence's storm path.)
  • edzieba - Saturday, September 15, 2018 - link

    " I wonder if the ray tracing hardware might have other uses, such as path finding in space, or collision detection in explosions."

    Yes, these were called out (as well as gun hitscan and AI direct visibility checks) in their developer focused GDC presentation.
  • edzieba - Saturday, September 15, 2018 - link

    One thing that might be worth highlighting (or exploring further) is that raytraced reflections and lighting/shadowing are necessary for VR, where screen-space reflections produce very obviously incorrect results
  • Achaios - Saturday, September 15, 2018 - link

    Τhis is epic. It should be taught as a special lesson in Marketing classes. NVIDIA is selling fanboys technology for which there is presently no practical use for, and the cards are already sold out. Might as well give NVIDIA license to print money.
  • iwod - Saturday, September 15, 2018 - link

    Aren't we fast running to Memory Bandwidth bottleneck?

    Assuming we get 7nm next year at 8192 CUDA Core, that will need at least 80% more bandwidth, or 1TB/s. Neither 512bit memory nor HBM2 could offer that.
  • HStewart - Saturday, September 15, 2018 - link

    I wondering when professional rendering packages support RTX - I personally have Lightwave 3D 2018 and because of Newtek's excellent upgrade process - I could see supporting it in future. I could see this technology do wonders for Movie and Game creations - reducing the dependency on CPU cpres
  • YaleZhang - Saturday, September 15, 2018 - link

    Increased power use is disappointing. Is the 225W TDP for 2080 the power used or the heat dissipated? If it's power used, then that would include the 27W power used by VirtualLink. So then the real power usage would be 198 W.
  • willis936 - Sunday, September 16, 2018 - link

    I've been in signal integrity for five years. I write automation scripts for half million dollar oscilloscopes. I love it. It's my jam. Why on god's green earth does nvidia think their audience cares about eye diagrams? They mean literally nothing to the target audience. They're not talking to system integrators or chip manufacturers. Even if they were a single eye diagram with an eye width measurement means next to nothing beyond demonstrating that they have an image of what a signal at a given baud rate should look like (it's unclear if it's simulated or taken from one of their test monkeys). If they really wanted to blow us away they could say something like they've verified 97% confidence that their memory interface/channel BER <= 1E-15 when the spec commands BER <= 1E-12 or something. It's just a jargon image to show off how much they must really know their stuff. It just strikes me as tacky.

Log in

Don't have an account? Sign up now