skip to content

Search

← From Frames to Worlds

Part IV — Worlds (2024–2026)

The Third Dimension

NeRF, 3D from 2D priors, and Gaussian splatting — where 3D meets video and worlds.

2020–2023 17 min read 3 papers

It is March 2020. Multi-view stereo and structure-from-motion pipelines have spent two decades turning a handful of photographs into an explicit point cloud or mesh — faithful to the geometry the cameras could triangulate, blind to whatever the cameras never quite captured. A six-author paper proposes something stranger: throw the mesh away, and train a small neural network to answer, for any point in space and any viewing direction, how much light arrives there. Over the following three and a half years that idea for representing a scene is stripped of its need for real photographs, then stripped of its need for a neural network at all, arriving at an explicit, real-time representation that puts a version of it on an ordinary phone.

Where We Were

By 2020, view synthesis — the problem of generating a photograph from a camera position no photograph was actually taken from — had two working but incompatible families of solutions. The first, built on decades of multi-view stereo and structure-from-motion, triangulates matching features across a set of calibrated photographs into an explicit 3D representation: a point cloud, a voxel grid, or a textured mesh. That representation is discrete by construction — a fixed set of points or voxels, decided once at reconstruction time — and it struggles with anything a static, opaque surface model does not capture well: reflections, translucency, thin structures like foliage, or fine geometric detail smaller than the reconstruction’s resolution. The second family, image-based rendering, skips reconstructing 3D geometry at all and instead blends or warps nearby captured photographs directly into a novel view. That sidesteps the discretization problem but pays for it with density: it needs many closely spaced photographs to interpolate between, and it extrapolates badly to viewpoints the capture did not anticipate.

Neither family treated the scene itself as something differentiable — a function whose parameters could simply be optimized by gradient descent against a rendering loss, the way every other generative model in this book’s lineage already was. That gap is what a continuous, per-scene function optimized directly from posed photographs could close, if volume rendering could be made differentiable enough to backpropagate through.

Three and a half years from a network per scene to real time on a phone Each step removes a requirement the last one still needed: real photographs, then the network itself. Grey monospace text is the paper's own training or rendering number. 2020-03 NeRF continuous radiance field, one MLP per scene 1 to 2 days train, V100 2022-09 DreamFusion text to 3D, no photos, a frozen 2D diffusion prior guidance weight 100 2023-08 Gaussian Splatting explicit primitives, no neural network at all 41m train, 134fps render implicit, a network per scene distilled from a frozen 2D judge explicit, real time primitives Polycam shipped Gaussian splat export about seven weeks after the paper, the fastest paper to product gap this book tracks.
Each step removes a requirement the last one still needed: first real photographs, then the network itself. PNG ↓

The Breakthrough

NeRF, representing scenes as neural radiance fields for view synthesis (Mildenhall et al., 2020), answers the differentiability question directly: represent a scene as a fully connected, non-convolutional network whose input is a single continuous 5D coordinate — a 3D spatial location and a 2D viewing direction — and whose output is a volume density and a view-dependent emitted color at that point. To render a pixel, march a ray from the camera through the volume, query the network at points sampled along the ray, and composite the resulting densities and colors with classical volume rendering, which the paper notes is “naturally differentiable” — so the only supervision the whole pipeline needs is a set of photographs with known camera poses, the same calibration a structure-from-motion pipeline already computes as a byproduct. Each output pixel gets there by comparing the network’s rendered color against the corresponding pixel in a real captured photograph and backpropagating the difference through the volume-rendering integral and into the network weights — one network, trained from scratch, per scene.

Two details make that MLP good enough to compete with classical reconstruction rather than merely a demonstration. Each input coordinate passes through a fixed positional encoding before the network’s first layer — mapping a scalar pp to γ(p)=(sin⁡(20πp),cos⁡(20πp),…,sin⁡(2L−1πp),cos⁡(2L−1πp))\gamma(p) = (\sin(2^0\pi p), \cos(2^0\pi p), \ldots, \sin(2^{L-1}\pi p), \cos(2^{L-1}\pi p)), applied with L=10L=10 to each of the three position coordinates and L=4L=4 to each of the two direction components — which lets a network that is otherwise biased toward smooth, low-frequency functions represent the sharp edges and fine texture real scenes have. And the architecture routes viewing direction in only after density is decided: the position alone, encoded and passed through eight fully connected layers of 256 channels, produces a density and a 256-dimensional feature; only that feature, concatenated with the encoded viewing direction, passes through one more 128-channel layer to produce the final view-dependent color — so a surface’s density is a property of where it is, and only its appearance is allowed to change with how it is viewed, matching how real materials behave.

