3D PLY Viewer

3D PLY Viewer

Interactive 3D viewer for photogrammetry scans. Drag to rotate, scroll to zoom.

3D Model

⚠️ Large file (~50-100MB)

3D Model

⚠️ Large file (~50-100MB)

These models use the Gaussian Splatting format, which stores 3D points with color information encoded as spherical harmonic coefficients. The PLY file structure includes:

  • Position: x, y, z coordinates for each point
  • Normals: nx, ny, nz (used for other purposes in the original data)
  • Color coefficients: f_dc_0, f_dc_1, f_dc_2 - the DC (zeroth-degree) spherical harmonic coefficients

To extract RGB colors from these coefficients, we use the formula:

SH_C0 = 0.28209479177387814  // 1 / (2 * sqrt(π))
R = 0.5 + SH_C0 * f_dc_0
G = 0.5 + SH_C0 * f_dc_1
B = 0.5 + SH_C0 * f_dc_2

The standard Three.js PLYLoader doesn’t recognize these custom attributes, so the viewer includes a custom parser to extract and convert them to vertex colors.

Update 20/10/2025: Added support for loading compressed .7z PLY files by decompressing them in the browser. Using 7z compressed the living room model from about 100MB to about 10MB!