TL;DR
- NeRF solves novel view synthesis: from a sparse set of images with known camera poses, render new views of the same scene.
- An MLP stores color and volume density for every 3D point and viewing direction.
- The scene is a cloud of tiny colored particles. is the probability that a ray stops at ; the transmittance is the probability of getting there. The pixel color is the expected color under the PDF .
- Discretized, this is alpha compositing: with and . It is differentiable, so NeRF is trained with a photometric loss on 2D images.
- Without positional encoding (Fourier features) the results are blurry.
- Limitations: static scenes only, no editing, no generalization, slow, inaccurate surfaces. Variants fix one each: D-NeRF (dynamic), NeRF-W (internet photos), Control-NeRF (editing), Instant NGP (speed), UniSurf (surfaces).
Exam relevance
Highest priority. Exam task 4: both rendering formulas (NeRF and 3D Gaussian Splatting) were given; explain every symbol (, , , , …) and compare NeRF and 3DGS (similarities and differences). See NeRF vs. 3D Gaussian Splatting and Volume Rendering in NeRF.
Overview: NeRF (2020), the foundational breakthrough · D-NeRF (2021), dynamic NeRF · HyperNeRF (2021), topological dynamics · NeRF-W (2021), unconstrained capture · Control-NeRF (2023), scene manipulation · Instant NGP (2022), training speed. (HyperNeRF appears in the overview, but its slides are hidden and not in the PDF.)
NeRF: The Foundational Breakthrough
Novel View Synthesis
Slides 4-6
Problem: view interpolation / novel view synthesis. Input: sparsely sampled images of a scene. Learn a scene representation. Output: novel views of the scene. (NeRF, Mildenhall et al., ECCV 2020.)
Instead of learning the scene geometry directly, NeRF learns a radiance field: a neural network that takes a 3D point and a camera viewing direction and predicts a color and a density at that point. Volume rendering then turns this into an image.
Radiance field
Input: spatial location + viewing direction (5D). Output: color + density .
Volume rendering (continuous)
Given color and density, the color of every camera ray is
| Symbol | Meaning |
|---|---|
| color of the camera ray (the rendered pixel) | |
| camera ray: camera center, direction | |
| near and far bounds | |
| color at (view-dependent, from the MLP) | |
| volume density: probability of a ray terminating at an infinitesimal particle at (from the MLP) | |
| accumulated transmittance along the ray: probability that the ray travels from to without hitting any particle |
Intuition
A high density gives a high color contribution, but only if the transmittance is also high. Once the ray has hit a high-density region (inside a surface), becomes small, and everything behind it contributes nothing. The equation contains both: how dense a point is, and how likely the ray made it that far.
Trap
The upper limit of the inner integral of is , not (the speaker notes write ). Otherwise would be constant along the ray. is not an output of the MLP; it is accumulated from .
Radiance, Volumetric Radiance and Density
Slides 7-10
Radiance
Radiance is (differential) energy per unit area, solid angle and wavelength: the density of photons at a point, traveling in a given direction, at a given wavelength (= color):
- Radiance along an unblocked ray is constant (energy conservation).
- The light field is the radiance for every possible ray.
Volumetric radiance
The scene is a cloud of tiny colored particles. Their color changes according to the viewpoint. If a ray traveling through the scene hits a particle at , we return its radiance/color .
Volumetric density
The probability that the ray stops in a small interval around is . is also called volume(tric) density.


