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

Include origin of cameras that are part of scene when computing view bounds #3811

Merged
merged 1 commit into from Oct 11, 2023

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Oct 11, 2023

What

Although we decided not to generally include the camera frustum in the view bounds. Having the origin included in the view bounds makes it much harder to totally "lose" the camera.

Consider:

import numpy as np
import rerun as rr

rr.init("rerun_example_pinhole", spawn=True)
rng = np.random.default_rng(12345)

rr.log("world/camera", rr.Pinhole(focal_length=300, width=300, height=300))
rr.log("world/points", rr.Points3D(rng.uniform(0, 1, size=[10, 3]) + [-0.5, -0.5, 1]))

Before:
image

After:
image

I still, personally find the default frustum a little small, but that's another issue:

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@jleibs jleibs added 😤 annoying Something in the UI / SDK is annoying to use 📺 re_viewer affects re_viewer itself labels Oct 11, 2023
@jleibs jleibs changed the title Include camera origin in view bounds Include origin of cameras that are part of scene when computing view bounds Oct 11, 2023
@jleibs jleibs marked this pull request as ready for review October 11, 2023 15:02
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Including the origin makes perfect sense to me

@jleibs jleibs added this to the 0.9.1 milestone Oct 11, 2023
@jleibs jleibs merged commit 381ac54 into main Oct 11, 2023
30 of 38 checks passed
@jleibs jleibs deleted the jleibs/camera_origin_bounds branch October 11, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use include in changelog 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants