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

If a user hasn't interacted with the camera, continue to resize to the orbit-eye #2839

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Jul 26, 2023

What

Our initial orbit-eye state is sensitive to the timing of what content is on screen when the scene is initialized.

There appears to be maybe be a regression that stems from faster scene initialization, potentially interacting pathologically with the fact that our blueprint doesn't yet store the camera position. In any case, there are easy-to-reproduce situations where our timeline hasn't yet updated from the initial time when the scene is first populated, meaning many scenes just end up with the empty-scene initizalization for the orbit-eye, and then stick there even as content is added to the scene.

This only appears to affect examples that run live via .connect(). Using the viewer with a pre-saved rrd file (either locally or on the web) mitigates the issue -- presumably because this causes our timestamp to be updated sooner.

However, even if we initialize timeline differently relative to view creation, it's very easy to create scenarios where you log a small piece of content followed by a large piece of content which ends up significantly outside the FOV.

The Solution

We now track whether any user interaction has occured, and if it hasn't continue to interpolate to the new target eye, bringing new content into the field of view of the scene.

Examples of worse behavior

It's worth noting the behavior of arkitscenes does seem like a regression relative to the current behavior. I don't love the scene bouncing around that way.

https://demo.rerun.io/pr/2839/examples/arkit_scenes/

Examples of improved behavior

However, the behavior of linetrip example and colmap were arguably totally broken before and this seems like a huge improvement:

python docs/code-examples/line_strip3d_batch.py
Before After
image image
python examples/python/structure_from_motion/main.py --dataset colmap_fiat
Before After
image image

Fixes #2829

Checklist

@jleibs jleibs requested a review from Wumpf July 26, 2023 19:07
@jleibs jleibs added the ui concerns graphical user interface label Jul 26, 2023
@jleibs jleibs marked this pull request as ready for review July 26, 2023 19:25
@jleibs jleibs added this to the 0.8 milestone Jul 26, 2023
@Wumpf
Copy link
Member

Wumpf commented Jul 27, 2023

It's worth noting the behavior of arkitscenes does seem like a regression relative to the current behavior. I don't love the scene bouncing around that way.

I see the bouncing but I don't find it all that irritating as it is smooth enough.
It's interesting though that the camera is as far out as it is; might be worth tweaking / looking into why it is that big.
We probably should at least for debug purposes visualize both the bounding box and the accumulated bounding box
EDIT: Turns out the "show bounding box" tickbox we already have shows the accumulated bounding box

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

played around with it and I really like the behavior but I'd be advocating for having the default_eye generally be further zoomed in while we're on it

crates/re_space_view_spatial/src/ui_3d.rs Outdated Show resolved Hide resolved
@Wumpf
Copy link
Member

Wumpf commented Jul 27, 2023

Let's talk about this briefly in the daily

@Wumpf Wumpf added the do-not-merge Do not merge this PR label Jul 27, 2023
@Wumpf
Copy link
Member

Wumpf commented Jul 27, 2023

It seems we still have a bug in the bounding box computation somewhere - it ends up being to big occasionally, causing the too-away camera I'm complaining about
EDIT: Likely false alarm - structure-from-motion demo has a few frames with points that are quite far away

@Wumpf
Copy link
Member

Wumpf commented Jul 27, 2023

the biggest risk is that if the user has a single point really far way, the camera will be bonkers. But this is a pre-existing problem as you'd also get that problematic camera when you reset camera (via double click)

@Wumpf
Copy link
Member

Wumpf commented Jul 27, 2023

Experimented with closer cameras and it doesn't work for the general case, what we have is about as good as it can be unless we start reasoning about "visual weight" of a scene

@Wumpf Wumpf removed the do-not-merge Do not merge this PR label Jul 27, 2023
@jleibs jleibs merged commit aa1822d into main Jul 27, 2023
@jleibs jleibs deleted the jleibs/growing_eye branch July 27, 2023 13:11
Wumpf added a commit that referenced this pull request Aug 3, 2023
* Fixes #2897

### What

Fix regression introduced in #2839
This landed in 0.8. Candidate for potential 0.8.1 release if we decide
to do one.

### 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 [demo.rerun.io](https://demo.rerun.io/pr/2900) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2900)
- [Docs
preview](https://rerun.io/preview/pr%3Aandreas%2Ffix-redraw/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Aandreas%2Ffix-redraw/examples)
emilk pushed a commit that referenced this pull request Aug 17, 2023
* Fixes #2897

### What

Fix regression introduced in #2839
This landed in 0.8. Candidate for potential 0.8.1 release if we decide
to do one.

### 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 [demo.rerun.io](https://demo.rerun.io/pr/2900) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2900)
- [Docs
preview](https://rerun.io/preview/pr%3Aandreas%2Ffix-redraw/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Aandreas%2Ffix-redraw/examples)
emilk pushed a commit that referenced this pull request Aug 17, 2023
* Fixes #2897

### What

Fix regression introduced in #2839
This landed in 0.8. Candidate for potential 0.8.1 release if we decide
to do one.

### 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 [demo.rerun.io](https://demo.rerun.io/pr/2900) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2900)
- [Docs
preview](https://rerun.io/preview/pr%3Aandreas%2Ffix-redraw/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Aandreas%2Ffix-redraw/examples)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛑 controversial ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interpolate the camera to accomodate the scene's bbox
3 participants