A Neural Radiance Field (NeRF) represents a 3D scene as a continuous function stored in the weights of a small MLP, and renders novel views by shooting rays through that function and integrating color along them. Given a handful of posed photos, it lets you synthesize any new camera view.

Neural radiance fields for view synthesis

  • Input pictures synthesize any view
    • gets you depth maps Neural Net input:
  • 3D coordinate vector
  • viewing direction

Output:

  • color
  • volume density (describes how opaque the point is)

The MLP radiance field

The scene is a function . Density depends only on position (a point is equally solid from any angle), while color depends on both position and viewing direction, which is what lets NeRF capture view-dependent effects like specular highlights. In practice the MLP first predicts and a feature vector from , then concatenates the direction to predict color.

Positional encoding of coordinates

An MLP fed raw produces blurry results because networks are biased toward low-frequency functions. NeRF lifts each coordinate into a high-frequency Fourier basis first:

This encoding is what allows the MLP to represent sharp geometry and fine texture. It is a close cousin of the Positional Encoding used in transformers.

Ray sampling

For each pixel, cast a ray from the camera origin through that pixel. Sample points along the ray between near and far bounds. NeRF uses hierarchical sampling: a coarse network with stratified samples finds where mass is, then a fine network places more samples near high-density regions so compute is not wasted on empty space.

The rendering integral

Expected color along a ray is the volume-rendering integral, accumulating emitted color weighted by how much light reaches that point and how opaque it is:

Here is transmittance, the probability the ray travels to unobstructed. The discrete form used in practice, with :

Because this whole pipeline is differentiable, the model is trained by simple photometric loss: render the training rays and minimize squared error against the real pixel colors.

Relation to Gaussian Splatting

NeRF is accurate but slow: rendering requires many MLP evaluations per ray. Gaussian Splatting represents the scene as an explicit set of 3D Gaussians rasterized directly to the screen, achieving real-time rendering while keeping differentiability, and has largely displaced NeRF where speed matters.

Common pitfalls

  • Requires accurate camera poses (usually from structure-from-motion); pose error smears the reconstruction.
  • A vanilla NeRF overfits one static scene and does not generalize to new scenes.
  • Training and rendering are compute-heavy; without positional encoding results are blurry.