



| x | y | z | |
|---|---|---|---|
| Box center | 0.25 | 0.25 | 0.00 |
| Box side lengths | 2.00 | 1.50 | 1.50 |
The MLP takes the harmonic embedding of xyz (6 frequencies), has 6 layers with 128 units, and re-injects the embedding at layer 3. Density is a ReLU of a linear head; color is a sigmoid head. Trained for 250 epochs on 128×128 images with 128 stratified samples per ray. Validation PSNR is 24.19 (epoch-200 checkpoint, 100 views).
The ray direction is embedded with 2 harmonic frequencies and concatenated with the position features after the density head, so only color can depend on view.


| Materials scene (epoch 200) | Train PSNR | Val PSNR | Gap |
|---|---|---|---|
| Without view dependence, 128px | 23.28 | 23.22 | 0.06 |
| With view dependence, 128px | 24.19 | 24.05 | 0.14 |
| With view dependence, 400px | 24.35 | 24.21 | 0.14 |
Left: with view dependence, right: without (same frames). The view-dependent model has slightly brighter highlights on the shiny spheres (mean pixel difference 1.3–1.5/255). Without it, the network can only bake one average color per point, so highlights are dull.
Trade-off. View dependence gave +0.9 dB on both train and validation views. The train/val gap grew only from 0.06 to 0.14 dB, so at this resolution and training length it did not overfit. The risk is that a color that can change freely with direction can also explain wrong geometry: the network can paint each training view separately instead of finding the right surface. That gives good training images but floaters and wrong colors from new viewpoints. NeRF limits this in two ways, which we follow: density depends on position only, and the direction gets a low-frequency encoding (2 frequencies) and enters only the last small color layers. More frequencies or feeding direction earlier would fit specularities better but generalize worse.
A coarse NeRF is evaluated at 64 stratified samples per ray. Its weights wi = Ti(1 − e−σiδi) are normalized into a piecewise-constant PDF along the ray, and 128 more depths are drawn from it by inverse-CDF sampling. A second (fine) NeRF is evaluated on all 192 sorted samples. Both outputs get an MSE loss; the image comes from the fine network. Config: nerf_lego_coarse_fine.yaml.
| Lego, 250 epochs | Samples per ray | Training speed | Training time | Render time | Val PSNR |
|---|---|---|---|---|---|
| Single NeRF (Part 3) | 128 uniform | 76 it/s | ~7 min | 76 ms/image | 24.19 |
| Coarse + fine | 64 + 128 importance | 35 it/s | 12 min | 151 ms/image | 24.42 |
Render times are for one 128×128 image, measured back to back on the same GPU; PSNR is over 100 validation views with the epoch-200 checkpoints.
Left: single NeRF, right: coarse + fine. The fine pass puts most samples near the surface, so thin parts such as the tracks and the bucket edge are slightly sharper.
Trade-off. Coarse/fine raises validation PSNR by 0.23 dB, but each step evaluates two networks on 256 points instead of one on 128, so training and rendering are about 2× slower and the model has twice the parameters. Most of the uniform samples in the single-NeRF setup land in empty space; importance sampling spends the budget where the weights are, which matters more at higher resolutions and for thin structures.
The distance MLP has 6 layers with 128 units on the harmonic embedding of xyz (6 frequencies); a linear head gives the distance. To start from a sensible surface, the output is added to |x| − 1, so the SDF is initialized as a unit sphere and the network learns the residual. Without this, the black background lets the network put black surfaces anywhere that is only seen as background, and the extracted mesh had a large spurious floor. A 2-layer color MLP with a sigmoid takes the same features. The eikonal loss is mean((‖∇d‖ − 1)2) on random points in [−4, 4]3 with weight 0.02. Density is
σ(x) = α Ψβ(−d(x)), where Ψβ is the CDF of a zero-mean Laplace distribution with scale β.


α and β. α is the density inside the object: far inside, σ → α, so it sets how opaque the solid is. β sets how sharp the transition is: density goes from α to 0 over a band of width about β around the zero level set, and it is exactly α/2 on the surface. As β → 0 the density becomes α times the indicator of the inside.
| β (α = 10) | Final loss | Train PSNR | Val PSNR |
|---|---|---|---|
| 0.01 | 0.0044 | 21.43 | 21.35 |
| 0.05 | 0.0063 | 21.36 | 21.23 |
| 0.2 | 0.0084 | 20.52 | 20.38 |
Rows: β = 0.01, 0.05, 0.2. Two color frames, then two geometry frames.
Settings. α = 10, β = 0.01, eikonal weight 0.02, 128 samples per ray, 250 epochs, lr 5e-4 (same schedule as NeRF), and the sphere initialization above. Among the three β values, 0.01 had the lowest loss, the highest validation PSNR and the sharpest geometry (flat base plate, separate tracks, attached bucket). The sphere initialization is what makes such a small β work: the surface starts near the object, so the narrow density band still sees gradients, and eikonal regularization keeps the distance field well-behaved away from the surface.
| Parameter | Learning rate |
|---|---|
| Opacities (pre-sigmoid) | 0.05 |
| Scales (log) | 0.005 |
| Colours | 0.02 |
| Means | 0.0005 |
Adam, L1 loss, isotropic Gaussians initialized from the point cloud, 1000 iterations. On the held-out views: PSNR 29.22, SSIM 0.936. The training loss went from 0.046 to 0.007.


In each comparison: left is DC only (5.5), right is full spherical harmonics (7.1), same view.
Frame 4 (top view of the seat and back). With SH the fabric is a darker, more saturated green and the gold pattern stands out more. With DC only, the fabric is lighter and flatter, because the DC term is the color averaged over all viewing directions.
Frame 12. The same effect, more strongly: the back and seat are darker and the gold embroidery has more contrast, while the DC-only render looks washed out. The mean pixel difference is 6.1/255, the largest of the three views (frame 4: 5.3/255).
Frame 20 (underside). This view is mostly the matte wooden base, which looks the same from every direction, so the two renders are almost identical (mean difference 1.8/255). Only the fabric on the side is slightly darker with SH.