Modelresearch
Neural radiance field
Also called NeRF.
Represent a scene as a function from 3D position and direction to density and color, fitted to posed images by differentiable volume rendering.
A neural radiance field, or NeRF, describes a scene by a function that gives, for every point in space and every viewing direction, a density and a color. The density says how much the point blocks light, and the color is the light that leaves the point in that direction. A picture from any camera is made by sending a ray through each pixel, sampling the function along the ray, and adding up the colors with the weights of classical volume rendering. Mildenhall et al. (2020) represent the function by a small fully connected neural network and fit it to a few dozen photos with known cameras, so that the rendered pixels match the real ones. The result renders new views of high quality. Unlike multi-view stereo, which looks for a surface, NeRF fits a soft volume whose purpose is to reproduce images; 3D Gaussian splatting uses the same blending rule with an explicit set of Gaussians in place of the network. This page gives the representation and the rendering formula; the network itself has no correctness theorem and its cost is outside the page.
The machine
Representation. The scene is a function
The density depends only on the position , and the color depends on and the direction . This lets the model show highlights that move with the view, while the geometry stays the same for all views. In the paper, goes through 8 fully connected layers of 256 units, which give and a feature vector; the feature and the direction then go through one layer of 128 units, which gives .
Positional encoding. A plain network of gives blurry results, because such networks learn low frequencies first. The paper maps each coordinate of and by
with for position and for direction, before the network.
Rendering a ray. A pixel defines the ray from the camera center , as in the pinhole model. Its expected color between the near and far bounds and is the integral of the emission and absorption model of Max (1995):
is the transmittance: the fraction of light from that reaches the camera without being blocked.
Quadrature. The paper splits into equal bins and draws one sample uniformly in each bin (stratified sampling). With and the values at , the estimate is
This is exact when and are constant on each interval , and it is differentiable in all and , so the network can be fitted by gradients (backpropagation). The last form shows that it is front-to-back alpha compositing, the "over" operator of Porter-Duff compositing, with opacity .
Hierarchical sampling. Most samples of a ray fall in empty space or behind the surface. The paper evaluates a coarse network at stratified samples, turns the weights into a piecewise constant density along the ray, draws more samples from it by inverse transform sampling, and evaluates a fine network at all samples. This is importance sampling of the rendering integral.
What it counts
What it predicts. The color of any ray through the scene, so an image from any new camera inside the range of the training views. The weights also give an expected depth per ray, which is a by-product.
What a fit minimizes. For a batch of rays from the training images with true colors , the loss is
the squared error of the coarse and the fine rendering. It is a photometric loss: an image space form of photo-consistency. The paper uses batches of 4096 rays, Adam with a learning rate that decays from to , and 100 to 300 thousand iterations, which took one to two days on one NVIDIA V100 GPU per scene. One scene is one fit; nothing is learned across scenes.
Cost of one ray. Rendering a ray takes network evaluations and work for the sums and the sampling. The cost of one evaluation of the network is outside the page.
Relation to other models
- Volume rendering. The rendering integral is the emission and absorption model of Max (1995), used for decades to show medical and scientific volumes. NeRF adds a learned field and fits it to images.
- Alpha compositing. With , the quadrature is the front-to-back "over" of Porter and Duff along the ray.
- 3D Gaussian splatting. It uses the same sum , but the come from projected 3D Gaussians sorted by depth, not from samples of a network along the ray. This makes it much faster to render.
- Multi-view stereo. MVS seeks a surface on which the images agree. NeRF seeks a volume that reproduces the images. A NeRF can be dense where a surface is thin, and its geometry can be poor in regions where the color alone can explain the images.
- Light fields. A light field stores the color of every ray directly. NeRF stores a 3D field, and the rays follow from the rendering integral, which ties the views together through the geometry.
Known results in the model
Weights sum to one (a theorem). For any values and ,
Proof. By the definition, and , so . The sum telescopes to .
So is a convex combination of the sample colors and of a background color with weight . If the colors lie in , so does with a black background.
Check value (exact). Constant density over a length gives transmittance and opacity . With and , the opacity is . Splitting the segment into any number of bins gives the same result, since .
A ray by hand. Two samples have and , so and , with colors and (one channel). Then , , , the weights are 0.5 and 0.375, and . The weights and add to 1.
Benchmark results. The paper reports PSNR, SSIM and LPIPS on three data sets (Table 1): 40.15, 0.991 and 0.023 on Diffuse Synthetic 360; 31.01, 0.947 and 0.081 on Realistic Synthetic 360; and 26.50, 0.811 and 0.250 on Real Forward-Facing scenes. In that table NeRF is better than the earlier view synthesis methods it compares with. These are measurements on those data sets with that setup, not properties of the model. See PSNR for the first measure.
What is not proved. There is no theorem that the fit finds the true scene, or that the loss reaches its global minimum. The fitted density is not unique: a texture painted on a wrong surface can reproduce the training views. Rendering of views far from the training views has no error bound.
References
- Ben Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi and Ren Ng, NeRF: representing scenes as neural radiance fields for view synthesis, ECCV 2020, Lecture Notes in Computer Science, pages 405 to 421, Eq. 1 (the rendering integral), Eq. 2 (stratified sampling) and Eq. 3 (the quadrature), the positional encoding with L = 10 and L = 4, hierarchical volume sampling with 64 and 128 samples, the loss and the training settings, and Table 1 (PSNR, SSIM and LPIPS)
- Nelson Max, Optical models for direct volume rendering, IEEE Transactions on Visualization and Computer Graphics 1(2), pages 99 to 108, 1995, the absorption and emission models and the integral of the emission and absorption model along a ray
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag WZQ35M Edit this page History Report an error Markdown