Foundations to Frontier
Tests

Neural Radiance Fields and Gaussian Splatting

Neural radiance fields (NeRF, Mildenhall et al., 2020) represent a scene as a function from a 3-D position and viewing direction to density and colour. They render images by integrating along camera rays, and are trained so that the renders match posed photos. 3D Gaussian splatting (Kerbl et al., 2023) represents the scene instead with millions of anisotropic 3-D Gaussians that are projected and alpha-composited, which renders in real time. This page covers the volume-rendering equation and its quadrature, positional encoding, hierarchical and proposal sampling, fast grid-based fields (Instant-NGP), splatting with EWA projection, adaptive densification and spherical-harmonic colour, and feed-forward and SLAM variants. In the exercises you render a ray, encode positions, project a Gaussian and composite splats. You then measure two design choices. With 48 uniform samples per ray, 42% of rays stepped over a 5 cm wall; 16 coarse plus 32 importance samples from an ideal proposal missed under 1.5% and beat 128 uniform samples. Importance samples placed from a point-sampled coarse pass still missed 58%. Encoding 4 frequencies cut an MLP's test error from 0.166 to 0.099, while 8 or 12 frequencies fitted the noise (0.313 and 0.447).

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Learning a 3-D scene from photos

Take a few dozen photos around an object with known camera positions. A radiance field is a model that, for any point in space, says how dense and what colour it is. To make an image, follow a ray from the camera through each pixel, add up the colours of the points it passes, and stop counting once something opaque blocks the view. Training adjusts the model until these renders match the photos; afterwards it can render views nobody photographed. Gaussian splatting does the same with millions of small coloured blobs, which can be drawn much faster. The demo samples one ray through a thin wall: with too few samples the wall is missed.

3-D vision lab
Wall (shaded) at depth 3.37; 16 stratified samples. Accumulated opacity 0.00, rendered depth none. With few samples the thin wall is often missed entirely; NeRF's hierarchical sampling puts extra samples where the coarse weights are large.
Why engineers care

Radiance fields and splats turn drone surveys, rover imagery and spacecraft inspection photos into photorealistic 3-D models, and they are becoming map representations for robots.

📝 Quick check (Level 0)
0/3 answered
  1. 1. A radiance field gives, for each 3-D point…
  2. 2. Images are rendered by…
  3. 3. Gaussian splatting represents the scene with…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Volume rendering: C(r) = ∫ T(t) σ(r(t)) c(r(t), d) dt with transmittance T(t) = exp(−∫ σ ds). The quadrature uses samples tᵢ: αᵢ = 1 − exp(−σᵢ δᵢ), Tᵢ = Π (1 − αⱼ) over j before i, weights wᵢ = Tᵢ αᵢ; depth is Σ wᵢ tᵢ. The same weights give expected depth and opacity.
  • NeRF (Mildenhall et al., 2020): an 8-layer MLP maps encoded position (L = 10, 63 numbers) to density, and adds the encoded view direction (L = 4) for colour; hierarchical sampling with 64 coarse and 128 fine samples per ray; trained per scene from posed images (poses from COLMAP) with a photometric loss; a day or more of training per scene on one GPU, and many seconds per frame.
  • Positional encoding: γ(x) = (sin 2ᵏπx, cos 2ᵏπx) for k below L; MLPs are biased towards low frequencies (spectral bias), and Fourier features fix this (Tancik et al., 2020).
  • Better and faster fields: mip-NeRF (2021) renders cones to avoid aliasing; mip-NeRF 360 (2022) adds scene contraction and a proposal network for unbounded scenes; Plenoxels and TensoRF (2022) use explicit grids; Instant-NGP (2022) uses multiresolution hash grids and trains in seconds to minutes; Zip-NeRF (2023) combines them. NeRF-W handles changing lighting and transient objects.
  • 3D Gaussian splatting (Kerbl et al., 2023): each Gaussian has a mean, a covariance (scale and rotation), opacity and spherical-harmonic colour (degree 3, 48 numbers). Gaussians are projected with the EWA approximation Σ′ = J W Σ Wᵀ Jᵀ, sorted per 16 × 16 tile by depth and alpha-composited with the NeRF weights. Training starts from SfM points and clones, splits and prunes Gaussians (adaptive density control); it renders in real time (30 fps or more at 1080p in the paper, often over 100).
  • Since 2023: Mip-Splatting and 2D Gaussian splatting (2024) for anti-aliasing and surfaces; 3DGS-MCMC (2024) densification; compression to tens of MB; dynamic 4D Gaussians; SLAM with splats (SplaTAM, MonoGS, 2024); feed-forward reconstruction from few views (pixelSplat, MVSplat, 2024). Tools: nerfstudio, gsplat. Satellite variants (Sat-NeRF 2022, EO-NeRF 2023) model shadows and RPC cameras.
  • Evaluation: PSNR, SSIM and LPIPS on held-out views; geometry checked against LiDAR or depth.
