mkkellogg / GaussianSplats3D

Three.js-based implementation of 3D Gaussian splatting
MIT License
1.09k stars 134 forks source link

my splat is rotating in vertical plane of my screen #246

Closed sumanttyagi closed 9 hours ago

sumanttyagi commented 3 weeks ago

let's say i want to fix rotation in only horizontals plane screen the scene is just revolving can you please help me

mkkellogg commented 3 weeks ago

Can you show me the code you're using right now? And just to clarify, the effect you are trying to achieve is rotation in the horizontal plane relative to the screen?

sumanttyagi commented 2 weeks ago

@mkkellogg i am not able to rotate it in 360 degree

mkkellogg commented 2 weeks ago

I'm sorry, I am still a bit confused as to what the problem is. Are you trying to rotate the scene using the mouse, or by using code (for example, by passing rotation to Viewer.addSplatScene())?

sumanttyagi commented 2 weeks ago

i am trying from mouse not able to completely rotate it get restricted after certain point i am not able to visualize the other side of splats

https://github.com/mkkellogg/GaussianSplats3D/assets/63983323/39959f82-8c9f-448c-a413-57b98c17248c

sumanttyagi commented 2 weeks ago

you can see let's say we consider the frame plane i am able to rotate it vertical plane which is first 25 secs and as soon i try to rotate it in horizontal it is restricted not able to rotate if after angles

mkkellogg commented 2 weeks ago

Ah, this is happening because the splats are not aligned with the scene's natural axes. Press the U key to visualize the scene's axes, you'll see a green arrow pointing up (the Y axis). Then you can use the left and right arrow keys to rotate the scene around the forward axis (the direction the camera is facing) and with some trial and error you can align the scene with the natural axes. The orbiting mouse controls don't let you rotate a full 360 degrees around the center of rotation, so that's why you're seeing the limitations you're seeing.

Once you have your scene aligned, you can press the I key to see the camera's "up" vector, and pass that as a constructor parameter to Viewer next time you load the scene, and it should start out aligned correctly.

mkkellogg commented 4 days ago

Just wanted to check in, did the above approach work for you?

mkkellogg commented 9 hours ago

Closing this for now, please let me know if you still need help with this.