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

camera improvements for 2d use cases #1479

Closed
cyrush opened this issue Mar 13, 2025 · 3 comments
Closed

camera improvements for 2d use cases #1479

cyrush opened this issue Mar 13, 2025 · 3 comments
Labels
Milestone

Comments

@cyrush
Copy link
Member

cyrush commented Mar 13, 2025

Camera info does not show 2d mode params and we should add an explicit 2d mode camera.

If you have a 2d dataset with no camera specified, you get a 2D style camera.

However, all camera params we currently accept are 3d, if you provide any camera you are back in 3D mode.

@cyrush cyrush added the bug label Mar 13, 2025
@cyrush cyrush changed the title camera info does not show 3d mode params camera info does not show 2d mode params Mar 13, 2025
@cyrush cyrush added this to the 0.9.4 milestone Mar 13, 2025
@cyrush
Copy link
Member Author

cyrush commented Mar 14, 2025

3d Camera:

    camera: 
      position: [-8.88178419700125e-16, -8.88178419700125e-16, 28.2842712402344]
      look_at: [-8.88178419700125e-16, -8.88178419700125e-16, 0.0]
      up: [0.0, 1.0, 0.0]
      zoom: 1.0
      fov: 60.0
      near_plane: 2.82842707633972
      far_plane: 282.842712402344

This info is missing xpan, ypan (note: zoom is effectively zpan)
We could also add the projection and view matrix info, but we can't directly set those in VTK-m.

Proposed 2d Camera Input Spec:

  camera: 
    2d: [l,r,b,t]

or more verbose:

  camera: 
    2d:
       left: l
       right: r
       bottom: b
       top: t

@cyrush cyrush changed the title camera info does not show 2d mode params camera improvements for 2d use cases Mar 14, 2025
@cyrush
Copy link
Member Author

cyrush commented Mar 19, 2025

#1484 adds a 2d camera mode for rendering and scalar rendering (project_2d), as well as 2d cam details to info along with xpan and ypan.

@cyrush
Copy link
Member Author

cyrush commented Mar 20, 2025

resolved in #1484

@cyrush cyrush closed this as completed Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant