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

Add "Rotate" button to dataset layers #7334

Open
philippotto opened this issue Sep 18, 2023 · 5 comments · May be fixed by #8159
Open

Add "Rotate" button to dataset layers #7334

philippotto opened this issue Sep 18, 2023 · 5 comments · May be fixed by #8159

Comments

@philippotto
Copy link
Member

philippotto commented Sep 18, 2023

Detailed Description

The user should be able to rotate dataset layers on the fly. The rotation should probably be persisted. Implementation-wise the existing affine transformations can be used.
One important aspect might be that skeleton layers don't know anything about transformations, yet. This means that the nodes would stay at their current position when rotating layers. transforms should work with nodes currently. however, one cannot modify the skeleton layer if it's rendered with transforms.

Context

See https://scm.slack.com/archives/C5AKLAV0B/p1694764730277899

@MichaelBuessemeyer
Copy link
Contributor

@hotzenklotz What about this ThreeJs example?
https://threejs.org/examples/misc_controls_transform.html

We could use that in a smaller scale, show a cube with marked surfaces and only enable the rotation controls. If the controls are too quirky they can be replaced with three and sliders ranging from 0 to 360 and the three scene is only used for displaying what the will be rendered.

Moreover, I'd like to try to add some kind of camera to the scene so the user can see what to expect.

Another idea would be to have a small annotation view (3 rectangles) like the ortho viewports in which the current "cube with marked surfaces" is rendered according to the current settings

Kinda like this: Image
(Note: I did not check whether that's a possible valid orientation)

@hotzenklotz
Copy link
Member

  1. The ThreeJS example is really cool. The code for that is also fairly small (<200LOC) so that could be a viable option.
  2. Regardless of the preview/threejs/etc, I would always have a synced number input so that a) the users can double check any changes made with actual numbers or b) input the numbers directly if they know them already.
  3. I always images this feature/setting to be in a settings pages somewhere. So, I would not show/preview any actual data but just the generic "texture" with the colored viewport names XY, etc.

I personally find the rotating, interactive cube preview (threejs) easier for my brain than to imagine the XZ plane in the XY viewport (like in you mockup above). But I could imaging other people feeling differently about this.

@MichaelBuessemeyer
Copy link
Contributor

Additional idea form @valentin-pinkau: have a unrotated semi-transparent cube that shows the initial rotation for the proposed visualization.

Moreover, valentin also mentioned that a visualization may not be necessary. Instead the user would switch a few times between the settings and viewing the dataset until the wanted orientation is reached.

One open question that came up is whether to only allow rotations of multiples of 90 degrees or also something arbitrary inbetween

@hotzenklotz
Copy link
Member

Moreover, valentin also mentioned that a visualization may not be necessary. Instead the user would switch a few times between the settings and viewing the dataset until the wanted orientation is reached.

Yes, the first and easiest version can just be number inputs. For some people that will be enough. For some not. See the case of @Tobias314 trying to rotate a datasets together with Anna and how hard it was to communicate right.

One open question that came up is whether to only allow rotations of multiples of 90 degrees or also something arbitrary inbetween

Any interactive preview/widget probably should be align to 90°. A number input probably does not need this. If people want to do arbitrary rotation in a number inputs (and we support this kind of transformation) then it should be fine.

@MichaelBuessemeyer
Copy link
Contributor

More implementation details were discussed here: https://scm.slack.com/archives/C5AKLAV0B/p1731504476951809

@fm3 fm3 added the frontend label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants