Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded Camera Properties: Near & Far Clipping Planes, Dolly Zoom Max Distance #355

Open
rajkundu opened this issue Dec 12, 2024 · 2 comments

Comments

@rajkundu
Copy link

A few properties of cameras seem to be hardcoded:

  • Max distance of "dolly zoom" movements toward/away from the look-at point is capped at 200.0 units
  • Near & far clipping planes (here and here) are set to 0.01 units and 1000.0 units, respectively

Viser is an AMAZING tool, but these hardcoded parameters make it a bit inconvenient to work with point cloud data that is in millimeters, as things are often at distances of e.g. 1,500 to 2,000 units from the origin, and I may well want to be >200 units away from the "look at" point.

Does the functionality to set these parameters currently exist in Viser? It seems to me that it does not, and the simplest workaround I can think of at the moment is to scale everything down to units of meters, but the entire rest of our work is in mm, so a more "proper" workaround would be tremendously helpful. (Is there any way to inject JS code from the Python side?)

Please let me know your thoughts, and thank you very much!

@brentyi
Copy link
Collaborator

brentyi commented Dec 12, 2024

Hello, thanks for filing the issue!

#356 adds client.camera.near and client.camera.far props for setting the clipping planes; I also went and ahead and removed the maximum dolly distance.

@rajkundu
Copy link
Author

rajkundu commented Dec 12, 2024

Wow! Not only did you get back to me in ~1 hour, but you even fixed the issue with a PR. That is absolutely incredible, especially for a library this polished.

I really, really appreciate it. Thank you so much, @brentyi! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants