3D Gaussian Splatting, Explained: From Photos to Real-Time 3D
3DGS stands for 3D Gaussian Splatting. It reconstructs a scene out of hundreds of thousands to a few million semi-transparent 3D ellipsoids: training takes tens of minutes, and rendering runs at real time. The method ca
3DGS stands for 3D Gaussian Splatting. It reconstructs a scene out of hundreds of thousands to a few million semi-transparent 3D ellipsoids: training takes tens of minutes, and rendering runs at real time.
The method came out of SIGGRAPH 2023, from a four-person team at INRIA and MPI Germany. It stitched together the two usual extremes β neural rendering that looks great but is slow, and classical graphics that is fast but not photoreal.
π§ 1. What 3DGS Is
Picture a scene broken into countless glowing ellipsoids. Each has a position, orientation, size, opacity, and color; stack them together and you get what the photo shows.
They are called Gaussians because the density distribution of each one in space follows a Gaussian function. To render, project them onto the screen, sort back to front, and blend them layer by layer β that is a pixel.
So it is not a mesh, not voxels, and not a neural network. The volume of the scene is just this pile of parameters. Want to edit a corner? Move the points in that corner.
π 2. How It Differs from NeRF
NeRF stores the scene inside the weights of a multi-layer perceptron: querying color and density at a point means a forward pass. 3DGS stores the scene as points and renders by rasterization.
| Dimension | NeRF | 3DGS |
|---|---|---|
| Scene representation | Implicit, network weights | Explicit, point set |
| Training time | Hours to days | 10 minutes to an hour |
| Rendering | Seconds per frame | Real time, 30+ fps at 1080p |
| Local editing | Hard, weights are global | Easy, add/remove/move points |
| Storage | Several MB to tens of MB | Hundreds of MB to a few GB |
| Geometry output | Density field, surface must be extracted | Unordered point cloud, also no mesh |
In one sentence: 3DGS trades "memory in weights" for "memory in points", buying speed and editability at the cost of file size.
π§© 3. Anatomy of One Gaussian
A single Gaussian is described by 59 numbers β which is why each point takes 236 bytes in the original PLY file (59 times 4).
| Parameter | Dim | Role |
|---|---|---|
| Position ΞΌ | 3 | Center of the ellipsoid |
| Scale s | 3 | Length along three axes |
| Rotation q | 4 | Quaternion, the ellipsoid's orientation |
| Opacity Ξ± | 1 | Weight during blending |
| Spherical harmonics | 48 | 3rd-order SH, one color per direction |
Two design choices are worth calling out. Color is not a constant RGB triple but spherical harmonics, because the same surface changes color with viewing angle β highlights and metallic reflections live entirely in those 48 numbers.
Covariance is not optimized as 6 raw elements either. Optimizing a matrix directly easily loses positive semi-definiteness and the ellipsoid degenerates into a hyperboloid. Factoring it as Ξ£ = R S Sα΅ Rα΅ is what makes training stable.
β‘ 4. Why Rendering Is Real Time
Three steps: project, sort, blend.
Projection flattens the 3D covariance into a 2D ellipse on screen, using the EWA splatting approximation Ξ£' = J W Ξ£ Wα΅ Jα΅, where J is the Jacobian of the projection and W the view transform. Once you have the 2D ellipse, you know which pixels this Gaussian covers.
Sorting is a global depth sort, then points are binned into 16Γ16 screen tiles, each tile processed independently β parallelism maxed out.
Blending is front-to-back alpha compositing with early termination: once accumulated opacity approaches 1, the remaining Gaussians are skipped entirely.
The render pipeline, in order:
- Take the million-scale Gaussian set (position, shape, color).
- Frustum- and screen-cull what cannot be seen.
- Project to 2D ellipses with
Ξ£' = JWΞ£Wα΅Jα΅. - Depth-sort and bin into tiles.
- Rasterize per tile with front-to-back blending.
- Output the image.
Compare that with volume rendering: NeRF samples hundreds of points along each ray and queries a network at each one. 3DGS touches only the few dozen Gaussians covering a pixel, with zero network inference in between. That is the root of the two-orders-of-magnitude speed gap.
π± 5. How Training Converges
Training is not "scatter points randomly, then optimize". There are explicit growth rules.
First, COLMAP does sparse reconstruction, and the resulting point cloud becomes the initial Gaussians: position from the point coordinate, color from the point color, scale from the distance to the nearest neighbor. This step sets the initial density and largely decides whether the model can grow well.
The loss only compares images: a weighted L1 plus D-SSIM, weight 0.2. No depth supervision, no geometry constraints β multi-view consistency alone pushes points into the right place.
The interesting part is adaptive density control. Every 100 iterations: where the gradient is large, reconstruction is lagging, so clone a small Gaussian; Gaussians that are too large are split into two to fit detail; those with opacity below a threshold are pruned.
One step is easy to overlook: every 3000 iterations, all opacities are pushed toward zero and then allowed to recover. Floating artifacts disappear naturally, because they lack enough view support to regain their weight.
The training loop:
- COLMAP sparse point cloud β initialize Gaussians.
- Differentiable rasterization renders the current view.
- Image loss: L1 + D-SSIM.
- Backprop updates position, shape, color.
- Every 100 iterations: clone where the gradient is large, split oversized Gaussians, prune low-Ξ± ones.
- After 30k iterations, export the PLY.
Gaussian count climbs from tens of thousands to millions. The real cost is GPU memory during training and the final file size, not compute.
π» 6. Running Your First Scene
The official implementation compiles CUDA extensions; conda is the least painful environment.
git clone https://github.com/graphdeco-inria/gaussian-splatting --recursive
cd gaussian-splatting
conda env create --file environment.yml
conda activate gaussian_splatting
Data prep is unavoidable: shoot 100 to 300 photos around the scene with a phone or camera, then run COLMAP sparse reconstruction to get images/ and sparse/0/. The bundled convert.py turns an existing COLMAP result into the directory layout training expects.
python train.py -s /data/room -m /data/out/room --iterations 30000
Budget 24GB of VRAM to start; a larger scene will use all of it. On an RTX 3090, 30,000 iterations take roughly half an hour to an hour. When it finishes, point_cloud/iteration_30000/point_cloud.ply appears under the -m directory.
Two ways to look at the result: build the official SIBR real-time viewer, or drag the PLY into a web viewer. The former is accurate, the latter easy to share.
Three hard requirements while shooting: lock exposure and white balance (otherwise brightness varies between photos and the reconstruction shows bright and dark patches), avoid motion blur, and cover different heights and angles. Glass, mirrors, and large flat white walls are the three universally hard cases β decide before shooting whether to avoid them.
π¦ 7. Export and Web Loading
A raw PLY costs 236 bytes per Gaussian, so a million Gaussians is 236MB; a phone browser will simply crash. Compression after export is mandatory.
| Format | Approach | Typical size |
|---|---|---|
| PLY | Raw floats, lossless | 236MB per million Gaussians |
| SPZ | Open-sourced by Niantic, quantized then compressed | About 1/9 of PLY |
| SOG | Open-sourced by PlayCanvas, WebP plus palette | About 1/15 of PLY |
| glTF | Interchange container, compression separate | Depends on extension |
SPZ wins on simple implementation and fast decoding; SOG wins on compression ratio, and browsers decode WebP almost for free. Both are MIT-style licensed, safe for commercial use.
On tooling, SuperSplat is the most usable all-in-one editor in the browser: load a PLY, delete floaters, crop the range, export a compressed format, all on the web. PlayCanvas, Three.js, and Babylon.js all ship splat renderers, so embedding one is a few lines of code.
For mobile, keep the Gaussian count under a million; desktop can go to about three million. Beyond that you need view-dependent streaming.
ποΈ 8. Quality and Performance Tuning
Resolution and SH order are the two cheapest switches. Training at 2Γ downsampling halves VRAM; dropping spherical harmonics to order 0 (a single color) at export cuts size dramatically, at the cost of highlights.
Floaters: first parameters, then manual work. Shortening the opacity-reset interval and raising the prune threshold both suppress them, but shave off fine detail. Clean up the rest by box-selecting in SuperSplat β a matter of seconds.
Large scenes must be tiled. A single file cannot hold a block-level reconstruction. The practical approach is chunked training plus distance-based LOD streaming, which is what every block-scale demo does today.
Dynamic scenes are not its home turf. Original 3DGS assumes a static scene; ghosts of moving people cannot be removed. Going dynamic means 4DGS-style methods, and another step up in data volume and training cost.
π© 9. Where It Fits
Clear fits: real-world 3D showcases (real estate, tourism, museums), an alternative to drone oblique photogrammetry, 3D product views for e-commerce, fast VR scene assembly, and simulation assets.
The misfits matter just as much. Engineering scenarios that need clean meshes, collision bodies, and exact dimensions are out: 3DGS gives an unordered point cloud, cannot measure wall verticality, and will not import into CAD. Strong reflections, transparency, and large flat color surfaces degrade quality noticeably. Look beyond the captured range and edges smear into streaks β the common flaw of every image-based reconstruction method.
Closing thought: 3DGS is not "a better NeRF". It moves the reconstruction out of a network and into points β volume traded for real time, explicit representation traded for editability. Understand that trade and you know which scenes it belongs in.
π 10. References
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.