Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional solid/filled (triangle mesh) rendering to
Boxes3D
and …
…`Ellipsoids`. (#6953) ### What With these changes, `Boxes3D` and `Ellipsoids` 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. * Add new component type `SolidColor`. This is identical to `Color` 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. * Add `SolidColor` to the `Boxes3D` and `Ellipsoids` archetypes. * Add support for solid colors to those archetypes’ visualizers. * Add `proc_mesh::SolidCache` to cache the calculation of triangle meshes. * Add `proc_mesh::ProcMeshKey::Cube` to allow the cached mech mechanism to generate solid cubes. ![Screenshot 2024-07-20 at 17 36 01](https://github.com/user-attachments/assets/ab6b2d1b-20d0-471c-ba49-25d4e10638ea) ![Screenshot 2024-07-20 at 17 35 12](https://github.com/user-attachments/assets/2d6ce740-5bd5-4475-a018-4d286adf2c5b) Future work (things this PR *doesn't* do): * Viewer UI needs a version of the color picker that lets you pick "fully transparent". * The line renderer does not play well with adjacent faces, causing line width to be halved some of the time. This could be fixed with something like #6508, simple depth offsets, or something else. * Getting naming and semantics right: * Should the `colors` of `Boxes3D` be renamed `line_colors`, or something like that? I think so, but that would be a breaking change, so I didn't in this PR. * Should `Color` be renamed? * Should there be all 3 of `SolidColor`, LineColor`, and `Color` with some override policy between them? * Should `SolidColor` be called `SurfaceColor` instead? * How should `SolidColor` interact with annotation contexts? * Figure out whether instanced meshes are the right choice for performance. ### 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 the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6953?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6953?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [X] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [X] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [X] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide * The `Ellipsoids` archetype has a renamed field but that isn't released yet, so doesn't need noting. - [PR Build Summary](https://build.rerun.io/pr/6953) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --------- Co-authored-by: Andreas Reich <[email protected]>
- Loading branch information