- Introduced by
- Ben Mildenhall
- Year
- 2020
- Type
- Neural network architecture
- Family
- Deep Learning, 3D Vision, Generative Models
What does it do?
Neural Radiance Fields (NeRF) is a method introduced by Mildenhall et al. in 2020 that represents a 3D scene as a continuous function parameterized by a neural network.
Given multi-view images of a scene, NeRF learns to predict the colour and density of light at any spatial location and viewing direction, which allows novel views of the scene to be rendered with high visual fidelity.
The intuition behind the method
NeRF replaces an explicit 3D model, such as a mesh or voxel grid, with a neural network that maps a 3D position and viewing direction (x, y, z, θ, φ) to a colour (r, g, b) and a density. Positional encoding helps the network represent fine spatial detail. To render a new view, a ray is cast from the virtual camera through each pixel, the network is queried at points along that ray, and volume rendering combines the colours and densities of those points. The network is fitted so that rendered pixels match the photographs of the training views.
History
Ben Mildenhall and colleagues introduced NeRF in 2020, published at ECCV (see mildenhall2020). The work showed that implicit neural representations could produce high-quality novel views, and it has since prompted a large body of follow-up research. Later variants include faster renderers such as instant-ngp, and extensions to dynamic scenes and other settings.
When to use it
Choose NeRF for novel view synthesis when a set of calibrated multi-view images of a largely static scene is available and the scene is of moderate complexity. Training requires a known camera pose for each input image; these poses are commonly estimated with structure-from-motion, and pose errors degrade the reconstruction. It suits applications such as immersive virtual viewing, 3D content creation, and high-fidelity scene reconstruction. Avoid it when only very few views or a single image are available, since the method relies on densely sampled viewpoints; classical 3D reconstruction is generally the better starting point in those cases. Avoid the original formulation when real-time rendering is required, because each pixel needs many network queries; faster variants such as instant-ngp are the usual alternative.
Limitations and considerations
- Rendering is slow in the original formulation because every pixel needs many samples along its ray, and each sample requires a network evaluation
- Relies on densely sampled multi-view images; performance degrades when the number of input views is small
- Training takes long GPU time, even for small scenes
- The original formulation assumes a static scene; capturing dynamic scenes and transient effects requires extensions
- The original formulation assumes a bounded scene and input photographs taken under consistent lighting and exposure; unbounded backgrounds and appearance changes between photographs are not handled by the original method
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Produces novel views from multi-view photographs without requiring an explicit mesh or voxel model of the scene
- Stores the scene in the weights of a fixed-size network rather than in an explicit voxel grid, so storage does not grow with grid resolution; rendering remains expensive because each sample requires a network query
- Because the scene is a continuous function, the virtual camera can move smoothly between viewpoints
- Colour depends on viewing direction, so view-dependent appearance can be represented within the limits of what the network learns
Applications
- 3D scene reconstruction and virtual environment creation from real-world photography
- Novel view synthesis for static scenes, with dynamic-scene extensions needed for free-viewpoint video and immersive telepresence
- Rendering of captured static objects or scenes from viewpoints absent from the input photographs
- Creating photorealistic 3D scene representations from photographs with estimated camera poses for digital asset production
How it works
How it works
Coordinates and viewing directions are mapped to sinusoidal functions at several frequencies before they enter the network. This lets the MLP represent high-frequency spatial variation that it would otherwise tend to smooth over.
The encoded inputs pass through a multi-layer perceptron that outputs a volume density, which depends on position, and a colour, which also depends on viewing direction.
For each ray, the colours of the sample points are combined with the standard volume rendering (alpha-compositing) equation. Each sample contributes its colour weighted by its own opacity and by the transmittance, the fraction of light not already blocked by samples nearer the camera.
During training, rays passing through the training photographs are sampled and the rendered colours are compared with the true pixel colours. During inference, rays from a chosen camera pose produce the novel view.
Common pitfalls
- Too few positional-encoding frequencies can cause underfitting, so high-frequency detail is lost from the learned representation
- Inaccurate camera poses or misaligned views corrupt the learned scene, because the training loss compares rendered and photographed pixels that no longer correspond
- Ray sampling that rarely places samples in empty space may leave the density in those regions poorly constrained; the effect depends on the sampling scheme used
Frequently asked questions
What is positional encoding and why is it necessary?
Neural networks tend to learn smooth functions and struggle to fit high-frequency variation directly from raw coordinates. Positional encoding maps each coordinate to sinusoidal functions at several frequencies, which lets the network represent both coarse geometry and fine detail. Without it, the learned representation is generally expected to be smoother and to lose fine texture.
How does volume rendering work?
Volume rendering integrates colour along each camera ray. Each sample point contributes its colour weighted by its density, that is, its opacity, and by the transmittance, the fraction of light that has not been absorbed by samples closer to the camera. Summing these contributions gives the pixel colour, and samples nearer the camera with high opacity dominate the result. This ordering arises from the compositing equation itself rather than from an explicit depth buffer.
Why is NeRF so slow to render?
Each pixel requires many samples along its camera ray, and the MLP must be evaluated at every sample. The cost therefore grows with image resolution and with the number of samples per ray. Faster variants such as instant-ngp reduce the cost of these network queries.
Related methods
Sources
Mildenhall, B., Srinivasan, P. P., Tancik, M., Barron, J. T., Ramamoorthi, R., & Ng, R. (2020). NeRF: Representing scenes as neural radiance fields for view synthesis. In Computer Vision-ECCV 2020: 16th European Conference (pp. 405-421). Springer International Publishing.
Open DOI reference