Skip to content

3D eye position and other properties in blueprint#11788

Merged
IsseW merged 28 commits intomainfrom
isse/bp-eye
Nov 6, 2025
Merged

3D eye position and other properties in blueprint#11788
IsseW merged 28 commits intomainfrom
isse/bp-eye

Conversation

@IsseW
Copy link
Member

@IsseW IsseW commented Nov 5, 2025

Related

What

Stores more eye properties in blueprint, like eye position and eye look target. Making it controllable from python.

New selection UI for the 3d spatial view:
image

I've also updated tests which before this either directly wrote to the spatial view state, or artificially did inputs to zoom out the view. I did not bother to recreate the viewing angle of these exactly as I didn't think that was important to the tests.

@IsseW IsseW added 📺 re_viewer affects re_viewer itself 🟦 blueprint The data that defines our UI include in changelog labels Nov 5, 2025
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Web viewer built successfully.

Result Commit Link Manifest
adda7ae https://rerun.io/viewer/pr/11788 +nightly +main

View image diff on kitdiff.

Note: This comment is updated whenever you push a commit.

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Latest documentation preview deployed successfully.

Result Commit Link
adda7ae https://landing-70ut229gc-rerun.vercel.app/docs

Note: This comment is updated whenever you push a commit.

@IsseW IsseW changed the title camera eye BP components 3D eye BP components Nov 5, 2025
@IsseW IsseW changed the title 3D eye BP components 3D eye position and other properties in blueprint Nov 5, 2025
@Wumpf Wumpf self-requested a review November 5, 2025 12:42
@Wumpf
Copy link
Member

Wumpf commented Nov 5, 2025

co-review on build

  • disable interpolation on change of position alone (i.e. rotating around in orbit mode)
  • allow rotating out of camera tracking
  • wasd doesn't work
  • should add a test for some interactions having just the axis in the middle and see that certain button clicks do stuff

/// Initially, the up-axis of the eye will be the same as the up-axis of the scene (or +Z if
/// the scene has no up axis defined).
///
/// A zero vector is valid and will result in 3 degrees of freedom.
Copy link
Member

Choose a reason for hiding this comment

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

That's only the case for ego perspective though, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm it behaves weirdly in both instances I think, so can maybe just remove that comment?

Copy link
Member

Choose a reason for hiding this comment

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

sure, don't recall having that feature 🤷

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.

Super exited about this, so much goodness in here. Worth sharing on Discord as well :)

But I think we should iterate a lil bit on the readability of the logic here, leaving it in a better state since surely after this big change we'll miss some corner case and will have to come back to it many times - in particular update_target_eye is very intimidating right now.
I do love though that a lot of the camera code is no longer spread over several modules as much which makes it easier to reason about it!

Also plz grep for #8265 to check whether there's more tech debt associated with this if you haven't checked already.

Comment on lines +238 to +248
test_context.with_blueprint_ctx(|ctx, _| {
ViewProperty::from_archetype::<EyeControls3D>(
ctx.current_blueprint(),
ctx.blueprint_query(),
view_id,
)
.save_blueprint_component(
&ctx,
&EyeControls3D::descriptor_position(),
&Position3D::new(15.0, 5.0, 15.0),
);
Copy link
Member

Choose a reason for hiding this comment

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

given how often this shows up it makes me wonder whether we should have a utility specificially in re_view_spatial/tests to set the camera :)

we can put that in a follow-up tho / whoever gets annoyed enough by this

@IsseW
Copy link
Member Author

IsseW commented Nov 5, 2025

Also plz grep for #8265 to check whether there's more tech debt associated with this if you haven't checked already.

Did grep for that and a few others, and didn't find anything. Also for tests that used raw_input

@IsseW IsseW requested a review from Wumpf November 5, 2025 17:23
Wumpf
Wumpf previously requested changes Nov 6, 2025
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.

ControlEye makes so much more sense and the method cuts makes this thing a lot easier to follow & make it feel more maintainable for the next person, thank you!

One nasty thing I noticed only now unfortunately is that the selection panel needs too much horizontal space now, way more than we give it by default

Image

The reason for that is ofc "show smoothed bounding box". We have to figure out how to make this shorter, not sure yet 🤔

Btw. without that it's almost alright, but something strange is going on with direction vs position. Seems those boxes are too wide. We can let that one slide though if we find a shorter name for the above

Image

@IsseW IsseW dismissed Wumpf’s stale review November 6, 2025 13:13

Agreed on slack to merge after removing show smoothed bounding box had been removed from the blueprint.

@IsseW IsseW merged commit dec2e82 into main Nov 6, 2025
47 checks passed
@IsseW IsseW deleted the isse/bp-eye branch November 6, 2025 13:13
@IsseW IsseW mentioned this pull request Nov 7, 2025
1 task
IsseW added a commit that referenced this pull request Nov 11, 2025
### Related

* Fixes regression in #11788

### What

Fixes regression when tracking entity where inputs don't work correctly
when tracking an entity.


* [x] another round of manual testing on the web viewer build
IsseW added a commit that referenced this pull request Nov 11, 2025
### Related

* Fixes regression in #11788

### What

Fixes regression when tracking entity where inputs don't work correctly
when tracking an entity.


* [x] another round of manual testing on the web viewer build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🟦 blueprint The data that defines our UI include in changelog 📺 re_viewer affects re_viewer itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow setting default camera position/direction in blueprint Store (eye) camera properties of 3D View in Blueprint

2 participants