Neural Radiance Fields (NeRF)
Represents a scene as an MLP mapping position and view direction to density and colour, trained by differentiable volume rendering to reproduce posed input photos.
Also known as NeRF
In the family Capture, reconstruction & splatting, neural scene representation
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | Neural radiance field rendering is not built in (3D Gaussian Splatting is supported via GaussianSplattingMesh). |
| Godot 4.7 | Not applicable | Offline reconstruction/generative method, not an engine feature. |
| Unity | None found | |
| Unreal 5.7 | None found | Neural Radiance Fields are not natively trained or rendered by stock Unreal Engine. |
| Blender 5.2 | Plugin | Blender add-on: BlenderNeRF (dataset/camera export for NeRF training) docs Creates synthetic NeRF datasets; training is external. |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
An MLP takes a 3D point (after sinusoidal positional encoding) and viewing direction and outputs volume density and view-dependent RGB. To render a pixel, rays are cast through the camera, points are sampled along each ray (coarse then importance-sampled fine), and colours are alpha-composited using the densities. The loss is simply the photometric error against the training image, and gradients flow through the compositing into the network. Density depends only on position and colour on position plus direction, which encourages consistent geometry with specular effects. Training needs camera poses, typically from Structure-from-Motion (COLMAP). The original takes hours per scene and seconds per frame, which later work cut by orders of magnitude.
When to choose it
Reach for it when
- synthesise new views from a set of photos
- want an implicit volumetric scene representation
- learn a scene's geometry and colour from images alone
- photo capture to view-dependent renders with a neural net
- baseline for neural scene reconstruction
Choose it as a conceptual baseline or when you need an implicit volumetric representation to experiment with. Prefer Instant NGP (Multiresolution Hash Encoding) for the same model trained in seconds, 3D Gaussian Splatting for real-time rendering, and NeuS or Neuralangelo when you need a clean surface rather than a density field.
Field marks
- Floaters and fog in empty space when views are sparse or poses are noisy
- Blurry or aliased renders at differing zoom levels because rays are treated as infinitely thin
- Extracted geometry from density is bumpy and not watertight
- Unbounded scenes and distant backgrounds need special parameterisation or they collapse
Presets
NeRF Volumetric Raymarching — transmittance & density field (left) vs view-dependent radiance (right)
{
"P_SIGMA_SCALE": 4.5,
"P_VIEW_DEP": 1,
"P_ROT_SPEED": 0.65,
"P_SPLIT": 0.48
}Show GLSL (123 lines)
const float P_SIGMA_SCALE = 4.5; // P Density Sigma [1.0, 10.0, 0.25]
const float P_VIEW_DEP = 1.0; // P View-Dep Spec [0.0, 2.0, 0.05]
const float P_ROT_SPEED = 0.65; // P Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P Density / NeRF Split [0.0, 1.0, 0.02]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
// Continuous neural radiance field F_theta(x, d) -> (sigma, rgb)
// Encodes a translucent iridescent botanical lotus-torus with nested glowing filaments
void evalNeRF(vec3 p, vec3 rd, float sigmaGain, float viewGain, out float sigma, out vec3 rad) {
float r = length(p);
// Outer translucent shell + nested twisted rings
vec2 qTor = vec2(length(p.xz) - 0.48, p.y);
float dRing = length(qTor) - 0.16;
float ang = atan(p.z, p.x);
float petals = 0.075 * sin(ang * 5.0 + p.y * 6.0) * cos(r * 8.0);
float dCore = length(p) - 0.30 + petals * 0.6;
float dHalo = abs(length(p) - 0.64) - 0.045;
// Soft continuous volume density sigma(x) >= 0 (ReLU-like softplus around implicit shells)
float sCore = exp(-max(dCore, 0.0) * 18.0) * smoothstep(0.18, -0.05, dCore);
float sRing = exp(-max(dRing, 0.0) * 20.0) * smoothstep(0.14, -0.04, dRing);
float sHalo = exp(-abs(dHalo) * 32.0) * 0.42;
// Fine high-frequency positional-encoding gamma(x) volumetric veins
float peVeins = 0.55 + 0.45 * sin(p.x * 14.0 + p.y * 11.0) * cos(p.z * 14.0);
sigma = (sCore * 1.15 + sRing * 0.95 + sHalo * peVeins) * sigmaGain;
// Gradient proxy for view-dependent radiance c(x, d)
vec3 nEst = normalize(p + vec3(0.001));
float ndv = clamp(dot(nEst, -rd), 0.0, 1.0);
float fres = pow(1.0 - ndv, 2.5);
vec3 coreCol = mix(vec3(0.96, 0.42, 0.18), vec3(1.0, 0.86, 0.32), smoothstep(-0.25, 0.35, p.y));
vec3 ringCol = mix(vec3(0.12, 0.68, 0.96), vec3(0.68, 0.32, 0.96), 0.5 + 0.5 * sin(ang * 2.0));
vec3 baseC = (sCore > sRing) ? coreCol : ringCol;
baseC = mix(baseC, vec3(0.24, 0.96, 0.84), sHalo / max(sCore + sRing + sHalo, 1e-4));
// View-dependent directional MLP color term (iridescent Fresnel rim + anisotropic highlight)
vec3 lDir = normalize(vec3(0.55, 0.78, 0.45));
float spec = pow(max(dot(nEst, normalize(lDir - rd)), 0.0), 28.0);
vec3 viewShift = (vec3(0.32, 0.78, 1.0) * fres * 0.72 + vec3(1.0, 0.95, 0.88) * spec * 0.85) * viewGain;
rad = baseC * (0.45 + 0.65 * max(dot(nEst, lDir), 0.0)) + viewShift;
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
bool isRadiance = screenX >= split;
float sigmaGain = clamp(P_SIGMA_SCALE, 0.8, 12.0);
float viewGain = clamp(P_VIEW_DEP, 0.0, 2.2);
float spin = iTime * max(P_ROT_SPEED, 0.0);
vec3 ro = vec3(0.0, 0.24, 2.25);
vec3 rd = normalize(vec3(uv - vec2(0.0, 0.04), -1.52));
// Orbit camera around volume
ro.xz = rot2(spin * 0.55) * ro.xz;
rd.xz = rot2(spin * 0.55) * rd.xz;
vec3 bg = mix(vec3(0.020, 0.028, 0.048), vec3(0.056, 0.075, 0.125), smoothstep(-0.55, 0.55, uv.y));
// Bounding sphere intersection R = 1.05 for stratified NeRF quadrature
float b = dot(ro, rd);
float c = dot(ro, ro) - 1.05 * 1.05;
float disc = b * b - c;
vec3 accum = vec3(0.0);
float T = 1.0;
float expectedDepth = 0.0;
float weightSum = 0.0;
if (disc > 0.0) {
float tNear = max(-b - sqrt(disc), 0.1);
float tFar = -b + sqrt(disc);
int steps = 48;
float dt = (tFar - tNear) / float(steps);
for (int i = 0; i < 48; i++) {
float t = tNear + (float(i) + 0.5) * dt;
vec3 p = ro + rd * t;
float sigma;
vec3 rad;
evalNeRF(p, rd, sigmaGain, viewGain, sigma, rad);
// Exact NeRF volume rendering quadrature: alpha_i = 1 - exp(-sigma_i * dt)
float alpha = 1.0 - exp(-sigma * dt);
float w = T * alpha;
accum += w * rad;
expectedDepth += w * (t - tNear) / max(tFar - tNear, 1e-4);
weightSum += w;
T *= (1.0 - alpha);
if (T < 0.01) break;
}
}
vec3 col;
if (!isRadiance) {
// Left: accumulated opacity (1 - T) & expected termination depth colormap (turbo-like plasma ramp)
float op = 1.0 - T;
float dNorm = clamp(expectedDepth / max(weightSum, 1e-4), 0.0, 1.0);
vec3 depthCol = mix(vec3(0.12, 0.88, 0.94), vec3(0.98, 0.42, 0.16), dNorm);
depthCol = mix(depthCol, vec3(0.54, 0.24, 0.94), smoothstep(0.6, 1.0, dNorm));
// Iso-depth bands visualizing discrete raymarch quadrature samples
float bands = 0.78 + 0.22 * cos(dNorm * 32.0);
col = mix(bg, depthCol * bands * 1.15, op);
} else {
// Right: full NeRF alpha-composited view-dependent radiance
col = accum + T * bg;
}
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.97, 1.0), sep);
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| nerf-live | Tesla T4 1920x1080 | 128× baseline (extreme) · 3.96 ms / 4.24 ms | opengl-timer-query · 36 frames · GPU Weight Atlas · Colab T4 sweep |
| nerf-live | NVIDIA L4 1920x1080 | 111× baseline (extreme) · 1.76 ms / 1.79 ms · 2.3× faster on L4 | opengl-timer-query · Cross-architecture validation |
| nerf-live | NVIDIA A100-SXM4-40GB 1920x1080 | 86.5× baseline (extreme) · 2.49 ms / 2.51 ms · 1.6× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites DeepSDF (neural signed distance functions), Structure-from-Motion (COLMAP); cited by 3D Gaussian Splatting, Neuralangelo, SAM 3D Objects.
Crosses
- Baking trained NeRF radiance fields into directional mesh lightmaps: Treating a trained NeRF volume as a directional incident-radiance oracle during UV lightmap baking distills expensive neural ray-marching into static L1/L2 spherical-harmonic lightmaps that run at 120 FPS on any WebGL2 or mobile mesh renderer.
- Structure-from-Motion (COLMAP): COLMAP poses are the camera input that NeRF training assumes.
Sources
- primaryBen Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi, Ren Ng (2020). NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis. arXiv preprint (cs.CV).Verified via arxiv · 2026-11-29arXiv:2003.08934
- implementationbmild (2020). bmild/nerf. Code release for NeRF (Neural Radiance Fields)GitHub API · license MIT · 2026-11-29
- implementationnerfstudio-project (2022). nerfstudio-project/nerfstudio. A collaboration friendly studio for NeRFsGitHub API · license Apache-2.0 · 2026-11-29
- tutorialNerfstudio team. Nerfstudio documentation. docs.nerf.studio.Verified via live page · 2026-11-29