Developer Blog: Implementing Stochastic Levels of Detail with Microsoft DirectX Raytracing

Level-of-detail (LOD) refers to replacing high-resolution meshes with lower-resolution meshes in the distance, where details may not be significant. This technique can help reduce memory footprint and geometric aliasing. Most importantly, it has long been used to improve rasterization performance in games. But does that apply equally to ray tracing?

The render time for rasterization is O(N), where N is the number of triangles, whereas the render time for ray tracing is significantly better at O(log N). So, you would expect LOD to be less critical for ray tracing, but perhaps it can still provide worthwhile performance improvements.

In this post, we explore this question. In addition, we demonstrate one possible way to implement stochastic LOD using the Microsoft DirectX Raytracing (DXR) API. We assume that you have a basic familiarity with DXR.

Figure 1. Screenshot from the DXR sample provided with this post. LODs are beneficial in open scenes like this with large depth ranges. Color indicates the LOD level.  The most distant models are rendered with 128 times fewer triangles than the closest ones (eight LODs, 2x reduction in triangle count between each level).

Stochastic LODs

Stochastic LOD is the primary technique used by games to create smoother transitions between LODs. For example, in Unreal Engine 4, stochastic LOD is called Dithered LOD Transitions. Without stochastic techniques, the abrupt, discrete transition between LODs can result in distracting “popping” artifacts where an object suddenly shifts in appearance. Stochastic LOD creates a cross-dissolve between LOD levels by randomly assigning pixels to either the closer or farther LOD (Figure 2). For more information, see the Finding Next Gen: CryEngine 2. SIGGRAPH Advanced Real-Time Rendering in 3D Graphics and Games course, pp. 97-121.

Read the full blog, Implementing Stochastic Levels of Detail with Microsoft DirectX Raytracing, on the NVIDIA Developer Blog.