nerfstudio-project / nerfstudio

A collaboration friendly studio for NeRFs
https://docs.nerf.studio
Apache License 2.0
9.38k stars 1.27k forks source link

rotation not relative to current camera pose. #942

Open penguinflys opened 1 year ago

penguinflys commented 1 year ago

An intuitive rotation with arrow key on the keyboard would be relative to current camera pose. e.g., if you press left arrow key, you are supposed to have the content in the camera horizontally shift to right. However, current version of code doesn't function exactly as it is suposed to.

Frame before pressing the left rotation button: image

Frame after pressing the left rotation button: image

You can find that the content in above images is actually rotated instead of the translation effect caused by rotation.

I guess it is because rotation axis of viewing window is not relative to the last view direction and camera point.

Steps to reproduce the behavior: Train any scene and view in the scene, set a random viewpoint you can find the issuse.

tancik commented 1 year ago

This is what I see when I rotate left right, followed by up down. Is this different than the behavior you are experiencing? If so can you post a video

https://user-images.githubusercontent.com/3310961/201397677-74fe9a4a-444b-45de-b39f-be1d67097df7.mov

penguinflys commented 1 year ago

Thanks for the quick responding, I just rerendered my video, found it working properly, closing this issuse.

niujinshuchong commented 1 year ago

Hi, this issue is not solved. The rotation is always related to the blue line, but when the blue line is the same as view direction, it rotates the image plane instead of rotating the current camera, see the video below.

https://user-images.githubusercontent.com/13434986/206851863-1c2338d2-b937-4340-97be-ac9688eac741.mp4

penguinflys commented 1 year ago

Hi, this issue is not solved. The rotation is always related to the blue line, but when the blue line is the same as view direction, it rotates the image plane instead of rotating the current camera, see the video below.

2022-12-10.12-00-29.mp4

Aha, You have found a special case, Maybe I reopen the issue?

tancik commented 1 year ago

Hi, this issue is not solved. The rotation is always related to the blue line, but when the blue line is the same as view direction, it rotates the image plane instead of rotating the current camera, see the video below.

2022-12-10.12-00-29.mp4

I'm not sure I understand the issue, the video is working how I would expect? When using the mouse, it uses orbit controls and when you use the keyboard it uses first person controls.

penguinflys commented 1 year ago

Hi, this issue is not solved. The rotation is always related to the blue line, but when the blue line is the same as view direction, it rotates the image plane instead of rotating the current camera, see the video below. 2022-12-10.12-00-29.mp4

I'm not sure I understand the issue, the video is working how I would expect? When using the mouse, it uses orbit controls and when you use the keyboard it uses first person controls.

I made the test just now and I guess what the above video is intended to have is that the viewport rotates kind like move effects. just like below video.

https://user-images.githubusercontent.com/29662741/208024963-e6e58214-1613-4895-b682-a5c1656bd83e.mp4

I am not sure if this worth a fix, because there are alternative operations to get what you wanted. @tancik you decide if it should be closed or not.