DONeRF: Towards Real-Time Rendering of Neural Radiance Fields using Depth Oracle Networks

Thomas Neff, Pascal Stadlbauer, Mathias Parger, Andreas Kurz, Chakravarty R. Alla Chaitanya, Anton Kaplanyan, Markus Steinberger · DOI

TL;DR

This paper introduces DONeRF, a novel method for real-time rendering of neural radiance fields (NeRFs). By employing a "depth oracle network" to intelligently predict where to sample along rays, DONeRF drastically reduces the number of samples needed, achieving comparable or better quality than NeRF at significantly lower computational cost. This breakthrough makes high-fidelity neural rendering practical for interactive applications like VR and games.

What Problem Does This Paper Address?

Neural radiance fields (NeRFs) have shown incredible promise in generating photorealistic novel views of 3D scenes. However, their primary limitation for real-time applications (like VR or video games) is their extreme computational cost. NeRF requires evaluating a neural network hundreds of times for each ray to render a single image, leading to prohibitive computational demands (petaFLOPS). This paper aims to bridge this gap by developing a method that can render high-quality neural representations in real-time, without requiring massive computational resources or complex acceleration structures.

Methods

DONeRF introduces a two-stage approach:

  1. Depth Oracle Network: This network acts as a smart guide. Instead of directly predicting depth (which is prone to errors, especially at discontinuities), it predicts the likelihood that a specific segment along a ray is important for rendering. This is framed as a classification problem, where segments are classified as important or not. To make this task easier and more robust, the oracle uses:
  2. Filtered, Discretized Depth Targets: Ground truth depth is smoothed and quantized to create more stable training targets.
  3. Ray Unification: Rays originating from different positions but pointing in similar directions are mapped to a unified space to simplify the oracle's task.
  4. Space Warping: The 3D space is warped to bring the background closer to the view cell, helping the network better distinguish foreground and background details.
  5. Locally Sampled Shading Network: This network is similar to the original NeRF's rendering component but uses far fewer samples. It leverages the sample locations predicted by the depth oracle to perform ray accumulation and generate the final RGBA output. This local sampling strategy, guided by the oracle, is key to reducing computational load without sacrificing quality.

Datasets

The authors used several synthetic datasets for training and evaluation, rendered using Blender's Cycles path tracer. These include:

  • Bulldozer: A scene with fine, high-frequency details and diffuse shading.
  • Forest: A scene with cel-shaded foliage and trees, featuring a person in the foreground.
  • Classroom: A challenging indoor scene with thin geometric details and intricate textures.
  • San Miguel: A scene known for difficult high-frequency transparent materials and complex disocclusions.
  • Pavillon: A scene featuring complex view-dependent effects like reflections and refractions in a pool, as well as transparent objects.
  • Barbershop: A small indoor scene with realistic global illumination and challenging mirrors.

They also explored training DONeRF without ground truth depth by extracting depth maps from a pre-trained NeRF, demonstrating its applicability in scenarios where ground truth is unavailable.

Key Insights and Ideas

  • Intelligent Sampling is Key: The core insight is that not all parts of a ray are equally important for rendering. By intelligently predicting "important" sample locations, we can drastically reduce the number of samples needed.
  • Classification Over Regression for Depth: Framing the depth prediction as a classification task (is this segment important?) rather than regression (predict exact depth) makes the "depth oracle" more robust, especially around depth discontinuities.
  • Space Warping for Better Detail: Warping the 3D space towards the view cell center helps the network better handle foreground and background details, improving overall scene representation.
  • Compactness and Speed are Achievable: DONeRF demonstrates that high-quality neural rendering can be achieved with compact models (two MLPs) and significantly reduced computation, making it practical for real-time applications.
  • Ground Truth Depth is Helpful, Not Essential: While ground truth depth aids training, DONeRF can still achieve competitive results even when trained with depth maps extracted from a NeRF, highlighting its flexibility.

Key Results

  • Significant Speedup: DONeRF reduces inference costs by up to 48x compared to NeRF.
  • Real-Time Performance: Achieves interactive frame rates (around 20 FPS) on a single GPU for 800x800 images.
  • High Quality: Achieves equal or better quality (PSNR) than NeRF with significantly fewer samples (as few as 2-4 samples per ray compared to NeRF's 256).
  • Compact Representation: Requires a memory footprint comparable to NeRF (around 4MB for a scene).
  • Improved Performance on Large Scenes: Outperforms NeRF and other methods on large-scale scenes where they struggle.
  • Ablation Studies: Showed that ray unification adds ~0.6 dB PSNR, classification adds ~0.6-1.5 dB, multiple inputs add ~1 dB, and neighborhood/depth smoothing filters add ~1.3-1.8 dB.

Limitations and Future Work

  • Transparent/Reflective Surfaces: DONeRF, especially when trained without ground truth depth, can struggle with perfectly transparent or reflective surfaces (like mirrors) due to relying on single surface depth estimates.
  • Future Work:
    • Extend training to use multiple ground truth depth values for better handling of transparent/reflective surfaces.
  • Develop methods to eliminate the need for a full NeRF round-trip when ground truth depth is unavailable.
  • Adapt the sampling strategy for dynamic scenes and relighting.
  • Explore integration with caching and baking techniques for further speedups without sacrificing compactness.

Summary updated

Abstract

The recent research explosion around implicit neural representations, such as NeRF, shows that there is immense potential for implicitly storing high-quality scene and lighting information in compact neural networks. However, one major limitation preventing the use of NeRF in real-time rendering applications is the prohibitive computational cost of excessive network evaluations along each view ray, requiring dozens of petaFLOPS. In this work, we bring compact neural representations closer to practical rendering of synthetic content in real-time applications, such as games and virtual reality. We show that the number of samples required for each view ray can be significantly reduced when samples are placed around surfaces in the scene without compromising image quality. To this end, we propose a depth oracle network that predicts ray sample locations for each view ray with a single network evaluation. We show that using a classification network around logarithmically discretized and spherically warped depth values is essential to encode surface locations rather than directly estimating depth. The combination of these techniques leads to DONeRF, our compact dual network design with a depth oracle network as its first step and a locally sampled shading network for ray accumulation. With DONeRF, we reduce the inference costs by up to 48x compared to NeRF when conditioning on available ground truth depth information. Compared to concurrent acceleration methods for raymarching-based neural representations, DONeRF does not require additional memory for explicit caching or acceleration structures, and can render interactively (20 frames per second) on a single GPU.
BibTeX
@article{neff2021donerf,
  author = {Thomas Neff and Pascal Stadlbauer and Mathias Parger and Andreas Kurz and Chakravarty R. Alla Chaitanya and Anton Kaplanyan and Markus Steinberger},
  title = {{DONeRF: Towards Real-Time Rendering of Neural Radiance Fields using Depth Oracle Networks}},
  journal = {Computer Graphics Forum},
  year = {2021},
  url = {https://openreview.net/forum?id=sE9vBqFS466},
}
Figure