Scene representation: a field (neural? maybe)
While evaluating the field along a ray, we retrieve the color only if is visible. The transmittance is the probability that no particle is hit in . (See Neural Field.)
Trap
is a density (, unit 1/length), not a probability; is the probability. can be larger than 1.
Transmittance and Expected Ray Termination
Slides 11-14
Relating and : hit probabilities are statistically independent along the ray ():
Derivation of the transmittance (Slide 12)
Transmittance
No hits before is the exponential of the integral over the density up to .
Intuition
Survival multiplies, density adds. Because the hits are independent, the survival probabilities of consecutive pieces multiply; in the limit, the product becomes the exponential of an integral.
Expected ray termination (Slide 13):
- is a cumulative distribution function (CDF): the probability that the ray hits something before reaching . It is non-decreasing, is (right) continuous, , .
- is a probability density function (PDF): the probability that a ray stops at .
Volume rendering as an expectation (Slide 14)
The expected color along a ray is a convex combination of colors, weighted by the probability that the ray stops there.
How do we solve this? Discretize the nested integral.
Discretization: NeRF as Alpha Blending
Slides 15-19
Approximating the integral: split the ray into segments with endpoints . The segment length is .
Warning
The segments are not necessarily uniform. A piecewise constant density does not give a piecewise constant transmittance.
Approximating the nested integral: assume the volume density and color are constant within each interval (a Riemann sum):
Forward model of NeRF step by step (Slide 17)
Split into “reach ” and “from to ” (independence). is constant inside the segment. With constant , . (The speaker notes say “iid”, but only independence is needed.)
NeRF as alpha blending (Slide 18)
Volume Rendering in NeRF
Slide 19
This is the formula to know by heart (and to explain symbol by symbol):
Discrete volume rendering in NeRF
| Symbol | Meaning |
|---|---|
| estimated color of ray (the pixel) | |
| number of samples along the ray | |
| sample positions: uniformly random within evenly spaced bins between and | |
| distance between adjacent samples (not uniform) | |
| volume density at sample (MLP output) | |
| color at (MLP output, view-dependent) | |
| alpha (as in traditional alpha compositing): probability that the ray stops within segment ; computed from and , in | |
| accumulated transmittance: probability that the ray reaches sample ; sum/product only up to |
Common mistakes
- sums only up to , not .
- In NeRF, is not a network output; it is computed from and (in 3DGS, the opacity is learned).
- The samples are not equally spaced; only the bins are.
- Why not simply ? Because can exceed 1, while is always a valid probability.
Training Neural Radiance Fields
Slides 20-22
Training loop
- March camera rays through the scene to generate a sampled set of 3D points.
- Use those points and their 2D viewing directions as input to the network to produce colors and densities.
- Use classical volume rendering to accumulate them into a 2D image.
- Minimize the error between the rendered color and the ground-truth color:
The rendering function is differentiable, so the scene representation is optimized by minimizing the residual between synthesized and observed images.
flowchart LR
P["camera pose"] --> R["rays r = o + t d"] --> S["samples t_i"] --> E["positional encoding<br/>γ(x), γ(d)"] --> M["MLP F_θ"] --> O["(c_i, σ_i)"] --> V["Σ T_i α_i c_i"] --> C["pixel color Ĉ(r)"]
C -- "training only" --> L["loss vs. GT pixel<br/>backprop, update θ"]
| Training time | Inference time | |
|---|---|---|
| Input | photos with known camera poses (e.g. from COLMAP) | a new camera pose |
| What happens | render, photometric loss, backpropagation | only render |
| What is learned | the MLP weights (one network per scene) | nothing |
View-dependent illumination: the viewing direction lets the color change with the view, e.g. specular reflections on a table or screen.
Positional Encoding
Slides 23-28
Plain NeRF gives blurry results. Why? Coordinate-based networks fail to learn high-frequency details, for all kinds of data: RGB images, 3D shapes, density, radiance fields.
Solution (Tancik et al., NeurIPS 2020, “Fourier Features”):
- In the naive setting, the bandwidth of the Neural Tangent Kernel limits the spectrum of the learned function.
- A Fourier feature mapping turns the neural kernel into a stationary kernel in the low-dimensional input domain and increases the spectrum.
Positional encoding
applied to each coordinate input (pixel location for images, 3D point for NeRF).