One network answers a 5D query: where you are, which way you look Volume rendering is differentiable end to end, so a photograph is the only supervision the pipeline needs. Grey monospace text is the paper's own architecture number. Camera ray position + direction 5D input coordinate Encoding sin/cos at many freqs L=10 pos, L=4 dir MLP 8 layers, 256 wide density + colour Volume render composite along ray differentiable sum Rendered pixel one output colour compared to photo Gradient backprop into weights one network per scene gradient flows back into the network only input or output a fixed transform the trained network the loss signal Direction is mixed in only after density is fixed, so a surface's density depends on where it is, not how it is viewed.
Every step is differentiable, so a photograph is the only supervision the whole pipeline needs; the gradient never has to leave the network. PNG ↓

Optimizing one of these networks to convergence — typically 100,000 to 300,000 iterations on a single NVIDIA V100 GPU — takes about one to two days, and rendering a single novel frame afterward, at 256 network queries per ray, takes roughly 30 seconds on the same V100. Both numbers matter for what happens next: a representation this slow to train and this slow to render was never going to reach real time by refining the same recipe. It first had to be pushed in the opposite direction, toward needing less input, before it was pushed toward speed.

That opposite direction arrived two and a half years later. DreamFusion, text-to-3D using 2D diffusion (Poole et al., 2022), asks whether a NeRF can be optimized with no photographs of the object at all — only a text prompt and a pretrained 2D text-to-image diffusion model standing in for what “photographs of that object” would even look like. The paper’s own framing is a DeepDream-like procedure: render the NeRF from a randomly sampled camera and light position, add noise to that rendering, and ask a frozen diffusion model — Imagen’s 64×64 base model, with no modifications — how far its predicted noise, conditioned on the text prompt, differs from the noise actually added. That mismatch, backpropagated through the renderer rather than through the diffusion model’s own network, is the entire training signal. No 3D data, no multi-view captures, and no gradient ever has to pass through the diffusion model’s weights, which the paper shows can be skipped without hurting the result and without the cost of differentiating through it.

No photographs, no 3D data: a frozen 2D judge is the only supervision Render, add noise, ask the diffusion model how wrong its noise guess was, push that gradient back through the renderer alone. Grey monospace text is the paper's own setting for that step. Text prompt fixed every iteration the y in the SDS loss Render NeRF random camera and light 64x64, matches Imagen Add noise forward diffusion step see image-gen ch8 Frozen diffusion predicts the added noise Imagen 64x64 base SDS gradient predicted minus true noise guidance weight 100 Update weights NeRF only, not diffusion 1.5h, 4-chip TPUv4 next iteration, a new random camera and light fixed input or transform optimized each step the frozen judge the loss signal The gradient never passes through the diffusion model's own weights, only through the renderer, at 15,000 iterations total.
Fifteen thousand iterations of the same loop, and only the renderer's weights ever move; the diffusion model stays frozen throughout. PNG ↓

The optimized representation itself is a mip-NeRF 360 MLP — five ResNet blocks of 128 hidden units with Swish activations and layer normalization between them — trained for 15,000 iterations, about 1.5 hours, on a four-chip TPUv4 machine, at a rendering resolution of only 64×64 to match the diffusion prior’s own resolution. One number stands out against everything 2D diffusion sampling had established: DreamFusion turns its classifier-free guidance weight up to ω=100\omega=100, far past the ω∈[5,30]\omega \in [5,30] range 2D image samplers use, and the paper reports this works without the visible artifacts a 2D sampler shows at similarly extreme guidance — because the NeRF’s rendered colors are already bounded by a sigmoid activation, where a 2D pixel sampler needs post-hoc clipping to stay in range. (Classifier-free guidance itself is introduced in full in Guidance; DreamFusion’s contribution here is the number, not a new mechanism.)

