3DGS基础初了解(一)
本文是我在学习过程中的一个学习记录,如有误麻烦评论区指出,提前谢谢各位佬了🫡
本博客参考的资料主要是A Survey on 3D Gaussian Splatting
备注:本博客中会出现大量用英语解释,我选择不翻译为中文的原因一是觉得翻译没有找到觉得合适的,二是在学习过程中懒的翻译为中文再进行理解😂
用一句话来表示3DGS是干什么:
3DGS uses millions of Gaussian ellipsoid point clouds to represent objects or scenes and render views with rasterization 使用数百万个高斯椭球点云来表示对象或场景,并通过光栅化渲染视图
下面将从一些与3DGS有关的基本概念开始
1 Radiance Field 辐射场
- 什么是辐射场呢?
对三维空间中光分布的表示,捕捉光与环境中的表面和材质相互作用的方式
1.1 分类
1.1.1 Implicit Radiance Field 隐式辐射场
- 概念:在表示场景中的光分布时,不需要显式定义场景的集合形状
- 优点:构建了一个可微且紧凑的复杂场景
- 缺点:需要对光线进行采样和体渲染的计算,导致计算负荷较高
- 使用场景:复杂场景的可区分和紧凑的表示
- example : NeRF —— 使用MLP 网络用于将一组空间坐标(x,y,z)和观察方向(θ,φ)映射到颜色c (direction-dependent 方向依赖性) 和密度值σ;任何点处的辐射不是显式存储的,而是通过查询神经网络实时计算得出
( c , σ ) ← M L P ( x , y , z , θ , Φ ) (c,σ)←MLP(x,y,z,θ,Φ) (c,σ)←MLP(x,y,z,θ,Φ)
1.1.2 Explicit Radiance Field 显式辐射场
- 概念:直接表示光在离散空间结构中的分布,比如体素网格或点云(每个元素都存储了其在空间中相应位置的辐射信息)
- 优点:允许直接且通常更快地访问辐射数据
- 缺点:需要更大内存使用和导致较低的分辨率
( c , σ ) ← D a t a S t r u c t u r e ( x , y , z , θ , Φ ) (c,σ)←DataStructure(x,y,z,θ,Φ) (c,σ)←DataStructure(x,y,z,θ,Φ) - DataStructure:可以是volumes、point cloud,以这两种主要方式编码定向颜色
- DataStructure直接存储coefficients of directional basis functions (定向基函数的系数) (eg:spherical harmonics 球形谐波、spherical Gaussians 球形高斯)—— 最终颜色的计算是a function of these coefficients and the viewing direction
1.1.3 3DGS : Best-Of-Both Worlds
- 概念:by utilizing learnable 3D Gaussians as the basis elements of DataStructure
- 过程:
- 1️⃣encode the opacity α directly for each Gaussian 针对每个高斯编码不透明度
- 2️⃣be optimized under the supervision of multi-view images to represent the scene 在多视图图像的监督下被优化以表示场景
- 达到的效果:实时、高质量的渲染,需要更少的训练时间,尤其对复杂场景和高分辨率的输出
2 Rendering 渲染
2.1 Volumetric rendering 体积渲染
- 目的:transform a 3D volumetric representation into an image by integrating radiance along camera rays
- 摄像机射线r(t) r ( t ) = o + t d r(t) = o + td r(t)=o+td
- 其中:o表示射线原点(相机中心);d表示射线方向;t indicates the distance along the ray between near and far clipping planes
- 像素颜色C(t)
C ( r ) = ∫ t n e a r t f a r T ( t ) σ ( r ( t ) ) c ( r ( t ) , d ) d t C(\mathbf{r})=\int_{t_{near}}^{t_{far}}T(t){\large σ} (\mathbf{r} (t))c(\mathbf{r}(t),\mathbf{d} )dt C(r)=∫tneartfarT(t)σ(r(t))c(r(t),d)dt - 其中:σ(r(t)) is the volume density at point r(t);c(r(t), d) is the color at that point;T(t) is the transmittance (透明度)
- Ray-marching directly : the volumetric rendering integral (体积渲染积分) by systematically “stepping” along a ray and sampling the scene’s properties at discrete intervals (以离散的间隔采样场景的属性)
- NeRF : shares the same spirit of ray-marching and introduces importance sampling and positional encoding (位置编码)
- 对于高分辨率图像来讲,ray-marching在计算上昂贵
2.2 Point-based rendering 基于点的渲染
-
Its simplest form rasterizes point clouds with a fixed size, which introduces drawbacks such as holes and rendering artifacts(渲染工件)
克服缺点的方法:
-
splatting point primitives with a spatial extent
-
embedding neural features directly into points for subsequent network-based rendering 将神经特质直接嵌入到点中,用于随后的基于网络的渲染
3DGS introduce a notable implementation
- uses 3D Gaussian as the point primitive that contains explicit attributes (e.g. color and opacity) instead of implicit neural features
- Point-based methods render point clouds using rasterization 基于点的方法使用栅格化呈现点云