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

Image plane immediately shrinks to too small of a value for pinhole cameras. #3728

Closed
jleibs opened this issue Oct 6, 2023 · 2 comments · Fixed by #3749
Closed

Image plane immediately shrinks to too small of a value for pinhole cameras. #3728

jleibs opened this issue Oct 6, 2023 · 2 comments · Fixed by #3749
Assignees
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself
Milestone

Comments

@jleibs
Copy link
Member

jleibs commented Oct 6, 2023

Describe the bug
When creating a scene with a pinhole, the image plane starts off large, which sets the accumulated bounds, and then immediately shrinks to a small value.

To Reproduce

python docs/code-examples/pinhole_simple.py

Expected behavior
Image plane should be set to a reasonable value.

Screenshots
image

Rerun version
0.9

@jleibs jleibs added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself labels Oct 6, 2023
@jleibs jleibs added this to the 0.9.1 milestone Oct 6, 2023
@emilk
Copy link
Member

emilk commented Oct 7, 2023

The scene bounding box should ignore the pinhole frustum imho

@jleibs jleibs self-assigned this Oct 9, 2023
@jleibs
Copy link
Member Author

jleibs commented Oct 9, 2023

The scene bounding box should ignore the pinhole frustum imho

Good news: this seems to be the case.
Bad news: I have no idea what is causing the interaction.

jleibs added a commit that referenced this issue Oct 10, 2023
… user-edited (#3749)

### What
Resolves: #3728

Previously if just logging a pinhole, the projected image rectangle
would cause the accumulated bounding box to increase, but then the
heuristic would cause it to shrink again.

This changes that behavior to only happen in the event that the image
plane has been user-edited (in which case the heuristic no longer
applies). This gives us somewhat of the best of both worlds where the
bounds can't impact themselves, but if a user increases them manually
then the bounding box will still grow appropriately.

Before:

![image](https://github.com/rerun-io/rerun/assets/3312232/571a47c6-b2c9-4058-828e-942e1d331a3c)


After:

![image](https://github.com/rerun-io/rerun/assets/3312232/82e8d123-a8e4-4036-8144-b60723ddca29)

### 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/3749) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/3749)
- [Docs
preview](https://rerun.io/preview/d35e59586cfc3fb3e8c0f51d5fd1bad06f4fef1e/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/d35e59586cfc3fb3e8c0f51d5fd1bad06f4fef1e/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants