Location and size of Gaussian Splatings

Hello
I see there is mismatch between expected values and actual values for locations and scales of Gaussian splats. In the example below, I create unit sphere at location of each splat. I would expect the sphere to match splats since splat have the same size, but that is not happening here

Two questions

  1. why do I need to flip Y coordinate of the spheres to match splats locations? (see line 21)
  2. Is there a coefficient that I can use to scale the spheres so they match the size of the splats? Or is there a cleaner way for me to figure out the size of the splats?

Thank you,
David

cc @Cedric

Y flip needs to happen because of the first .PLY format that was not in Babylon space coordinate system. I chose to transform individual vertices instead of having non uniform scaling in GS transform.

There are 2 operations that transform the scaling value into actual geometry scaling:

A scaling matrix here with *2 the value

and here for covariance:

So, basically, if you want a splat radius of 0.5, compute its square root (sqrt(0.5) = 0.70710678118) then divide by 2.

I changed the shader to have a saturation of alpha (0 or 1) to verify that and got:

            // uniform scale 
            fBuffer[8 * ind + 3 + 0] = Math.sqrt(0.5) * 0.5;
            fBuffer[8 * ind + 3 + 1] = 1;
            fBuffer[8 * ind + 3 + 2] = Math.sqrt(0.5) * 0.5;

Beware with alpha computation, it will be difficult to have perfectly fitting splats. they will be appear smaller than the size you want.

1 Like