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

Make image transparency explicit & split image visualizers #6548

Closed
Wumpf opened this issue Jun 12, 2024 · 1 comment · Fixed by #6654
Closed

Make image transparency explicit & split image visualizers #6548

Wumpf opened this issue Jun 12, 2024 · 1 comment · Fixed by #6654
Assignees
Labels
🍏 primitives Relating to Rerun primitives 📺 re_viewer affects re_viewer itself 🚜 refactor Change the code, not the functionality
Milestone

Comments

@Wumpf
Copy link
Member

Wumpf commented Jun 12, 2024

Today, we automatically determine a transparency & implicit order between images in a stack.

This ties all three image types (regular, depth, segmentation) together into single visualizer which is hard to take apart. We do want to take it apart to make it easier to express their respective archetype realationships (and difference in actual visualization).

Furthermore, the implicit transparency won't scale well into a world where we have 2D transforms.

Instead, we should use transparency from color (if specified) and an additional Opacity component. For simplicity, Opacity always defaults to 1.0, except for segmentation images where we would set it to 0.5 unless the scene has no other images.

This in turn allows us to split up these three visualizers.

Related to

@Wumpf Wumpf added 📺 re_viewer affects re_viewer itself 🚜 refactor Change the code, not the functionality 🍏 primitives Relating to Rerun primitives labels Jun 12, 2024
@jleibs jleibs added this to the 0.17 milestone Jun 19, 2024
@jleibs
Copy link
Member

jleibs commented Jun 24, 2024

This dramatically improves the user experience of working with the new visualizer/override UI.

@Wumpf Wumpf self-assigned this Jun 24, 2024
Wumpf added a commit that referenced this issue Jun 25, 2024
### What

Image opacity (for layering images) is now an exposed component that can
be set from blueprint & data store.

Heuristic for opacity is a lot simplified:
* stacked images will no longer be made transparent in general
* only segmentation image will use 0.5 opacity as a fallback if there is
any other image in the scene
Demonstrated here:


https://github.com/rerun-io/rerun/assets/1220815/8b133062-01cf-4bca-bfdc-1cec8c1457ae



---

* prerequisite for #6548 
* almost solves #2192


### 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/6635?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/6635?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)!

- [PR Build Summary](https://build.rerun.io/pr/6635)
- [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`.
@Wumpf Wumpf linked a pull request Jun 27, 2024 that will close this issue
5 tasks
Wumpf added a commit that referenced this issue Jun 28, 2024
… to arrow2d archetype (#6644)

### What

Making `DrawOrder` editable resulting in changing the depth offset
system (it has to read overrides etc.).
This in turn solved the bug of `fallback` not showing correctly for
`DrawOrder` and also giving everything a draw order via the fallback
system.
This + collecting visualizers into an order preserving set instead of a
hashmap fixes flickering!

With all these refactors I included `Arrows2D` as well, so the only
thing was left is to add a line to codegen in order to fix it seemingly
not supporting draw order.

* Fixes #5549
* Fixes #6600
* Part of #6548
* without this change set the separated image visualizers show
flickering as well

### 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/6644?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/6644?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)!

- [PR Build Summary](https://build.rerun.io/pr/6644)
- [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: Jeremy Leibs <jeremy@rerun.io>
@Wumpf Wumpf closed this as completed in 4dada3c Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍏 primitives Relating to Rerun primitives 📺 re_viewer affects re_viewer itself 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants