NeRF: representing scenes as neural radiance fields for view synthesis

Ben Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi, Ren Ng

Abstract

We present a method that achieves state-of-the-art results for synthesizing novel views of complex scenes by optimizing an underlying continuous volumetric scene function using a sparse set of input views. Our algorithm represents a scene using a fully-connected (non-convolutional) deep network, whose input is a single continuous 5D coordinate (spatial location $(x,y,z)$ and viewing direction $(\theta, \phi)$) and whose output is the volume density and view-dependent emitted radiance at that spatial location. We synthesize views by querying 5D coordinates along camera rays and use classic volume rendering techniques to project the output colors and densities into an image. Because volume rendering is naturally differentiable, the only input required to optimize our representation is a set of images with known camera poses. We describe how to effectively optimize neural radiance fields to render photorealistic novel views of scenes with complicated geometry and appearance, and demonstrate results that outperform prior work on neural rendering and view synthesis. View synthesis results are best viewed as videos, so we urge readers to view our supplementary video for convincing comparisons.

Introduction

The goal of view synthesis is to generate photorealistic images of a scene from novel viewpoints using only a sparse set of input images. Traditional approaches often rely on discrete representations like voxel grids or textured meshes. However, voxel grids suffer from cubic memory scaling ($O(n^3)$), making high-resolution scenes prohibitively expensive to store. Meshes are difficult to optimize using gradient descent because their topology is usually fixed and "hard" edges make the math non-differentiable. Furthermore, capturing "non-Lambertian" effects—things that change appearance based on viewing angle, like specular reflections—is notoriously difficult with standard 3D models.

Neural Radiance Fields

NeRF represents a 3D scene as a continuous 5D function stored within the weights of a simple fully-connected neural network. For any point in space $(x, y, z)$ and any viewing direction $(\theta, \phi)$, the network predicts the volume density ($\sigma$, how opaque that point is) and the emitted color ($c = r, g, b$).

The NeRF pipeline: from a sparse set of input images, the model optimizes a continuous volumetric representation to render novel views.

Differentiable Volume Rendering

To render a pixel, the algorithm "marches" a ray from the camera through the scene, querying the MLP at various points. It then uses classical volume rendering math to accumulate the colors and densities into a single pixel value. Because this entire process is differentiable, the network can be trained using simple gradient descent by comparing the rendered pixel to the actual pixel in the input images.

Key Technical Innovations

  • Positional Encoding: MLPs are naturally biased toward learning low-frequency functions. To fix this, the authors map the 5D input into a higher-dimensional space using sine and cosine functions, allowing the model to represent sharp edges and fine textures.
  • Hierarchical Sampling: To avoid wasting computation on empty space, NeRF uses a "coarse" network to locate objects and a "fine" network to sample more densely in those critical areas.
  • View-Dependence: The network is structured so that density depends only on position, while color depends on both position and direction. This ensures the underlying 3D shape remains consistent while allowing surfaces to reflect light differently as the camera moves.

Datasets and Evaluation

The paper evaluates the method on three distinct types of data: diffuse synthetic 360° objects, realistic synthetic 360° objects with complex geometry (like a ship or Lego bulldozer), and real-world forward-facing scenes captured with a handheld cellphone.

A grid of input images used to train the NeRF model for a single scene.

Results

NeRF significantly outperformed existing methods like Neural Volumes (NV) and Scene Representation Networks (SRN). On the realistic synthetic dataset, NeRF achieved a PSNR of 31.01, compared to the next best method's 26.05. Qualitatively, NeRF is the first method to successfully recover extremely fine details, such as the thin rigging on a ship or the mesh grille of a microphone.

Furthermore, the representation is remarkably efficient. A NeRF model for a complex scene is only about 5MB, whereas a voxel-based representation of the same quality would require over 15GB of storage.

Limitations

Training a single scene takes 1–2 days on a high-end GPU, and rendering a single frame takes about 30 seconds, making it far from real-time. Additionally, the current formulation assumes the scene is perfectly still and does not allow for easy editing, as the entire scene is baked into the neural network weights.

Summary updated

BibTeX
@article{mildenhall2020nerf,
  author = {Ben Mildenhall and Pratul P. Srinivasan and Matthew Tancik and Jonathan T. Barron and Ravi Ramamoorthi and Ren Ng},
  title = {{NeRF: representing scenes as neural radiance fields for view synthesis}},
  journal = {Communications of the ACM},
  year = {2020},
  url = {https://openreview.net/forum?id=7PZxvHGNL6},
}
Figure