DreamFusion proved a NeRF could be conjured from language alone, but it inherited NeRF’s other problem in full: an MLP is still what gets optimized, and an MLP is still slow to render. By mid-2023, a wave of methods had chased that specific weakness — hash-grid feature lookups instead of a pure MLP, explicit voxel grids with far less network left to evaluate — trading some quality for large speedups, but none reaching real-time display at the resolutions unbounded, complete scenes actually need. 3D Gaussian splatting for real-time radiance field rendering (Kerbl et al., 2023) answers by discarding the network entirely. The scene becomes an explicit cloud of a few million 3D Gaussians — each one a position, an anisotropic covariance describing its size and orientation, an opacity, and a color — initialized from the same sparse point cloud a structure-from-motion calibration step already produces before any optimization begins. Training alternates gradient steps on those per-Gaussian parameters with an interleaved density-control pass that clones or splits Gaussians in under-reconstructed regions and prunes ones that have become too transparent or too large to matter, letting the number and placement of primitives adapt rather than staying fixed from initialization. What replaces the ray-marching MLP is a custom, tile-based, visibility-aware rasterizer, written to run efficiently on the GPU rather than assembled from generic autodiff operations, that projects each Gaussian onto the image plane and composites the overlapping ones in depth order — the paper’s stated result is training times competitive with the fastest prior methods and, for the first time on unbounded, complete scenes at 1080p, real-time display at 30 frames per second or more.

The Mathematics

NeRF’s rendering step turns a set of sampled densities and colors along one camera ray into a single pixel color by discretizing the volume rendering integral into a sum over NN sample points:

C^(r)=∑i=1NTi(1−e−σiδi)ci,Ti=exp⁡(−∑j=1i−1σjδj)\hat{C}(\mathbf{r}) = \sum_{i=1}^{N} T_i \left(1 - e^{-\sigma_i \delta_i}\right) c_i, \qquad T_i = \exp\left(-\sum_{j=1}^{i-1} \sigma_j \delta_j\right)
SymbolMeaning
C^(r)\hat{C}(\mathbf{r})the rendered color for camera ray r\mathbf{r}
NNnumber of points sampled along the ray
σi\sigma_ivolume density predicted at sample ii
cic_iview-dependent color predicted at sample ii
δi\delta_idistance between sample ii and the next sample
TiT_iaccumulated transmittance from the camera to sample ii

DreamFusion’s score distillation sampling (SDS) loss replaces NeRF’s photometric loss with a gradient computed entirely from a frozen 2D diffusion model’s noise prediction:

∇θLSDS=Et,ϵ[w(t)(ϵ^ϕ(zt;y,t)−ϵ)∂x∂θ],x=g(θ)\nabla_\theta \mathcal{L}_{\mathrm{SDS}} = \mathbb{E}_{t,\epsilon}\left[w(t)\left(\hat\epsilon_\phi(\mathbf{z}_t; y, t) - \epsilon\right)\frac{\partial \mathbf{x}}{\partial \theta}\right], \qquad \mathbf{x} = g(\theta)
SymbolMeaning
θ\thetathe NeRF’s parameters, the only thing optimized
x=g(θ)\mathbf{x} = g(\theta)a rendered view of the NeRF at the current parameters
zt\mathbf{z}_tthat rendering after tt steps of forward noising
yythe text prompt conditioning the diffusion model
ϵ^ϕ\hat\epsilon_\phithe frozen diffusion model’s predicted noise
ϵ\epsilonthe noise actually added during the forward process
w(t)w(t)a timestep-dependent loss weight

A 3D Gaussian is a smooth density function centered at a mean position, with its shape controlled by a covariance matrix built from a separate scale and rotation, so the two stay independently optimizable:

G(x)=exp⁡(−12(x−μ)⊤Σ−1(x−μ)),Σ=RSS⊤R⊤G(\mathbf{x}) = \exp\left(-\frac{1}{2}(\mathbf{x}-\mu)^\top \Sigma^{-1} (\mathbf{x}-\mu)\right), \qquad \Sigma = R S S^\top R^\top
SymbolMeaning
G(x)G(\mathbf{x})the Gaussian’s density value at 3D point x\mathbf{x}
x\mathbf{x}a 3D point at which the Gaussian is evaluated
μ\muthe Gaussian’s center, a learned 3D position
Σ\Sigmathe covariance matrix controlling size and orientation
RRa rotation matrix, built from a learned quaternion
SSa diagonal scaling matrix, the learned per-axis extents

Rendering composites the Gaussians that project onto a given pixel, sorted by depth, with the same transmittance-and-absorption structure NeRF’s volume rendering already established:

C=∑i=1Nci αi∏j=1i−1(1−αj)C = \sum_{i=1}^{N} c_i\, \alpha_i \prod_{j=1}^{i-1} (1-\alpha_j)
SymbolMeaning
CCthe composited color at this pixel
NNnumber of Gaussians overlapping this pixel
cic_icolor contributed by Gaussian ii
αi\alpha_iopacity contributed by Gaussian ii at this pixel
j,ij, idepth-sorted indices, nearest to camera first

What It Enabled

