# Photoreal room → Gaussian Splat on RTX 5060 (from PHOTOS)

Goal: turn a set of **photos of the room** into a **3D Gaussian Splat** (photoreal, real pixels)
and view it in the browser with `splat_viewer.html`. All local, no cloud upload.

Input: a **folder of photos** of the room (JPG/PNG), already on the RTX 5060 laptop.
(Photos > video for quality: full resolution, no motion blur, no codec mush.)

Hardware: **RTX 5060 laptop, 8 GB VRAM, Blackwell (sm_120).** Blackwell is new — pick tools
that already support CUDA 12.8+ / wgpu. Notes below flag the gotchas.

---

## Shooting the photos (if not done yet)

- **Lock exposure + focus + white balance** (phone Pro/manual mode). Auto-changing per shot
  breaks Structure-from-Motion.
- **150–400 stills**, 60–80% overlap between neighbours.
- **Translate, don't just rotate** in place — splats need parallax. Walk a slow loop/grid.
- **Multiple heights** (low, eye, high); cover every corner; orbit the furniture.
- Consistent light, blinds fixed, nothing moving.
- White textureless walls are the hard part for SfM — keep furniture/edges/corners in frame,
  heavy overlap, don't point straight at blank wall.

Put all photos in one folder, e.g. `photos\`.

---

## Pick a training tool

| Tool | Ease | Blackwell | Cost | Does SfM? |
|------|------|-----------|------|-----------|
| **Postshot** (recommended) | ★★★ GUI, photos in → splat out | ✓ supports RTX 50 | free trial / paid | yes (built-in) |
| **Brush** | ★★ open source, no CUDA (wgpu) | ✓ via DX12/Vulkan | free | needs COLMAP first |
| **Nerfstudio splatfacto** | ★ CLI, Python | ⚠ needs torch cu128 nightly | free | needs COLMAP (auto) |

> Brand-new 50-series + CUDA = pain. **Postshot** (all-in-one GUI) or **Brush** (no CUDA at
> all) avoid the toolchain headache. Start with Postshot.

---

## Track A — Postshot (easiest, recommended)

1. Download + install **Postshot**: https://www.jawset.com/
2. Open Postshot → **New Project** → **add your photos folder** (drag the folder of images in,
   not a video).
3. Settings for 8 GB VRAM:
   - Profile: **Splat MCMC** or **Splat3** (default is fine).
   - If it OOMs: lower "Max Splats" (e.g. 1.5M), or downscale images to ~1600 px.
4. **Start training.** ~5–20 min on a 5060 for one room.
5. Export → **PLY** (3D Gaussian Splat) → save as `room.ply` next to `splat_viewer.html`.
6. Jump to **View it** below.

---

## Track B — Brush (free, open source, no CUDA)

Brush runs splat training on the GPU through wgpu (DirectX 12), so Blackwell "just works."
It needs camera poses first (COLMAP), computed directly from the photos.

1. Install **COLMAP**: https://github.com/colmap/colmap/releases (Windows binary).
2. Run COLMAP automatic reconstruction on the photos folder (GUI: *Reconstruction → Automatic*,
   point Image folder at `photos`), or CLI:
   ```powershell
   colmap automatic_reconstructor --workspace_path . --image_path photos --camera_model OPENCV
   ```
3. Download **Brush**: https://github.com/ArthurBrussee/brush/releases → run it → open the
   COLMAP workspace → train → export `.ply` as `room.ply`.

---

## Track C — Nerfstudio splatfacto (advanced)

Only if you know Python. Blackwell needs the **CUDA 12.8 / PyTorch cu128** build:
```bash
pip install torch --index-url https://download.pytorch.org/whl/cu128
pip install nerfstudio
ns-process-data images --data photos --output-dir room_proc   # runs COLMAP on the photos
ns-train splatfacto --data room_proc
ns-export gaussian-splat --load-config <config.yml> --output-dir export    # -> .ply
```
Rename export to `room.ply`.

---

## View it (any of the tracks)

1. Put `room.ply` in the same folder as `splat_viewer.html`.
2. Serve over http (modules + workers need it):
   ```powershell
   python -m http.server 8099
   ```
3. Open http://localhost:8099/splat_viewer.html
4. Mouse drag = orbit, scroll = zoom, WASD/QE = fly, R = reset.

If the room is upside-down or sideways (common — splat axes depend on the solver), edit the
`CAMERA_UP` / `INITIAL_LOOK_AT` values at the top of `splat_viewer.html` (comments explain).

---

## Tips

- **8 GB VRAM**: if training OOMs, downscale photos (~1600 px wide is plenty) and cap splat count.
  One room fits easily.
- More photos + more overlap = better splat. 200–400 sharp overlapping shots is a sweet spot.
- `.ply` can be 100–400 MB. For faster web loading, Postshot can export compressed, or use the
  `@mkkellogg/gaussian-splats-3d` `.ksplat` converter. Raw `.ply` works, just slower.
- Want a guided run on the 5060? Run Claude Code in the photos folder on that laptop and say
  "set up the gaussian splat from these photos" — it can drive COLMAP / Brush / the viewer.
