graphdeco-inria / diff-gaussian-rasterization

Other
924 stars 286 forks source link

Feature suggestion: backface-culling for the rasterizer #12

Open jo-chemla opened 1 year ago

jo-chemla commented 1 year ago

Hi there, Large splats which represent the scene background often get in front of the camera when zooming-out of the area of interest.

The training procedure results in multiple properties per splat (xyz, opacity, rot_i, scale_i, opacity, f_dc_i, spherical_harmonics f_rest_i) as well as normal nx, ny, nz per splat.

It would be great if the rasterizer could take normals into account to do backface-culling - only adding the gausian-splat contribution to screen pixels during rasterization if the corresponding splat faces the camera - some boolean operator along these lines: dot(normal, ray) < 0.

jo-chemla commented 1 year ago

Note it seems that normals are actually never set during 3dgs training and resulting ply has all splats normals set to null vector. Since there is no neighborhood information in the underlying g-splats structure, normals computation should probably be done another way - might need some gymnastics to extend pointclouds normals computation to ellipsoids-clouds, and then make normals orientation uniform in a post-processing step.