With positional encoding, the network converges much faster and learns the exact appearance of the scene.
Geometry and Results
Slides 29-30
Scene geometry can be approximated using a threshold on the density, or with the expected ray termination depth .
NeRF recovers fine details in geometry and appearance, e.g. the rigging of the Ship, much better than LLFF, SRN and Neural Volumes.
Limitations of NeRF
Slides 31-35
| # | Limitation | Addressed by |
|---|---|---|
| 1 | Scene-specific, only static scenes can be modeled | D-NeRF |
| 2 | No editing and control: the scene is memorized in the network and can’t be modified | Control-NeRF |
| 3 | Generalization: scene-specific models, a large number of images needed | Control-NeRF (shared renderer) |
| 4 | Expensive training: 10 hours up to a few days; inference is not real time | Instant NGP |
| 5 | The extracted surface is not accurate and depends on the density threshold | UniSurf |
(NeRF-W addresses a further issue: real internet photos violate NeRF’s assumption of consistent views.)


Variants of NeRF
D-NeRF: Dynamic Scenes
Slides 36-46
For a dynamic scene there is one more variable: time. We want a radiance field .
Can we learn this directly with NeRF? Adding as an input gives blurry results: the network can reason about dynamics and shape, but doesn’t learn high-frequency details.
D-NeRF (Pumarola et al., CVPR 2021): split the problem into two stages.
- A deformation network maps every point at time into a canonical space (the scene at rest).
- A canonical network is a radiance field in the canonical space.
Conclusion: D-NeRF
- Disentangles the time-dependent deformation from the neural rendering network.
- The correspondence between the canonical shape and the deformed shape is defined by .
- Time-varying shading effects are modeled: e.g. the floor shadows are warped along time. Points in the shadow of the red ball at and map to different regions of the canonical space.
NeRF-W: NeRF in the Wild
Slides 47-57
NeRF assumes consistent input views: a 3D point seen from the same position and direction in two images has the same intensity. Internet photos violate this with:
- photometric variations (lighting, exposure, white balance)
- transient objects (people, cars, occlusions)
NeRF-W (Martin-Brualla et al., CVPR 2021) introduces per-image appearance embeddings and transient uncertainty fields, which handle lighting changes and occlusions, and performs better on unconstrained Photo Tourism datasets.
Latent appearance modeling:
- Each image gets an appearance embedding vector , trained with the model.
- The radiance depends on per-image lighting and post-processing, while the geometry stays static.
- Interpolating between two embeddings changes the appearance smoothly without affecting the 3D geometry.
Image-dependent radiance
Transient objects and uncertainty:
- A secondary transient MLP head models moving and occluding objects.
- Both static and transient components (density + color) are rendered, but the transient parts are discarded at test time.
- A per-ray uncertainty down-weights unreliable pixels.
Static + transient compositing
Static component ; transient component .
Summary: NeRF-W disentangles lighting from the 3D geometry, which stays consistent, so novel views can be rendered with variable illumination.
Disadvantages: sparse view problems (rarely observed areas like the ground, oblique angles), sensitivity to camera calibration (blurry artifacts from wrong poses), inherited NeRF weaknesses (specular surfaces, high training cost, limited generalization), and transient handling can leave artifacts or mask static scene errors.
Control-NeRF: Scene Manipulation
Slides 58-70
Prior work: the scene is memorized inside the network, which makes compositing and editing hard. Key idea: decouple the scene representation from the neural rendering network.
Control-NeRF (Lazova et al., WACV 2023)
- Hybrid 3D representation: scene-specific 3D feature volumes + a shared neural rendering network.
- Scene-agnostic rendering: one rendering network generalizes across scenes; new scenes are optimized without retraining the whole model.
- Post-hoc scene manipulation: 3D edits (object insertion, deformation, scene mixing) by modifying the feature volumes, without retraining.
- Scene representation: given images from training scenes, learn a volumetric feature per scene ( spatial resolution, feature length ).
- Rendering with feature volumes: shoot a ray, query the feature at each point by trilinear interpolation, feed it with the viewing direction to the rendering network , and apply volume rendering.
- Training and inference: at training time, volumes and rendering network are trained jointly. For a novel scene, the rendering network is fixed and only the scene volume is optimized.
Training details:
- Multi-resolution volume training (coarse to fine): train a volume until convergence, upsample by 2, train again; 4 stages up to . Faster training, high-quality synthesis and manipulation.
- Multi-scene training: sample one scene, train for iterations, save its volume, repeat (loading a new volume every iteration would cost too much GPU memory traffic).
- Generalization to novel scenes: with enough training scenes, the learned radiance function can be reused to optimize new scenes efficiently.
Instant NGP: Training Speed
Slides 71-83
Instant Neural Graphics Primitives with a Multiresolution Hash Encoding (Müller et al., SIGGRAPH 2022):
- train in minutes (instead of days)
- encode high-frequency details more compactly
- render interactively (tens of frames per second)
Three pillars:
| Pillar | What it does | Gain |
|---|---|---|
| Rendering/training algorithm | task-specific GPU implementation; skips empty space until the surface is hit | 10-100x fewer steps than naive dense stepping → fewer network queries |
| Small neural network | fully fused implementation (the whole MLP in one CUDA kernel) | 5-10x faster than TensorFlow |
| ”Good” input encoding | multiresolution hash encoding, trainable together with the network | better speed/quality trade-off, task-agnostic |
Hash encoding (details in Lecture 6.1 and Hash Encoding):
- Why multi-resolution? Automatic level of detail: low-resolution grids capture global shape, high-resolution grids fine details. The network learns fast at low resolution and refines the details later.
- Hashing: instead of allocating vectors, allocate a much smaller table of size and map each grid cell to one of the buckets with a spatial hash. Each bucket stores a learned feature vector. The table is task-agnostic (unlike NGLOD, which needs surface information to build its structure).
- Why linear interpolation? Continuity and differentiability.
Disadvantages (Slide 83):
- Encoding trade-offs: concatenating multiresolution features increases parallelism but also memory and compute.
- Hash function: simple hashing is fast but lacks coherence; better hashes add overhead without clear gains.
- Microstructure artifacts: hash collisions cause grainy noise (e.g. in SDFs), which needs filtering or smoothness priors.
- Future work: differentiable hashing; sparse volumetric data (e.g. clouds) remains open.
UniSurf: Unifying NeRF and Implicit Surfaces
Slides 87-103
The surface extracted from a NeRF is not accurate and depends on the threshold.
| Surface rendering (implicit surfaces) | Volume rendering (radiance fields) |
|---|---|
| ✓ high-quality geometry | ✗ surface is only approximated |
| ✓ clear surface definition | ✓ no mask supervision needed |
| ✗ mask supervision required | ✓ high-quality novel views, sharp textures |
| ✗ texture mapping is blurry |
UniSurf (Oechsle et al., ICCV 2021) combines the best of both worlds.
Rewrite NeRF’s volume rendering with alpha values:
(The slides write the product up to ; it must stop at , consistent with .)
Key idea of UniSurf
For solid objects, corresponds to an occupancy field at the -th sample:
Given the occupancy, the same scene can also be rendered with surface rendering (the surface is the level set ).
Training schedule: volume rendering in the early stage (optimization without masks), surface rendering in the later stage (level-set surfaces).
Rendering procedure:
- Find the surface along the ray: uniform sampling + iterative secant method.
- Define an interval around the surface.
- Volume rendering with occupancies, sampling only inside this interval (fewer points between camera and surface prevents free-space artifacts).
The interval decays exponentially over the iterations . As it shrinks, volume rendering turns into surface rendering:
Theorem (Slide 102)
Volume and surface rendering become equivalent when reducing the interval and increasing the number of samples:
Upcoming (Slide 86): 3D Gaussian Splatting for real-time radiance field rendering (Kerbl et al., SIGGRAPH 2023) → Lecture 8.
NeRF vs. 3D Gaussian Splatting
For exam task 4. 3DGS is covered in Lecture 8 (symbols of its formula: here); this is the comparison frame.
The two rendering formulas
NeRF:
3D Gaussian Splatting:
(: learned opacity of Gaussian , : the projected 2D Gaussian evaluated at the pixel.)
| NeRF | 3DGS | |
|---|---|---|
| Compositing | , | the same structure |
| Elements | samples along a ray | Gaussians sorted by depth that overlap the pixel |
| computed: | learned opacity × projected 2D Gaussian | |
| Color | MLP | spherical harmonics per Gaussian |
| Representation | implicit (the scene is in the weights ) | explicit (primitives in space) |
| Rendering | ray marching, MLP queries per pixel | rasterization / splatting |
| Speed | training hours to days, inference not real time | fast training, real-time rendering |
| Editing | hard (scene in the weights) | easy (move Gaussians directly) |
| High frequencies | needs positional encoding | small Gaussians, no encoding needed |
Intuition
Same compositing formula. They differ in where , and the ordering come from, and in how the elements are traversed (marching along rays vs. splatting sorted primitives).
Worked Example: Alpha Compositing
Two samples along a ray
, .
. The pixel color is ; the remaining is the probability that the ray passes through both samples (background).
Note that sample 2 has the higher density, but gets less weight, because sample 1 already occludes it.
Self-Test
What does NeRF's MLP take as input and give as output?
Answer and viewing direction (with positional encoding). Output: color and volume density .
Input: 3D position
Write down the continuous volume rendering equation and explain every symbol.
Answer , , . : pixel color; : camera center and ray direction; : near/far bounds; : density; : view-dependent color; : transmittance (probability of reaching unblocked).
Why is the transmittance an exponential?
Answer . This gives , whose solution is .
Hits along the ray are independent:
Why is a PDF, and what is ?
Answer = "reach " × "stop at " = density of the stopping position. is the CDF: the probability of having hit something before .
Write down the discrete NeRF rendering formula and explain , , , .
Answer . : probability to stop within segment (computed, not learned). : probability to reach sample . . : random position inside the -th of evenly spaced bins.
How is NeRF trained? What happens at inference time?
Answer , volume rendering gives the pixel color, minimize the squared error to the ground-truth pixel, backpropagate. Inference: render rays from a new camera pose with the trained MLP.
Training: rays from posed photos, samples along the rays, MLP gives
Why does NeRF need positional encoding?
Answer increase the spectrum.
Coordinate MLPs are biased towards low frequencies (limited NTK bandwidth), so results are blurry. Fourier features
Name five limitations of NeRF and a variant that addresses each.
Answer
Static scenes only → D-NeRF. No editing → Control-NeRF. No generalization, many images → Control-NeRF (shared renderer). Slow training/inference → Instant NGP. Inaccurate, threshold-dependent surfaces → UniSurf.
How does D-NeRF model dynamic scenes?
Answer maps each point to a canonical space; a canonical radiance field gives color and density. This disentangles deformation from rendering.
A deformation network
How does NeRF-W handle internet photos?
Answer models moving objects and occluders; it is discarded at test time.
Per-image appearance embeddings (lighting, exposure) change the color but not the geometry. A transient head with uncertainty
What is the key idea of Control-NeRF?
Answer
Decouple the scene (per-scene feature volumes) from a shared rendering network. For new scenes, only the volume is optimized. Editing = manipulating the feature volumes.
What are the similarities and differences between NeRF and 3DGS rendering?
Answer with . NeRF: implicit MLP, computed from and , ray marching, slow. 3DGS: explicit Gaussians, = learned opacity × 2D Gaussian, depth-sorted rasterization, real time, editable.
Same alpha compositing
Related
- Previous: Lecture 6.2: Point Cloud Processing · Next: Lecture 8: 3D Gaussian Splatting · Course: Overview
- Concepts: Gaussian Splatting, Volume Rendering, Positional Encoding, Neural Field, Hash Encoding, Inverse Rendering, Implicit and Explicit Representations, Occupancy Field
- NeRF needs camera poses, usually from COLMAP. 3D Gaussian Splatting follows in Lecture 8.