-
Notifications
You must be signed in to change notification settings - Fork 366
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
Add optional solid/filled (triangle mesh) rendering to Boxes3D
and Ellipsoids
.
#6953
Conversation
This is identical to `Color` except that it has the semantics of specifically applying to surfaces (triangles) and not lines.
Also update `EllipsoidsVisualizer` to use the new `process_labels_3d` which was added later, and update `process_labels_3d` to handle two colors.
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.
looking great, almost good to go!
lots of cans of worms here (annotation context interaction, lack of tagged components, backwards compat questions of existing Color
, lack of generalized transparency, ...) but I think they're all sidestepped well enough here that we can move forward 😄
We definitely need to do something about the color view/edit ui, but this can go separately
crates/store/re_types/definitions/rerun/archetypes/ellipsoids.fbs
Outdated
Show resolved
Hide resolved
crates/viewer/re_space_view_spatial/src/visualizers/ellipsoids.rs
Outdated
Show resolved
Hide resolved
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.
(that was meant to be a request changes
:))
Spent some time talking through this with @Wumpf and @nikolausWest this morning. Unfortunately the consensus is that introducing support for separable line vs solid colors leads down a complexity pathway we would like to avoid until we have:
I think the best compromise solution on the complexity scale is to, instead, introduce a new enum value:
Regardless of choice, the single Color component would still get used. This gives us a nice single value toggleable enum in the UI to switch the modes without needing to worry about disabling/enabling the two separately. |
I see a problem with this schema: it prevents drawing solid and lines simultaneously with different colors (e.g. one might use the solid color for "object type" and the lines for "state"). I suppose “use two entities or instances" is a reasonable interim way to achieve that, though. I'll update this PR as you propose. |
Yeah, definitely acknowledged as a shortcoming. But I think it's one we can improve in the future with #6889 |
Apologies on the back and forth on this one @kpreid. I realize we sent you in the other direction initially |
This merge commit was made with `git merge --strategy=ours` and doesn't actually merge any changes, just, essentially, mark the second parent (the old line of development) as part of the history.
I've now pushed the requested changes. There is now no (Perhaps someday — or now — it would make the most sense to have You may wish to note that the history of this PR branch now includes a dummy merge commit. This is because I found it easiest to re-develop the new design off of |
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.
Looks solid! (pun intended)
I added an editor to the new enum, our ui fallback for those is unfortunately not working, so that one showed null
(we should really start looking into generating edit uis automatically for trivial types - Opened an issue for this here now #6974)
Now with the editor it's possible to switch the mode in the ui 🎉
Screen.Recording.2024-07-24.at.10.12.11.mov
// We must perform this transform to fully account for the per-instance | ||
// transform, which is separate from the entity's transform. |
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.
thanks for clarifying this for the next person (me) who gets confused by this 😄
pried a bit into contributor ci issues, but will have to take this separately |
What
With these changes,
Boxes3D
andEllipsoids
can now be viewed as solid objects. This is part of the work on #1361 and the mechanisms added here will generalize to other shapes.SolidColor
. This is identical toColor
except that, on shapes where it applies, it sets the color of surfaces instead of lines. Whether its color is transparent controls whether the surfaces are drawn at all.SolidColor
to theBoxes3D
andEllipsoids
archetypes.proc_mesh::SolidCache
to cache the calculation of triangle meshes.proc_mesh::ProcMeshKey::Cube
to allow the cached mech mechanism to generate solid cubes.Future work (things this PR doesn't do):
colors
ofBoxes3D
be renamedline_colors
, or something like that? I think so, but that would be a breaking change, so I didn't in this PR.Color
be renamed?SolidColor
, LineColor, and
Color` with some override policy between them?SolidColor
be calledSurfaceColor
instead?SolidColor
interact with annotation contexts?Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerCHANGELOG.md
and the migration guideEllipsoids
archetype has a renamed field but that isn't released yet, so doesn't need noting.To run all checks from
main
, comment on the PR with@rerun-bot full-check
.