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

Orbit eye: bugfixes and usability improvements #3817

Closed
wants to merge 2 commits into from

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Oct 11, 2023

  • ViewCoordinates are now mandatory as far as the spatial view is concerned: it defaults to RUB if unspecified.
  • Fixed an issue where the orbit eye would erroneously cache its view-coordinates across scenes and ViewCoordinates log calls.
  • The orbit eye now always maintains an up axis internally (which is RUB's up axis by default).
  • When a user goes in free-roll mode (middle mouse click), we now update the internal up-axis, which makes rolling then orbiting a much better experience as you don't end up in a weird state with no up axis.
23-10-11_19.11.55.patched.mp4

What

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@teh-cmc teh-cmc added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself 😤 annoying Something in the UI / SDK is annoying to use include in changelog labels Oct 11, 2023
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to have this fixed at last!

But I don't think we should provide a "default" view coordinates opinion in our API.

We can have an internal default fallback for the world-up in re_space_view_spatial. And I vote for +Z=up

crates/re_space_view_spatial/src/eye.rs Outdated Show resolved Hide resolved
crates/re_types/src/components/view_coordinates_ext.rs Outdated Show resolved Hide resolved
crates/re_types/src/components/view_coordinates_ext.rs Outdated Show resolved Hide resolved
@emilk
Copy link
Member

emilk commented Oct 12, 2023

After rolling the up-axis, the next rotation causes a big (non-smooth) jump

@teh-cmc teh-cmc marked this pull request as draft October 13, 2023 07:25
@roym899
Copy link
Collaborator

roym899 commented Nov 30, 2023

Would be nice to get this in @teh-cmc :)

@teh-cmc
Copy link
Member Author

teh-cmc commented Nov 30, 2023

Would be nice to get this in @teh-cmc :)

Yep I'd love to; it's looking pretty good now, there's just one last math issue left and it goes way beyond my very limited abilities 😶 I'll get someone to help me next week so we can land this!

@emilk
Copy link
Member

emilk commented Jan 29, 2024

I wish we could get this in - having a fixed up-axis would really help camera interaction

@emilk
Copy link
Member

emilk commented Feb 14, 2024

@emilk emilk closed this Feb 14, 2024
emilk added a commit that referenced this pull request Feb 15, 2024
* Continuing the work in #3817

### What
- The orbit eye now always maintains an up axis internally (+Z by
default, if there is no `ViewCoordinates`).
- When a user rolls the camera (middle mouse drag), we now change the
internal up-axis, which makes rolling then orbiting a much better
experience as you don't end up in a weird state with no up axis.
- The orbit eye center visualization now indicates the current up-axis



https://github.com/rerun-io/rerun/assets/1148717/daeb1e57-8fe3-4ac9-84fc-c673bb70ad09


- Fixes #3539
- Fixes #3420

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5193/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5193/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5193/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5193)
- [Docs
preview](https://rerun.io/preview/c4c8821a33c3df282e31c64ca1d719358666b72a/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/c4c8821a33c3df282e31c64ca1d719358666b72a/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Clement Rey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use 🪳 bug Something isn't working include in changelog 📺 re_viewer affects re_viewer itself
Projects
None yet
4 participants