Gaussian Splatting From Zero · Episode 19
Relighting & PBR Splats
Relighting & PBR Splats is Episode 19 of Gaussian Splatting From Zero, a MasterAllArts free interactive lesson for artists learning creative 3D on the web.
Part of the MasterAllArts Creative 3D Roadmap .
Take a splat capture into a sunset and it stays lit like the overcast afternoon it was shot in. That's because a vanilla splat stores appearance, not material — the lighting is baked into its colors and spherical harmonics. Move a light and nothing happens. Relighting is the research effort to un-bake a capture: recover each splat's true albedo, normal, and roughness so it can respond to new light. The demo puts a baked planet next to a relightable one and orbits a light between them — watch which one reacts.
Why a vanilla splat can't be relit
When 3DGS trains, it only ever tries to match the input photos. If a wall was in shadow in every photo, the optimizer makes those splats dark — it can't tell "dark paint" from "white paint in shadow," and it doesn't need to. The shadow is painted into the color. The view-dependent SH (Episode 06) captures how appearance changes with viewing angle, but never with lighting angle, because the lighting never moved during capture. So:
A vanilla Gaussian splat is a frozen photograph of a surface under one lighting. It has no concept of "material" or "light direction" to respond to. Relighting has to invent those by decomposing the baked appearance.
The decomposition: from appearance to material
To relight, you split each splat's baked color into the ingredients of a physically-based material, then re-render with a new light:
| Recover | What it is | Hard because… |
|---|---|---|
| Albedo | The true surface color with lighting removed. | Shadows and shading are baked into the captured color. |
| Normal | Which way the surface faces — needed for any shading. | Splats are fuzzy blobs with no clean surface normal. |
| Roughness / specular | Matte vs glossy response. | Entangled with the SH and the (unknown) capture lighting. |
| Incident light | The environment that lit the capture. | You're solving for material and lighting at once — ambiguous. |
With those in hand, the splat's color becomes a shading equation instead of a constant — exactly the PBR lighting your mesh prop used in Episode 13, now per-splat:
// relightable splat: shade live instead of using the baked color
vec3 N = splatNormal; // recovered, not given
vec3 L = normalize(uLightDir);
float diffuse = max(dot(N, L), 0.0);
vec3 color = albedo * (uAmbient + diffuse) + specular(N, L, V, roughness);
The demo fakes the decomposition (it knows the planet's true normals), but the behavior is the real thing: in relightable mode the lit hemisphere and the terminator (the day/night line) track the moving light. Switch to baked mode and the light orbits uselessly — the planet's "lighting" is glued to its colors.
How real methods do it
- Estimate normals from the splat covariance (the flat axis points along the surface) or from a depth/normal prior, then regularize them to be smooth.
- Jointly optimize albedo, roughness, normals, and an environment map so that re-rendering under the estimated lighting reproduces the input photos. (Relightable 3DGS, GS-IR, and similar.)
- Add priors — smoothness, low-frequency lighting, known light positions — to tame the material-vs-light ambiguity.
- Bake shadows separately so cast shadows can move with the new light instead of staying painted on.
Why it's still a frontier
Decomposition is ill-posed: many (material, light) pairs explain the same photos. Specular and reflective surfaces (the same ones that wreck capture, Episode 09) are the worst — their appearance is almost entirely about light direction, which you didn't vary. Results are improving fast, but "capture a thing and relight it perfectly" is not yet a button. For now, the pragmatic move from Episode 13 stands: match your scene's lights to the capture, or keep captures as self-lit dressing.
Common pitfalls
- Relit result looks flat or plastic. Bad normals. Splat normals are noisy; without smoothing/priors the shading is garbage.
- Albedo still has shadows in it. Under-constrained decomposition — the optimizer left shading baked in. Needs more views or stronger priors.
- Shadows don't move. Cast shadows were baked into albedo. They must be modeled separately to follow a new light.
- Specular surfaces explode. Reflective material is nearly all view/light dependence; monocular capture can't resolve it. Expect artifacts.
Exercises
- In baked mode, orbit the light through a full circle — the planet never changes. That inertness is the entire problem relighting solves.
- In relightable mode, freeze the light and orbit the camera: the shading stays put on the surface (it's lighting, not view-dependence) — the opposite of Episode 06's SH highlight, which moved with the camera.
- Imagine the planet's normals were wrong by 20°. Picture how the terminator would wander — that's what bad normal estimation looks like in real relighting.
What's next
Episode 20 — Generative Splats. Instead of capturing a real thing, generate one: text- and image-to-3D that optimizes a splat cloud out of noise using a 2D image prior. We'll watch a cloud condense from noise into a shape — the DreamGaussian idea, visualized.