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

2D hover->3D ray doesn't account for camera perpsective #2459

Closed
Wumpf opened this issue Jun 16, 2023 · 0 comments · Fixed by #2482
Closed

2D hover->3D ray doesn't account for camera perpsective #2459

Wumpf opened this issue Jun 16, 2023 · 0 comments · Fixed by #2482
Labels
🪳 bug Something isn't working 🏎️ Quick Issue Can be fixed in a few hours or less 📺 re_viewer affects re_viewer itself

Comments

@Wumpf
Copy link
Member

Wumpf commented Jun 16, 2023

image

The white part of the ray should hit the depth image, but it doesn't because it seems we're taking the distance for the ray length directly without accounting for perspective

Meaning that in the middle of the image it works out:
image

@Wumpf Wumpf added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself 🏎️ Quick Issue Can be fixed in a few hours or less labels Jun 16, 2023
@emilk emilk mentioned this issue Jun 20, 2023
2 tasks
emilk added a commit that referenced this issue Jun 21, 2023
Closes #2459

<img width="488" alt="Screenshot 2023-06-19 at 20 39 26"
src="https://github.com/rerun-io/rerun/assets/1148717/90e16677-4a86-41b8-b1f5-52642518eac7">

### What
We where taking pinhole matrices and squeezing them into `Affine3A` with
predictably bad results.

The offending methods have been removed and replaced with more direct,
simpler steps.

### 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)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2482

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/d330b73/docs
Examples preview: https://rerun.io/preview/d330b73/examples
<!-- pr-link-docs:end -->

---------

Co-authored-by: Andreas Reich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🏎️ Quick Issue Can be fixed in a few hours or less 📺 re_viewer affects re_viewer itself
Projects
None yet
1 participant