graphdeco-inria / gaussian-splatting

Original reference implementation of "3D Gaussian Splatting for Real-Time Radiance Field Rendering"
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Other
14.85k stars 1.94k forks source link

Question about the orientation of each Gaussian #352

Open sunshineatnoon opened 1 year ago

sunshineatnoon commented 1 year ago

Hi, I have maybe a naive question about the orientations of the Gaussians. If my understanding is correct, the _rotation matrix is represented as quaternion, is it possible to get the actually orientation of each Gaussian from this quaternion? I assume there's an oracle orientation?

Snosixtyboo commented 1 year ago

Hi,

I am not sure I understand. Both a quaternion and a matrix are representations of a rotation, just expressed differently. If you need e.g. the rotation matrix, the Python code base includes a function to turn it into a matrix!

grgkopanas commented 1 year ago

https://github.com/graphdeco-inria/gaussian-splatting/blob/414b553ef1d3032ea634b7b7a1d121173f36592c/utils/general_utils.py#L78

and here it is

On Sat, Oct 21, 2023 at 4:35 PM Snosixtyboo @.***> wrote:

Hi,

I am not sure I understand. Both a quaternion and a matrix are representations of a rotation, just expressed differently. If you need e.g. the rotation matrix, the Python code base includes a function to turn it into a matrix!

— Reply to this email directly, view it on GitHub https://github.com/graphdeco-inria/gaussian-splatting/issues/352#issuecomment-1773811609, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGXXYLCN742SSMFLU223QTYAPMTHAVCNFSM6AAAAAA6JSKPSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTHAYTCNRQHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

yuedajiong commented 1 year ago

@sunshineatnoon

  1. Q includs R and t, this is for camera pose. #CAMERA-POSE
  2. maybe, the orientation you said is normal? need not in this algorithm, paper said. #POINT-ATTRIBUTE

these infomation used in the GaussSplat render: render1: xyz & opacity #shape render-2: get_covariance | scaling, rotation #pose get_features/shs | colors_precomp(feature, xyz, now_sh_degree) #color

sunshineatnoon commented 1 year ago

Hi, @grgkopanas and @Snosixtyboo Thanks for the quick response. Right, I understand the quaternion represents a rotation matrix. I'm looking for the absolute orientation here. My goal is to extract the normals from the gaussians. So in point cloud, you would compute normal using nearby points, but the Gaussians they already have orientation, so I'm wondering why not just use that as the normals?

jaco001 commented 1 year ago

If you look closely at effect of work from datatset all surfaces look like this ex_03_chaos

3D chaotic cloud ;) You probably will get normals from every splat but what algorithm you will use to 'average' normals from this? It can be less chaotic when you get splats from existing 3D objects, but still.

kwea123 commented 1 year ago

The rotation is not relevant to the normal, is it? Imagine a very thin gaussian, you would image the "orientation" is pointing along the long axis, but that is obviously not the normal

cs-mshah commented 7 months ago

You might want to look into https://slothfulxtx.github.io/TexGS/. They have estimated the normal. It is basically one of the eigenvectors of the covariance matrix.

nnop commented 3 months ago

The rotation is independent of the normal, but the eigenvector corresponding to the smallest scaling can serve as the normal direction. @kwea123