Upgrade to PRO for Only $50/Yearโ€”Limited-Time Offer! ๐Ÿ”ฅ

Gaussian Splash - The world of 3D Gaussian Spla...

Avatar for ushiostarfish ushiostarfish
October 13, 2024
310

Gaussian Splash - The world of 3D Gaussianย Splatting

Avatar for ushiostarfish

ushiostarfish

October 13, 2024
Tweet

Transcript

  1. Agenda I. Gaussian splatting formulation I. Understand the geometric meaning

    of the formula II. Extension to the original paperโ€™s approach III. How to tame corner cases II. GPU Implementation I. A failure II. Introduce my implementation Deep Dive into Gaussian Splatting
  2. Whatโ€™s gaussian splatting? โ€ข A method to represent a radiance

    field โ€ข A function of a location and a direction โ€ข Often calculated by 2d image set โ€ข Differentiable rendering ? ? ๐‘“( ิฆ ๐‘ฅ, ๐œ”) ๐‘“( ิฆ ๐‘ฅ, ๐œ”)
  3. Rendering โ€ข Estimate radiance that reaches to eyes โ€ข Evaluate

    the color or transparency at a point along the view ray, no handling of multiple volume overlaps ๐’„1, ๐›ผ1 ๐’„2, ๐›ผ2 ๐’„3, ๐›ผ3 ๐›ผ๐‘–: Transparency of the splat along the ray ๐’„๐‘–: Color of the splat along the ray ๐‘–: Index of a splat ๐ถ = ๐’„1 ๐›ผ1 + 1 โˆ’ ๐›ผ1 ๐’„2 ๐›ผ2 + 1 โˆ’ ๐›ผ1 1 โˆ’ ๐›ผ2 ๐’„3 ๐›ผ3 Just like ordinary alpha blending 3D Gaussian Splatting for Real-Time Radiance Field Rendering
  4. Multivariate Gaussian kernel ๐บ ๐’™ = 1 2๐œ‹ ๐‘‘det(ฮฃ) exp(โˆ’

    1 2 ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ ) Multivariate Gaussian distribution ๐บ๐‘”๐‘  ๐’™ = exp(โˆ’ 1 2 ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ ) Donโ€™t have to be normalized A key component : Covariance Matrix ฮฃ ? ? ? ? ? ? ? ? ? ? ? ? ?
  5. The covariance matrix ( 2d case ) โ€ข Letโ€™s start

    from a limited point set 1. Letโ€™s have an arbitrary unit vector: ๐‘‰ 2. Take the projected quantity: zi = ๐‘‰ ๐‘ฅ โ‹… ๐‘ฅ๐‘– + ๐‘‰ ๐‘ฆ โ‹… ๐‘ฆ๐‘– 3. Calculate the variance of zi An arbitrary unit vector: ๐‘‰ (๐‘ฅ1 , y1 ) (๐‘ฅ2 , y2 ) (๐‘ฅ3 , y3 )
  6. Variance of ๐‘ง าง ๐‘ง = เท ๐‘–=1 ๐‘› ๐‘ง๐‘–

    = เท ๐‘–=1 ๐‘› (๐‘‰ ๐‘ฅ ๐‘ฅ๐‘– + ๐‘‰ ๐‘ฆ ๐‘ฆ๐‘– ) = ๐‘‰ ๐‘ฅ าง ๐‘ฅ + ๐‘‰ ๐‘ฆ เดค ๐‘ฆ mean: where าง ๐‘ฅ = ฯƒ ๐‘–=1 ๐‘› ๐‘ฅ๐‘–, เดค ๐‘ฆ = ฯƒ ๐‘–=1 ๐‘› ๐‘ฆ๐‘– variance: ๐‘‰๐‘Ž๐‘Ÿ(๐‘ง) = เท ๐‘–=1 ๐‘› ๐‘ง๐‘– โˆ’ าง ๐‘ง 2 = ๐‘‰ ๐‘ฅ 2 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ 2 + ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ + ๐‘‰ ๐‘ฆ 2 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 2 = ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ 2 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 2 ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ Covariance Matrix = ๐‘‰Tฮฃ๐‘‰
  7. Identity covariance matrix ฮฃI = 1 0 0 1 ๐บ๐‘”๐‘ 

    ๐’™ = exp(โˆ’ 1 2 ๐’™ โˆ’ ๐ ๐‘‡ฮฃI โˆ’1 ๐’™ โˆ’ ๐ ) Just a one-dimensional Gaussian kernel! = exp(โˆ’ 1 2 ๐’™ โˆ’ ๐ 2) ๐’™ 0 1 ๐
  8. Affine Transform of covariance matrix Looks like we can obtain

    a lot of various Gaussian kernels just with Affine Transforms? Idea: A lot of variationsโ€ฆ
  9. Apply a transform to a point set ฮฃ = 1

    ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ 2 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 2 = 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ 2 ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 2 = 1 ๐‘› เท ๐‘–=1 ๐‘› ( ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ๐‘‡ ) ๐‘ฅ๐‘– โ€ฒ = ๐‘€๐‘ฅ๐‘– ๐‘ฅ1 , ๐‘ฅ2 , โ€ฆ ๐‘ฅ๐‘– ๐‘ฅโ€ฒ1 , ๐‘ฅโ€ฒ2 , โ€ฆ ๐‘ฅโ€ฒ๐‘– ฮฃโ€ฒ = 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘€ ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ๐‘€ ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ๐‘‡ = ๐‘€ 1 ๐‘› เท ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ 2 ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 2 ๐‘€๐‘‡ = ๐‘€ฮฃ๐‘€๐‘‡ Just sandwich by M!
  10. ๐’™ ๐‘€โˆ’1 ๐’™โ€ฒ Meaning of the distance ๐บ๐‘”๐‘  ๐’™ =

    exp(โˆ’ 1 2 ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ ) Multivariate Gaussian kernel = ๐’™ โˆ’ ๐ ๐‘‡ ๐‘€โˆ’1 ๐‘‡ 1 0 0 1 โˆ’1 ๐‘€โˆ’1 ๐’™ โˆ’ ๐ = ๐‘€โˆ’1(๐’™ โˆ’ ๐) ๐‘‡ 1 0 0 1 โˆ’1 ๐‘€โˆ’1 ๐’™ โˆ’ ๐ Evaluate distance on identity kernel ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ = ๐’™ โˆ’ ๐ ๐‘‡ ๐‘€ 1 0 0 1 ๐‘€๐‘‡ โˆ’1 ๐’™ โˆ’ ๐ Transformed Identity covariance matrix
  11. Geometric Interpretation by Rot/Scale ฮฃ = ๐‘€ 1 0 0

    0 1 0 0 0 1 ๐‘€๐‘‡ = ๐‘…๐‘†๐‘†๐‘‡๐‘…๐‘‡ where S as a scaling matrix, R is a rotation matrix 3D Gaussian Splatting for Real-Time Radiance Field Rendering ๐‘ ๐‘ฅ 0 0 0 ๐‘ ๐‘ฆ 0 0 0 ๐‘ ๐‘ง Quaternion ๐‘ž๐‘Ÿ ๐‘ž๐‘– ๐‘ž๐‘— ๐‘ž๐‘˜ Optimize them by a differentiable renderer ฮฃ๐‘๐‘Ž๐‘‘ = โˆ’0.2 0.2 0.2 โˆ’0.1 An example of an invalid case
  12. Eigen value/Eigen vector = ๐‘… ๐‘ ๐‘ฅ 2 0 0 ๐‘ ๐‘ฆ

    2 ๐‘…๐‘‡R 1 0 = ๐‘ ๐‘ฅ 2 R 1 0 = ๐‘… ๐‘ ๐‘ฅ 2 0 0 ๐‘ ๐‘ฆ 2 ๐‘…๐‘‡R 0 1 = ๐‘ ๐‘ฆ 2 R 0 1 Eigenvector: scaling axis ฮฃR 1 0 = ๐‘ ๐‘ฅ 2R 1 0 ฮฃ๐‘ฅ = ๐œ†๐‘ฅ ฮฃR 0 1 = ๐‘ ๐‘ฆ 2R 0 1 Eigenvalue equation Eigenvalue: (scaling)^2=Variance ๐‘…๐‘† 1 0 R 1 0 0 1 R 0 1 ฮฃI = 1 0 0 1 ฮฃ ฮฃ = ๐‘…๐‘†๐‘†๐‘‡๐‘…๐‘‡ = ๐‘… ๐‘ ๐‘ฅ 2 0 0 ๐‘ ๐‘ฆ 2 ๐‘…๐‘‡ What happens when you multiply the ฮฃ and โ€œAxisโ€? ฮฃ R 1 0 ฮฃ R 0 1 Just apply scaling!
  13. Bounding box โ€ข You often need a bounding box of

    a splat โ€ข For rasterization ( 2d ) โ€ข The original paperโ€™s implementation uses eigenvalue to find a conservative bound ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ = ๐Ÿ๐Ÿ ๐’™ โˆ’ ๐ = ๐Ÿ ๐’Ž๐’‚๐’™(๐€๐Ÿ , ๐€๐Ÿ ) radius This is too conservative ๏Œ https://github.com/graphdeco-inria/diff-gaussian- rasterization/blob/59f5f77e3ddbac3ed9db93ec2cfe99ed6c5d121d/cuda_rasterizer/forward.cu#L229-L232 Chapter 15 ๅ›บๆœ‰ๅ€คใฎ่จˆ็ฎ—ใฎๅฐๆŠ€ | ็ทšๅฝขไปฃๆ•ฐใฎใ‚จใƒƒใ‚ปใƒณใ‚น https://www.youtube.com/watch?v=VyVi7iPb1Uw&t=3s A quick trick for computing eigenvalues | Chapter 15, Essence of linear algebra https://www.youtube.com/watch?v=e50Bj7jn9IQ
  14. Tighter bounding box ฦด ๐‘ 11 ๐‘ฃ๐‘ฅ 2 + 2 ฦด

    ๐‘ 12 ๐’—๐’™ ๐’—๐‘ฆ + ฦด ๐‘ 22 ๐’—๐‘ฆ 2 โˆ’ ๐‘˜2 = 0 where ฮฃโˆ’1 = ฦด ๐‘ 11 ฦด ๐‘ 12 ฦด ๐‘ 12 ฦด ๐‘ 22 We want the maximum/minimum of ๐’—๐’™ , ๐’—๐’š for the bounding box ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ = ๐’Œ๐Ÿ ๐’—๐‘‡ฮฃโˆ’1๐’— = ๐’Œ๐Ÿ where ๐’— = ๐’™ โˆ’ ๐ ๐‘˜ = 2 Lagrange multipliers ๐ฟ ๐’—๐’™ , ๐’—๐’š , ๐œ†๐ฟ = ๐’—๐’™ โˆ’ ๐œ†๐ฟ ฦด ๐‘ 11 ๐’—๐‘ฅ 2 + 2 ฦด ๐‘ 12 ๐’—๐’™ ๐’—๐‘ฆ + ฦด ๐‘ 22 ๐’—๐‘ฆ 2 โˆ’ ๐‘˜2 ๐ฟ ๐’—๐’™ , ๐’—๐’š , ๐œ†๐ฟ = ๐’—๐’š โˆ’ ๐œ†๐ฟ ฦด ๐‘ 11 ๐’—๐‘ฅ 2 + 2 ฦด ๐‘ 12 ๐’—๐’™ ๐’—๐‘ฆ + ฦด ๐‘ 22 ๐’—๐‘ฆ 2 โˆ’ ๐‘˜2 ๐œ•๐ฟ ๐œ•๐’—๐’™ = ๐œ•๐ฟ ๐œ•๐’—๐’š = ๐œ•๐ฟ ๐œ•๐œ†๐ฟ = ๐ŸŽ ๐œ•๐ฟ ๐œ•๐’—๐’™ = ๐œ•๐ฟ ๐œ•๐’—๐’š = ๐œ•๐ฟ ๐œ•๐œ†๐ฟ = ๐ŸŽ ๐’—๐’™ ๐Ÿ = ฦด ๐‘ 22 ฦด ๐‘ 11 ฦด ๐‘ 22 โˆ’ ฦด ๐‘ 12 ๐Ÿ ๐‘˜2 = ฦด ๐‘ 22 det(ฮฃโˆ’1) ๐‘˜2 = ฦด ๐‘ 22 det(ฮฃ)๐‘˜2 ๐’—๐’š ๐Ÿ = ฦด ๐‘ 11 ฦด ๐‘ 11 ฦด ๐‘ 22 โˆ’ ฦด ๐‘ 12 ๐Ÿ ๐‘˜2 = ฦด ๐‘ 11 det(ฮฃโˆ’1) ๐‘˜2 = ฦด ๐‘ 11 det(ฮฃ)๐‘˜2 ๐’—๐‘ฅ = ยฑ๐‘˜ ฦด ๐‘ 22 ๐‘‘๐‘’๐‘ก(๐›ด) ๐’—๐‘ฆ = ยฑ๐‘˜ ฦด ๐‘ 11 ๐‘‘๐‘’๐‘ก(๐›ด) The boundary: Where the distance on the identity space is k
  15. Projection of a Gaussian kernel โ€ข Need to support two

    kinds of transform 1. View Transform โ€ข world space to camera space 2. Perspective Transform โ€ข Project a Gaussian kernel to screen space
  16. View Transform โ€ข Transform the center ๐œ‡ โ€ข Transform the

    covariance matrix ฮฃ โ€ข Trivial to compute by sandwich form ฮฃโ€ฒ = ๐‘€ฮฃ๐‘€๐‘‡ 3D Gaussian Splatting for Real-Time Radiance Field Rendering
  17. How to project a Gaussian kernel to XY? ฮฃ3D =

    ๐‘๐‘œ๐‘ฃ ๐‘ฅ, ๐‘ฅ ๐‘๐‘œ๐‘ฃ ๐‘ฅ, ๐‘ฆ ๐‘๐‘œ๐‘ฃ ๐‘ฅ, ๐‘ง ๐‘๐‘œ๐‘ฃ ๐‘ฆ, ๐‘ฅ ๐‘๐‘œ๐‘ฃ ๐‘ฆ, ๐‘ฆ ๐‘๐‘œ๐‘ฃ ๐‘ฆ, ๐‘ง ๐‘๐‘œ๐‘ฃ ๐‘ง, ๐‘ฅ ๐‘๐‘œ๐‘ฃ ๐‘ง, ๐‘ฆ ๐‘๐‘œ๐‘ฃ ๐‘ง, ๐‘ง where ๐‘๐‘œ๐‘ฃ ๐‘ฅ, ๐‘ฆ = 1 ๐‘› ฯƒ ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ ฮฃ2Dโˆ’XY = 1 ๐‘› ฯƒ ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ 2 1 ๐‘› ฯƒ ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 1 ๐‘› ฯƒ ๐‘–=1 ๐‘› ๐‘ฅ๐‘– โˆ’ าง ๐‘ฅ ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 1 ๐‘› ฯƒ ๐‘–=1 ๐‘› ๐‘ฆ๐‘– โˆ’ เดค ๐‘ฆ 2 = ๐‘๐‘œ๐‘ฃ ๐‘ฅ, ๐‘ฅ ๐‘๐‘œ๐‘ฃ ๐‘ฅ, ๐‘ฆ ๐‘๐‘œ๐‘ฃ ๐‘ฆ, ๐‘ฅ ๐‘๐‘œ๐‘ฃ ๐‘ฆ, ๐‘ฆ So we can just take 2x2 matrix from ฮฃ3D โ€ข The distribution of z is not visible at all โ€ข Only 2D distribution is our interest Projection to XY plane Same point set
  18. Perspective Transform โ€ข Transform the center ๐œ‡ โ€ข Same as

    conventional perspective transform โ€ข Transform the covariance matrix ฮฃ ? โ€ข Think about mapping between screen space and world space โ€ข Perspective transform is not a linear transform โ€ข Apply an approximated linear transform instead 3D Gaussian Splatting for Real-Time Radiance Field Rendering EWA Volume Splatting
  19. Perspective Transform Screen( ๐‘ง = โˆ’1 ) -z +x -x

    โˆ’ ๐‘๐‘ฅ ๐‘๐‘ง , โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , 1 ๐‘๐‘ฅ , ๐‘๐‘ฆ , ๐‘๐‘ง ๐‘“ But we want to know how the volume is compressed via f() ๐‘“ ๐‘ = โˆ’ ๐‘๐‘ฅ ๐‘๐‘ง , โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , 1 Coordinate Mapping
  20. Perspective Transform of volume Screen( ๐‘ง = โˆ’1 ) -z

    +x -x 1,0,0 0,1,0 0,0,1 ๐‘“ Find the scaling of each axis Xbasis = ๐œ• ๐œ•๐‘๐‘ฅ โˆ’ ๐‘๐‘ฅ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ฅ โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ฅ 1 Find the basis transform that represents the scaling ๐‘“ ๐‘ = โˆ’ ๐‘๐‘ฅ ๐‘๐‘ง , โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , 1 Coordinate Mapping ๐‘Œbasis = ๐œ• ๐œ•๐‘๐‘ฆ โˆ’ ๐‘๐‘ฅ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ฆ โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ฆ 1 ๐‘basis = ๐œ• ๐œ•๐‘๐‘ง โˆ’ ๐‘๐‘ฅ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ง โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ง 1 Xbasis ๐‘Œbasis ๐‘basis
  21. Perspective Transform of volume Xbasis = ๐œ• ๐œ•๐‘๐‘ฅ โˆ’ ๐‘๐‘ฅ

    ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ฅ โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ฅ 1 = โˆ’ 1 ๐‘๐‘ง , 0,0 ๐‘Œbasis = ๐œ• ๐œ•๐‘๐‘ฆ โˆ’ ๐‘๐‘ฅ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ฆ โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ฆ 1 = 0, โˆ’ 1 ๐‘๐‘ง , 0 ๐‘basis = ๐œ• ๐œ•๐‘๐‘ง โˆ’ ๐‘๐‘ฅ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ง โˆ’ ๐‘๐‘ฆ ๐‘๐‘ง , ๐œ• ๐œ•๐‘๐‘ง 1 = ๐‘๐‘ฅ ๐‘๐‘ง 2 , ๐‘๐‘ฆ ๐‘๐‘ง 2 , 0 Thus, we get a volume transform: ๐‘ฑ = โˆ’ 1 ๐‘๐‘ง 0 ๐‘๐‘ฅ ๐‘๐‘ง 2 0 โˆ’ 1 ๐‘๐‘ง ๐‘๐‘ฆ ๐‘๐‘ง 2 3D Gaussian Splatting for Real-Time Radiance Field Rendering Note that the third row is not used since what we need is 2d covariance matrix on screen space.
  22. The approx. error of the volume transform โ€ข The error

    is not too large on almost cases โ€ข Large splat on the edge may have noticeable errors โ€ข Totally fine for small splats โ€ข But one more critical corner caseโ€ฆ Worst case scenario that I found
  23. A corner case โ€ข A splat on XY plane on

    view space +x -x ๏ผˆ#๏ผพฯ‰๏ผพ๏ผ‰ ๐‘ฑ = โˆ’ 1 ๐‘๐‘ง 0 ๐‘๐‘ฅ ๐‘๐‘ง 2 0 โˆ’ 1 ๐‘๐‘ง ๐‘๐‘ฆ ๐‘๐‘ง 2 The direct reasons are those terms But they work well in general cases, thus, Iโ€™d recommend doing an adhoc culling with ๐œ‡ for such splats The view frustum A rendering example. A splat appears but it is total off from the view frustum
  24. Antialiasing โ€ข A small splat on screen space tends to

    be temporally unstable โ€ข Also numerically unstable โ€ข The original paperโ€™s implementation chose an ad hoc but simple antialiasing A small splat in a pixel ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ x as an evaluation point https://github.com/graphdeco-inria/diff-gaussian- rasterization/blob/59f5f77e3ddbac3ed9db93ec2cfe99ed6c5d121d/cuda_rasterizer/forward.cu#L110-L111 Adding a constant value to the screen space covariance matrix?
  25. Antialiasing โ€ข Variance along an arbitrary unit vector ๐‘‰ for

    the covariance matrix ๐‘‰๐‘Ž๐‘Ÿ(๐‘ง, ๐‘‰) = ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ ๐‘ 11 ๐‘ 12 ๐‘ 12 ๐‘ 22 ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ Covariance Matrix ๐‘‰๐‘Ž๐‘Ÿโ€ฒ(๐‘ง, ๐‘‰) = ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ ๐‘ 11 + ๐ท ๐‘ 12 ๐‘ 12 ๐‘ 22 + ๐ท ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ = ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ ๐‘ 11 ๐‘ 12 ๐‘ 12 ๐‘ 22 ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ + ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ ๐ท 0 0 ๐ท ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ = ๐‘‰๐‘Ž๐‘Ÿ ๐‘ง, ๐‘‰ + ๐ท๐‘‰ โ‹… ๐‘‰ = ๐‘‰๐‘Ž๐‘Ÿ ๐‘ง, ๐‘‰ + ๐ท Just increase variance by ๐ท for all directions with two lines of code!
  26. Overview - Tile-based rasterizer Z sorting of splats for each

    tile Evaluate Gaussian kernel and calculate color for each splat for each pixel 6 FAST DIFFERENTIABLE RASTERIZER FOR GAUSSIANS 3D Gaussian Splatting for Real-Time Radiance Field Rendering 3D to 2D perspective projection of splats Store splats to the list on 16 x 16 tiles
  27. A failure โ€ข Maybe we donโ€™t need a global z-sorting?

    โ€ข So just take a splat list and sort them per tile on shared memory? Holy smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas However, it didnโ€™t work โ€ข List of splats per tile is often quite longโ€ฆ โ€ข Just slow for large sorting via bitonic sort โ€ข It is easy to overflow from shared memory on sorting ๏Œ โ€ข Decrease tile size to reduce the number of splats? โ€ข No. It increases global atomicAdd, which is too expensive
  28. My Implementation 3D to 2D perspective projection of splats โ€ข

    Store splats to the list on 64 x 64 tiles โ€ข SH evaluation ( approximation ) Z sorting of splats for each tile โ€ข Onesweep radix sort, just once Tile Index Depth 8-bit 32-bit Index of a splat : Key : Value Tile ( 0, 0 ) Tile ( 1, 0 ) Tile ( 2, 0 ) โ€ฆ Sort Evaluate Gaussian kernel and calculate color for each splat for each pixel Evaluate splats for each tile/pixels Use atomic counters on shared memory
  29. Rasterizing per tile โ€ข Tile size is not small enough

    โ€ข 32x32 for each tile for 2048x1536 resolution ( rounded up to the multiple of 16 ) โ€ข A splat can be evaluated by many unrelated pixels!! โ€ข Do additional culling for each 8x8 tile ( x2 faster ) 32 px 32 px Waste of splat evaluations 8 px 8 px Load splats for each GPU block block size = 16x16 Culling unrelated splats for each 8x8 micro tiles Results as bit mask Evaluate valid splats __ffs to find set bit
  30. Better culling than AABB-AABB โ€ข AABB-AABB tests can be too

    conservative โ€ข AABB-Ellipse test? โ€ข No, there is a simpler way 8x8 tile Idea: Find a maximum Gaussian kernel value in an AABB can tell if we can cull the splat accurately Proposed by StopThePop (SIGGRAPH 2024) paper A maximum Gaussian kernel value in an AABB ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ A minimum value of ๐บ๐‘”๐‘  ๐’™ = exp(โˆ’ 1 2 ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™ โˆ’ ๐ ) ( Mahalanobis distance)^2
  31. Minimum mahalanobis distance โ€ข Mahalanobis distance monotonically increase for all

    direction closer An insight: The minimum point must be found along the two lines โ˜บ x = clamp( ๐œ‡๐‘ฅ, box left, box right ), y = clamp( ๐œ‡๐‘ฆ, box left, box right ) The minimum point must be on the visible edge from ๐œ‡, not somewhere on the behind โ€ป if the ๐œ‡ is outside closer
  32. Minimum point on axis-aligned lines ๐’™ โˆ’ ๐ ๐‘‡ฮฃโˆ’1 ๐’™

    โˆ’ ๐ = ๐‘‰๐‘‡ ฦด ๐‘ 11 ฦด ๐‘ 12 ฦด ๐‘ 12 ฦด ๐‘ 22 ๐‘‰ = ๐‘‰ ๐‘ฅ 2 ฦด ๐‘ 11 + 2๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ ฦด ๐‘ 12 + ๐‘‰ ๐‘ฆ 2 ฦด ๐‘ 22 ๐‘‰ ๐‘ฅ = โˆ’ ฦด ๐‘ 12 ฦด ๐‘ 11 ๐‘‰ ๐‘ฆ ๐‘‰ ๐‘ฆ = โˆ’ ฦด ๐‘ 12 ฦด ๐‘ 22 ๐‘‰ ๐‘ฅ ๐‘‘ ๐‘‘๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฅ 2 ฦด ๐‘ 11 + 2๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ ฦด ๐‘ 12 + ๐‘‰ ๐‘ฆ 2 ฦด ๐‘ 22 = 0 ๐‘‘ ๐‘‘๐‘‰ ๐‘ฆ ๐‘‰ ๐‘ฅ 2 ฦด ๐‘ 11 + 2๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ ฦด ๐‘ 12 + ๐‘‰ ๐‘ฆ 2 ฦด ๐‘ 22 = 0 minimumx = ๐‘๐‘™๐‘Ž๐‘š๐‘(๐œ‡๐‘ฅ โˆ’ ฦด ๐‘ 12 ฦด ๐‘ 11 ๐‘‰ ๐‘ฆ , ๐‘๐‘œ๐‘ฅ ๐‘™๐‘’๐‘“๐‘ก, ๐‘๐‘œ๐‘ฅ ๐‘Ÿ๐‘–๐‘”โ„Ž๐‘ก) minimumy = ๐‘๐‘™๐‘Ž๐‘š๐‘(๐œ‡๐‘ฆ โˆ’ ฦด ๐‘ 12 ฦด ๐‘ 22 ๐‘‰ ๐‘ฅ , ๐‘๐‘œ๐‘ฅ ๐‘™๐‘’๐‘“๐‘ก, ๐‘๐‘œ๐‘ฅ ๐‘Ÿ๐‘–๐‘”โ„Ž๐‘ก) ฦด ๐‘ 11 = 0 case: ๐‘‰๐‘‡ฮฃโˆ’1๐‘‰ = 2๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ ฦด ๐‘ 12 + ๐‘‰ ๐‘ฆ 2 ฦด ๐‘ 22 This can be negative depending on ๐‘‰ ๐‘ฅ ๐‘‰ ๐‘ฆ Invalid Gaussian kernel
  33. Conclusion โ€ข Introduced the Gaussian splatting formulation in intuitive ways

    โ€ข Easy to control its behavior โ€ข Can be optimized by a simple idea/formula โ€ข GPU implementation โ€ข The white-box splat representation helps to optimize the implementation on the GPU too โ€ข Thank you, linear algebra
  34. References โ€ข 3D Gaussian Splatting for Real-Time Radiance Field Rendering

    โ€ข EWA Volume Splatting โ€ข A geometric interpretation of the covariance matrix โ€ข Holy smoke! Faster Particle Rendering using Direct Compute by Gareth Thomas โ€ข ้ฉšใใปใฉใ‚ญใƒฌใ‚คใชไธ‰ๆฌกๅ…ƒใ‚ทใƒผใƒณๅพฉๅ…ƒใ€ใ€Œ3D Gaussian Splattingใ€ใ‚’ๅพนๅบ•็š„ใซ่งฃ่ชฌ ใ™ใ‚‹