Improve heuristics around 2D vs 3D space-view creation#3822
Merged
Conversation
…ut of 3d spaces when they don't have a pinhole
teh-cmc
approved these changes
Oct 12, 2023
Contributor
teh-cmc
left a comment
There was a problem hiding this comment.
I'm no expert in this whole space-view-heuristic business (yet!) but this makes perfect sense to me.
emilk
requested changes
Oct 12, 2023
Comment on lines
+692
to
+695
| // If this is a 3D view and there's no parent pinhole, do not include this part. | ||
| if ctx.class == "3D" && !ctx.has_ancestor_pinhole { | ||
| return false; | ||
| } |
Member
There was a problem hiding this comment.
I can already read the Rust code and see what it does, I want to know why it does it!
Comment on lines
+193
to
+196
| // If this is a 3D view and there's no parent pinhole, do not include this part. | ||
| if ctx.class == "3D" && !ctx.has_ancestor_pinhole { | ||
| return false; | ||
| } |
emilk
reviewed
Oct 12, 2023
Comment on lines
+215
to
+218
| // If this is a 3D view and there's no parent pinhole, do not include this part. | ||
| if ctx.class == "3D" && !ctx.has_ancestor_pinhole { | ||
| return false; | ||
| } |
Comment on lines
+84
to
+85
| // possible to correctly project 3d objects to a root 2d view since the | ||
| // the pinhole would go past the root. |
Member
There was a problem hiding this comment.
I'm not sure I follow this. "go past the root"?
emilk
approved these changes
Oct 12, 2023
Contributor
|
Couldn't find a single heuristic issue with |
jleibs
added a commit
that referenced
this pull request
Oct 12, 2023
Wumpf
pushed a commit
that referenced
this pull request
Oct 12, 2023
### What Address some PR concerns from: - #3822 ### 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/3836) (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/3836) - [Docs preview](https://rerun.io/preview/9926b13d4f8bc925e37b506f46540058df211249/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/9926b13d4f8bc925e37b506f46540058df211249/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
This was referenced Oct 18, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Resolves:
rr.Boxes2Dis logged #3712 and probably moreAgainst my better judgement I ended up with one more pile of compelling hacks.
I believe it addresses many of the existing annoyances with awkwardly mixed 2d/3d views without (to my knowledge) causing regressions on the existing examples, though I haven't thoroughly tested everything yet, SFM, Human Motion, Arkit, etc. all look good.
The very high level idea is to prevent including 2D data in 3D views when it can't be projected via a pinhole, and then in a few other common edge-cases, more aggressively force 3D views.
This is done through 3 heuristic changes:
identify_entities_per_system_per_class.HeuristicFilterContextthat allows the heuristic filter to observe which class it is being evaluated for as well as other information about the tree.Some examples of the improved behavior:
As reported in #3712
Before:

After:

And another particularly bad case I found while exploring:
Before:

After:

Checklist