Gaussian Splatting From Zero · Episode 13
Splats in a Real Scene
Splats in a Real Scene is Episode 13 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 .
A splat capture floating in a black void is a tech demo. Put it in a scene — on a floor, next to solid props, with a shadow grounding it — and it becomes a place. That handshake between splats (transparent, sorted, unlit) and ordinary 3D (opaque, z-buffered, lit) is the whole job of shipping splats in a product, and it has three sharp edges: depth, lighting, and shadows. The demo below stands a capture on a lit floor beside a chrome prop. Toggle the pieces and watch what makes it sit in the world — and what gives it away.
Edge 1 — Depth: who's in front?
This is the one you already solved in Season 1. Opaque meshes write depth; transparent splats test depth but don't write it. Three.js renders opaque before transparent, so the floor and the chrome prop lay down a depth buffer, and splats behind them are correctly hidden while splats in front blend over. Orbit so the prop passes in front of and behind the capture — the occlusion just works:
prop.material.depthWrite = true; // opaque geometry owns the depth buffer
splat.material.depthTest = true; // hidden by geometry in front
splat.material.depthWrite = false; // but still blends among its own splats
Edge 2 — Lighting: the splat is already lit
Here's the deep mismatch. Your mesh prop is lit by the scene's lights in real time. The splat capture is not — its lighting was baked in at capture time, frozen into the colors and SH. Put a captured object under a different light and it won't respond; put it next to a PBR mesh and the two can look like they're in different rooms. The honest fixes:
- Match the lights to the capture, not the other way around — tint and aim your scene lights to agree with the capture's baked lighting.
- Match the capture to the scene by re-lighting it — decomposing albedo and normals so it can respond. That's an open research problem (Episode 19), not a checkbox.
- Lean in. Many products keep captures as self-lit "set dressing" and only light the interactive mesh objects. Often that reads just fine.
Edge 3 — Shadows: splats don't cast them
A splat is a cloud of translucent blobs; it has no surface to register in a shadow map, so by default a capture casts no shadow and floats. Toggle "contact shadow" off in the demo and the planet detaches from the floor instantly — the eye reads "pasted on." The cheap, universal fix is a fake contact shadow: a soft dark blob projected on the floor under the capture. The mesh prop, being real geometry, casts a proper shadow map shadow next to it — and the contrast between the real shadow and the faked one is exactly the seam you're hiding.
Grounding sells everything. A perfect capture with no shadow looks fake; a mediocre one with a believable contact shadow looks placed. Spend your effort on the shadow before the splats.
Navigation & collision
To walk a capture (first-person), you need something to collide with — splats are not solid. The standard trick is an invisible proxy mesh: a rough box/plane geometry (often extracted from the splats or modeled by hand) that the camera/physics collide against while the splats provide the visuals. Floors, walls, and a few blockers are usually enough. SuperSplat and game engines let you author these alongside the capture.
Common pitfalls
- Capture floats / looks pasted on. No contact shadow. Add the blob; it's the highest-impact 10 lines in the scene.
- Prop looks like it's from another scene. Lighting mismatch. Tune scene lights to the capture's baked look, or keep the capture as self-lit dressing.
- You walk straight through the capture. No proxy collider. Splats are visuals only; add invisible geometry to collide with.
- Prop z-fights the splats. Depth flags wrong, or the splat object writes depth. Opaque writes, transparent splats test-only.
- Transparent props vanish behind splats. Two transparent things need a render
order; give the splats a
renderOrderand sort intentionally.
Exercises
- Toggle the contact shadow on and off ten times and notice how much "realness" that one decal buys. Then make it softer/darker and find the sweet spot.
- Re-tint the scene's directional light to clash with the capture, then to agree with it. Feel the "different rooms" effect appear and vanish.
- Add a second, transparent glass prop and get its sort order right relative to the splats — the classic two-transparent-objects problem.
What's next
Episode 14 — Splat Shaders & Effects. The two series shake hands: we bring the dissolve, hologram, and clipping tricks from Shaders From Zero to splats — animating color, alpha, and position per-splat for reveals, ghosts, and cutaways.