Modelresearch
3D Gaussian splatting
Also called 3DGS.
Represent a scene by many anisotropic 3D Gaussians with color, rendered by sorted alpha blending of their projections and fitted to posed images by gradients.
3D Gaussian splatting, or 3DGS, describes a scene by a large set of 3D Gaussians: small soft blobs, each with a position, a shape and orientation, an opacity and a color that can change with the viewing direction. To render an image, each Gaussian is projected to a 2D Gaussian on the screen, the Gaussians are sorted by depth, and their colors are blended front to back, as with transparent sheets. Kerbl et al. (2023) start the Gaussians from the sparse points of structure from motion and fit all their values to the photos by gradient descent, adding and removing Gaussians as the fit goes on. The blending rule is the same as the volume rendering sum of a neural radiance field, but there is no network and no sampling along rays, so rendering runs at real-time rates. Like NeRF, and unlike multi-view stereo, the model aims to reproduce images, not to find a surface. This page gives the representation and the rendering formulas.
The machine
Representation. The scene is a set of Gaussians. Gaussian has:
- a mean ;
- a covariance , where is a rotation stored as a unit quaternion and holds three scales (Eq. 6 of the paper);
- an opacity ;
- color coefficients of spherical harmonics up to degree 3, which give the color as a smooth function of the viewing direction .
Its density is . Writing through and keeps it symmetric and positive semidefinite for any values of the parameters, which a free matrix under gradient steps would not.
Projection. Let be the rotation of the camera and the center in camera coordinates, with . The perspective map is not affine, so a 3D Gaussian does not map to an exact 2D Gaussian. Following the EWA splatting of Zwicker et al. (2001), the map is replaced near by its first-order Taylor expansion, with the Jacobian
Then the screen footprint is a 2D Gaussian with mean , the projection of , and covariance
Eq. 5 of the paper (which writes the full form and drops the third row and column).
Blending. At a pixel , let the Gaussians that cover it be sorted by depth, nearest first. Each gets the alpha
and the pixel color is
This is front-to-back alpha blending, the "over" operator of Porter-Duff compositing.
The rasterizer. The paper splits the screen into tiles of pixels. Each Gaussian is listed once for each tile that its footprint (cut at a few standard deviations) touches, with a 64-bit key: the tile number in the high bits and the depth in the low bits. One GPU radix sort of all keys then sorts by tile and, within a tile, by depth. Each tile is blended by one thread block, one thread per pixel, front to back. A Gaussian with at the pixel is skipped, is clamped to at most 0.99, and a pixel stops when its accumulated opacity reaches 0.9999. This is a form of tiled rasterization.
What it counts
What it predicts. The color of every pixel of a view from any camera, by the blending formula above. The depth order is per tile, by the depth of the centers, not per pixel, so it is an approximation where Gaussians overlap in depth.
What a fit minimizes. For a training image and its rendering , the loss is
the mean absolute error plus a term from the structural similarity index. It is an image space form of photo-consistency. The parameters are fitted by stochastic gradient steps with Adam; the gradients go back through the blending, the projection and the covariance.
Adaptive control. The fit also changes the number of Gaussians. Every 100 iterations the paper finds Gaussians whose view space position gradient has a mean size above . A small one is cloned, to fill a region with too few Gaussians; a large one is split into two smaller ones, with scales divided by , placed by sampling from the old Gaussian. Gaussians with very low opacity are removed, and every 3000 iterations all opacities are set close to zero, so that Gaussians that are not needed fade and are removed. These rules and values are heuristics of the paper.
Cost. For one view, the projection is . If the Gaussians produce pairs of a Gaussian and a tile, the sort is with radix sort on keys of fixed width, and blending is , where is the number of Gaussians that pixel visits before it stops. There is no network.
Relation to other models
- Neural radiance field. NeRF computes from network samples along a ray and uses the same sum . Gaussian splatting gets from projected Gaussians, so it needs no samples in empty space and no network evaluation. It also stores the scene explicitly, which takes more memory.
- EWA splatting. Zwicker et al. (2001) render volumes and point sets by splatting Gaussian kernels with the same projected covariance. 3DGS keeps the projection and blending and makes all the parameters trainable.
- Point clouds and MVS. The Gaussians start from a sparse point cloud and play the role of fuzzy oriented points, like the patches of patch-based multi-view stereo. But the fit only asks that images match; the Gaussians need not lie on a surface.
- Alpha compositing. The per-pixel sum is standard front-to-back compositing, which needs the correct depth order to be exact.
Known results in the model
Affine maps of Gaussians (a theorem). If has a Gaussian density with mean and covariance , then for any matrix and vector , has mean and covariance , and it is Gaussian (degenerate if is singular). With this gives the projected covariance exactly for the affine approximation of the camera; for the true perspective map it holds only to first order near the center.
The parameterization is valid (a theorem). For any rotation and diagonal , is symmetric and positive semidefinite, and positive definite when all scales are nonzero. Every covariance matrix has this form, by its eigendecomposition.
Weights. As for NeRF, by telescoping, so each pixel is a convex combination of the Gaussian colors and the background. The clamp keeps every , which keeps the gradients defined.
A footprint by hand. A Gaussian with (standard deviation 0.1 in every direction) has its center at in camera coordinates, with and . Then and , a standard deviation of 5 pixels, which is the size of a ball of radius 0.1 at depth 2. Moved to , the first row of becomes and : the footprint stretches a little away from the image center.
A pixel by hand. Two Gaussians cover a pixel with and color 1, then and color 0.2 (one channel). Then , and the remaining transmittance is .
Benchmark results. On the Mip-NeRF360 scenes, the paper reports (Table 1) for 3DGS after 30 thousand iterations an SSIM of 0.815, a PSNR of 27.21 and an LPIPS of 0.214, with 41 minutes of training, 134 frames per second and 734 MB of memory. For Mip-NeRF360 on the same scenes it reports 0.792, 27.69 and 0.237, with 48 hours of training and 0.06 frames per second. These are measurements with the hardware and settings of the paper, not properties of the model.
What is not proved. There is no theorem that the fit converges to the true scene or to a global minimum. The densification rules are heuristics. Sorting per tile by center depth can blend in the wrong order, which shows as popping when the view moves.
References
- Bernhard Kerbl, Georgios Kopanas, Thomas Leimkühler and George Drettakis, 3D Gaussian splatting for real-time radiance field rendering, ACM Transactions on Graphics 42(4), Article 139, 2023, the representation (Eq. 5 for the projected covariance and Eq. 6 for the covariance from rotation and scale), the blending formula, the optimization with its loss and the adaptive control of the Gaussians, the tile-based rasterizer, and Table 1
- Matthias Zwicker, Hanspeter Pfister, Jeroen van Baar and Markus Gross, EWA volume splatting, IEEE Visualization 2001, the projection of a 3D Gaussian kernel to a 2D Gaussian footprint by the local affine approximation of the perspective map
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag MHBWKQ Edit this page History Report an error Markdown