Explicit mesh or point cloud, multi-view stereoNeRF, implicit MLP, 20203D Gaussian splatting, explicit primitives, 2023
RepresentationFixed set of points or polygons, decided at reconstruction timeContinuous function, one MLP per sceneExplicit but continuously optimizable primitives, one set per scene
Optimizable by gradient descentNoYes, but through hundreds of network queries per pixelYes, through a fast differentiable rasterizer
View-dependent effects (reflections, translucency)Poorly, if at allYes, learned per pointYes, via per-Gaussian, view-dependent color
Typical training timeNot learned; computed directly from calibrated photos1–2 days on a single V100Minutes to tens of minutes on a single GPU
Typical rendering rateFast, but fixed once reconstructedRoughly 30 seconds per frame on a V10030+ fps at 1080p, real time

Reported on the Mip-NeRF360 benchmark dataset at each method’s best-quality setting, the same comparison the 3D Gaussian splatting paper ran against its own predecessors:

MethodPSNRTrain timeRender rate
Plenoxels23.0825m49s6.79 fps
Instant-NGP, big model25.597m30s9.43 fps
Mip-NeRF36027.6948h0.06 fps
3D Gaussian splatting, 30K iterations27.2141m33s134 fps

The pattern across those four rows is the chapter’s real argument: the highest-quality prior method (Mip-NeRF360 itself) was three orders of magnitude too slow to render in real time, and the fastest prior methods (Plenoxels, Instant-NGP) bought their speed with a visible quality cost. 3D Gaussian splatting is the first entry in the table within half a PSNR point of the best quality on offer while rendering over a thousand times faster than that same best-quality method — not a small improvement traded for a small one, but a representation that stopped forcing the tradeoff.

None of the three papers in this chapter is itself a video-generation method, but each answers a question the rest of this book keeps needing an answer to: what does a scene look like from a position or a moment nobody photographed? NeRF and its explicit successor make that question answerable for a static, real scene from real photographs; DreamFusion makes it answerable for an imagined object from nothing but a caption, generalizing the score-distillation idea beyond the 3D case it was invented for. That is the same underlying question — “what is on the other side of this cut, this camera move, this occlusion” — that the learned-simulator framing of Predicting the Next Frame first asked for whole environments rather than single objects, and that the next two chapters push toward video models that behave like interactive worlds rather than fixed clips: whether a generative video model can be steered frame by frame like a game engine (Video Models Become Game Engines), and whether a world model can serve as a general-purpose foundation model rather than a one-off simulator (World Models as Foundation Models). A NeRF’s optimized weights are also a useful point of comparison for what “latent” means elsewhere in this book: they are a compressed, continuous representation of exactly one scene, learned from scratch every time, in contrast to the single shared, amortized latent space a VAE or a latent-diffusion model like Stable Diffusion learns once across an entire dataset (Latent Diffusion and Stable Diffusion) — the same idea of operating in a learned continuous space, applied at opposite ends of the “one model, one scene” versus “one model, every scene” spectrum.

Two and a half years of 3D representation feeds two chapters on worlds NeRF's implicit field is distilled into DreamFusion's text prior and replaced outright by Gaussian splatting's explicit primitives. Grey monospace text names the month this chapter dates each result to. NeRF radiance field, one MLP Mar 2020, this chapter DreamFusion text to 3D via 2D prior Sep 2022, this chapter Gaussian Splatting explicit, real time Aug 2023, this chapter Game Engines video models steered chapter 15 World Models foundation infrastructure chapter 16 implicit representation distilled from a frozen judge explicit, what later work builds on The same 3D consistency question this chapter answers for static scenes is what the next two chapters ask of interactive worlds.
The explicit, real time representation is what later chapters build worlds on top of, not the implicit MLP that started the lineage. PNG ↓

Key Papers

PaperAuthorsYearLinkWhy it matters
NeRF: Representing Scenes as Neural Radiance Fields for View SynthesisMildenhall et al.2020arXiv:2003.08934Represented a 3D scene as a continuous, differentiable MLP optimized directly from posed photographs, replacing explicit reconstruction with a rendering loss
DreamFusion: Text-to-3D using 2D DiffusionPoole et al.2022arXiv:2209.14988Introduced score distillation sampling, optimizing a NeRF from a text prompt alone using a frozen 2D diffusion model as the only supervision, with no 3D training data
3D Gaussian Splatting for Real-Time Radiance Field RenderingKerbl et al.2023arXiv:2308.04079Replaced the MLP with an explicit cloud of anisotropic 3D Gaussians and a custom rasterizer, reaching real-time rendering at 1080p for the first time on unbounded scenes

PM Lens

Papers referenced