📝 Quick check (Level 1)
0/3 answered
  1. 1. NeRF's position encoding has how many numbers (L = 10)?
  2. 2. Gaussian splatting is fast because it…
  3. 3. Instant-NGP speeds up NeRF with…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Rendering rays and splats

Exercise 1.

  • Render one ray with the NeRF quadrature.
  • Positional encoding.
  • Project a 3-D Gaussian with EWA and evaluate its opacity at a pixel.
  • Front-to-back alpha compositing.

Practice.

  • Get poses first: COLMAP or GLOMAP on the images (G4-3); bad poses ruin any radiance field.
  • Use nerfstudio (nerfacto, splatfacto) or gsplat; start with splatting for speed, and use NeRF-style fields when you need smooth, compact or relightable models.
  • Capture with even coverage, fixed exposure and sharp images; hold out every 8th image for PSNR, SSIM and LPIPS.
  • For geometry use 2D Gaussian splatting or a signed-distance field, and validate depth against LiDAR.
  • Watch the Gaussian count and memory (about 59 floats each); prune and compress for deployment.
# nerfstudio command line (2024-2026): poses with COLMAP, then train and export a Gaussian-splat scene
# ns-process-data images --data drone_photos/ --output-dir scene/
# ns-train splatfacto --data scene/ --max-num-iterations 30000
# ns-export gaussian-splat --load-config outputs/scene/splatfacto/<run>/config.yml --output-dir export/
import torch, gsplat
means = torch.randn(10000, 3, device="cuda"); quats = torch.nn.functional.normalize(torch.randn(10000, 4, device="cuda"), dim=-1)
scales = torch.full((10000, 3), 0.02, device="cuda"); opac = torch.full((10000,), 0.8, device="cuda"); colors = torch.rand(10000, 3, device="cuda")
viewmat = torch.eye(4, device="cuda")[None]; viewmat[0, 2, 3] = 4.0
K = torch.tensor([[[500.0, 0, 320], [0, 500, 240], [0, 0, 1]]], device="cuda")
img, alpha, meta = gsplat.rasterization(means, quats, scales, opac, colors, viewmat, K, 640, 480)
🐍 Exercise 1: rays, encodings and splats
Render a ray with the NeRF quadrature, compute positional encodings, project a 3-D Gaussian with EWA, evaluate its opacity at a pixel and composite splats.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Radiance fields need, before training…
  2. 2. A popular framework for NeRF and splats:
  3. 3. Novel-view quality is measured with…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

From the integral to the quadrature. Assume density σᵢ and colour cᵢ are constant on the segment [tᵢ, tᵢ₊₁] of length δᵢ. The light surviving to the segment is Tᵢ = exp(−Σ σⱼ δⱼ) = Π (1 − αⱼ), both over j before i, and the share absorbed inside it is 1 − exp(−σᵢ δᵢ) = αᵢ. So C = Σ Tᵢ αᵢ cᵢ exactly for piecewise-constant fields; the weights sum to the total opacity, at most 1. Gaussian splatting uses the same formula with αᵢ from projected Gaussians, so it is the same image-formation model with a different scene representation.

Sampling is the bottleneck. Point samples only see density where they land. A surface thinner than the sample spacing is hit with probability about thickness / spacing, so most rays step over it. Hierarchical sampling helps only if the coarse pass knows where the surface is: NeRF trains a separate coarse network whose density is effectively smoother, and mip-NeRF 360 trains a proposal network whose weights must bound the fine weights. Importance sampling from the piecewise-constant weights is inverse-CDF sampling, as in Monte Carlo integration.

Spectral bias and encodings. Plain ReLU MLPs fit low frequencies first and high frequencies very slowly; mapping x to sinusoids of frequencies up to 2ᴸ⁻¹π makes the network’s neural tangent kernel a stationary kernel with bandwidth set by L (Tancik et al., 2020). Too few frequencies underfit detail; too many let the network interpolate noise between training samples, which in NeRF shows up as floaters when views are few.

Projection of Gaussians. A 3-D Gaussian under the locally linearised projection x ↦ J W x stays Gaussian with covariance J W Σ Wᵀ Jᵀ (Zwicker et al., 2001), which keeps splatting differentiable and cheap.

📝 Quick check (Level 3)
0/3 answered
  1. 1. The quadrature is exact for…
  2. 2. Hierarchical sampling fails when…
  3. 3. Too many encoding frequencies cause…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

How many samples does a ray need to see a thin surface, what does hierarchical sampling require, and how many encoding frequencies should a field use?

History.

  • M. Levoy, “Efficient ray tracing of volume data” (1990); M. Zwicker et al., “EWA splatting” (2001).
  • B. Mildenhall et al., “NeRF: representing scenes as neural radiance fields for view synthesis” (2020); M. Tancik et al., “Fourier features let networks learn high frequency functions in low dimensional domains” (2020).
  • J. Barron et al., “Mip-NeRF 360” (2022); T. Müller et al., “Instant neural graphics primitives” (2022).
  • B. Kerbl et al., “3D Gaussian splatting for real-time radiance field rendering” (2023).

