-
Notifications
You must be signed in to change notification settings - Fork 373
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
Better log_pinhole
and orient camera furstum based on pinhole view coordinates
#2553
Conversation
converted to draft since this doesn't account yet for projected rays |
Phew. I think I understand situation now way better than before. Before the last couple of changes, the points we pass between 2D and 3D didn't work out because we had underlying assumptions of how axis translate. Now both the ray and the projected hover point work nicely: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR seems to be conflating the role of view coordinates with the role of camera extrinsics. We do need to be able to use view coordinates to resolve the ambiguity in positive vs negative z. However, we should not arbitrarily be pointing the frustum along the axis that happens to have been annotated as F within a parent view coordinates. The only thing that should be changing which axis the camera is aligned with is a transform3d relative to the parent frame.
…ndo subtle change in default eye orientation
3e68f68
to
228dbbf
Compare
Converted to draft because we are not aligned with how to proceed on this yet. Basically we don't know exactly how |
ac0db9e
to
399c6d9
Compare
crates/re_space_view_spatial/src/scene/contexts/transform_context.rs
Outdated
Show resolved
Hide resolved
crates/re_space_view_spatial/src/scene/contexts/transform_context.rs
Outdated
Show resolved
Hide resolved
Based on PR discussion. Unblocking this (but not approving yet).
I'm taking this over! |
log_pinhole
and orient camera furstum based on pinhole view coordinates
This has gone waaay above and beyond the original PR. I'll open my own PR instead :) |
What
Fixes #2244, Fixes #2589
Camera frustum and contained 2D content reacts now correctly to axis conventions set by view coordinates. Turns out that we before had essentially RDF hardcoded which became particularly apparent when flipping the Z axis, e.g. by using RUB (which ironically is the convention we use for the Eye camera itself).
I tested this against all samples that have a frustum and in particularly also made sure that 3D->2D transforms still work as expected (tested this in arkit and objectron).
Furthermore, I checked against #2512 where frustum orientation did not align with what happened when taking the view of the camera (i.e. double clicking the frustum). Without setting view coordinates this now correctly shows
And with setting
the frustum flips around and the scene starts making sense
I also took the opportunity to look over uses of view coordinates and remove
SpaceSpecs
as well as unnecessary caching thereof (or view coordinates) as a result.Checklist
PR Build Summary: https://build.rerun.io/pr/2553
Docs preview: https://rerun.io/preview/399c6d9/docs
Examples preview: https://rerun.io/preview/399c6d9/examples