Exercise 2, part 1: sampling. 500 rays from depth 2 to 6, each crossing a 5 cm wall (density 100, opacity 0.993) at a random depth between 2.5 and 5.5, with a random grey colour, on a white background.

  • Methods: stratified uniform sampling with 16, 48, 128 or 512 samples; hierarchical sampling with 16 coarse and 32 importance samples, where the coarse weights come either from point samples of the same field or from an ideal proposal (the exact share of the wall in each coarse bin).
  • Measures: share of rays that miss the wall (accumulated opacity below 0.5), colour error, and depth error on the rays that hit.
sampling samples missed colour error depth error on hits
uniform 16 0.774 0.3843 0.0164
uniform 48 0.42 0.2109 0.016
uniform 128 0.008 0.0141 0.012
uniform 512 0.0 0.0014 0.0026
16 + 32, point-sampled coarse 48 0.578 0.2809 0.0114
16 + 32, ideal proposal 48 0.008 0.0077 0.0055

Part 2: encoding. f(x) = sin πx + 0.5 sin 4πx + 0.25 sin 12πx on [−1, 1], 128 random training points with noise 0.05; a 2 × 64 ReLU MLP, 600 full-batch Adam steps; inputs encoded with L = 0, 4, 8 or 12 frequencies; error on 1001 grid points.

encoding train RMSE test RMSE
none (L = 0) 0.1475 0.1656
L = 4 0.0193 0.0987
L = 8 0.0057 0.3133
L = 12 0.0 0.4469
  • Thin surfaces need dense or smart samples: 48 uniform samples missed 42% of walls (45% and 40% on seeds 1 and 2), and 128 still missed about 1%.
  • Hierarchical sampling is only as good as its coarse pass: importance samples drawn from point-sampled coarse weights missed 58% (57% and 53%), because 16 samples rarely land in a 5 cm wall and there is then nothing to refine. With an ideal proposal, 48 samples missed under 1.5% and beat 128 uniform samples in colour error on every seed (0.0077 against 0.0141; 0.0093 against 0.0139; 0.0086 against 0.0136). This is why NeRF trains a coarse network and mip-NeRF 360 a proposal network.
  • Encoding frequencies must match the data: without encoding the MLP underfit (test 0.166, 0.182, 0.158 on seeds 0, 1, 2); L = 4 was best (0.099, 0.069, 0.047). L = 8 and 12 drove training error far below the 0.05 noise and generalised worse (0.27–0.34 and 0.39–0.45). With dense supervision from many views, NeRF can afford L = 10.
  • Caveat: one-dimensional toys; no trained NeRF or splats, and the ideal proposal is an oracle.
🐍 Exercise 2 (research): how many samples does a ray need to see a thin surface, what does hierarchical sampling require, and how many encoding frequencies should a field use?
Count how often rays miss a thin wall with uniform and hierarchical sampling, and fit a 1-D signal with an MLP using 0, 4, 8 and 12 encoding frequencies.

Radiance fields and splats in AI, robotics and aerospace

  • Mapping and inspection: drone surveys of infrastructure and terrain are turned into navigable splat models; Sat-NeRF and EO-NeRF reconstruct surfaces from multi-date satellite images with shadows and RPC cameras.
  • Space: NeRF- and splat-based reconstruction of non-cooperative spacecraft from inspection imagery supports pose estimation for rendezvous and servicing.
  • Robotics: Gaussian-splat SLAM (SplaTAM, MonoGS) and splat maps give photorealistic, differentiable maps for localisation, simulation and training of visual policies.

References

  1. B. Mildenhall et al. (2020). “NeRF: representing scenes as neural radiance fields for view synthesis.” ECCV.
  2. M. Tancik et al. (2020). “Fourier features let networks learn high frequency functions in low dimensional domains.” NeurIPS.
  3. J. T. Barron et al. (2022). “Mip-NeRF 360: unbounded anti-aliased neural radiance fields.” CVPR.
  4. T. Müller, A. Evans, C. Schied and A. Keller (2022). “Instant neural graphics primitives with a multiresolution hash encoding.” ACM TOG (SIGGRAPH).
  5. B. Kerbl, G. Kopanas, T. Leimkühler and G. Drettakis (2023). “3D Gaussian splatting for real-time radiance field rendering.” ACM TOG (SIGGRAPH).
  6. M. Zwicker, H. Pfister, J. van Baar and M. Gross (2001). “EWA volume splatting.” IEEE Visualization.
  7. R. Marí, G. Facciolo and T. Ehret (2022). “Sat-NeRF: learning multi-view satellite photogrammetry with transient objects and shadow modeling using RPC cameras.” CVPR Workshops.