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 object hover & selection colors brighter and more pronounced #6596

Merged
merged 10 commits into from
Jun 19, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Jun 19, 2024

What

Problem

The outline colors of things that are hovered and/or selected in spatial space views has always been way too dark.
Can you quickly spot what is hovered and what is selected in this scene?

image

The problem with the selection color is that it is the dark blue used for selection of other things, e.g. ListItems:

image

Using the same color for selections everywhere makes sense, except one cannot really use the same color for a thin stroke as one uses for a massive background.

Solution

This PR introduces two new ContextExt methods: hover_stroke and selection_stroke.

The hover stroke is very bright, making it directly obvious what is being hovered.
The selection stroke is a brighter version of the blue background selection color. The result:

image

This is a vast improvement in practice (though the anti-aliasing leaves a little something to be desired…)

Other

I also chose to reuse the same colors for other thing things, like the rays show out in the 2D->3D projection:

image

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 the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@Wumpf
Copy link
Member

Wumpf commented Jun 19, 2024

A very unfortuante sideeffect is that this now looks a quite bad on WebGL where we do even less antialiasing of the outlines - this is one of our few hidden WebGL differences: since it's not possible to sample multisampled textures, we don't do any antialiasing at all. On Native and WebGPU we do some (although still with lots to be desired).

WebGL:
image

WebGPU:
image

@Wumpf
Copy link
Member

Wumpf commented Jun 19, 2024

The "ugly dna" screenshot I can't repro actually, I guess you ramped up the thickness again after taking that?
image
(screenshot: chrome Webgpu)

@Wumpf
Copy link
Member

Wumpf commented Jun 19, 2024

Reducing the sharpness parameter in composite.wgsl helps a bit.

WebGL: Left 0.7, right 1.0 (status quo)
image

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

mechanics lgtm and it's a net win. In favor of going with sharpness of 0.7 as suggested above since it makes the antialiasing issues less pronounced. drawback is the slightly darker appearance again

@emilk
Copy link
Member Author

emilk commented Jun 19, 2024

The "ugly dna" screenshot I can't repro actually, I guess you ramped up the thickness again after taking that? image (screenshot: chrome Webgpu)

This is how the current state of the PR looks like on my machine with pixels_per_points=1:
image

@emilk emilk merged commit 19efe41 into main Jun 19, 2024
24 of 28 checks passed
@emilk emilk deleted the emilk/tweak-selection-hover-colors branch June 19, 2024 17:02
@Wumpf
Copy link
Member

Wumpf commented Jun 19, 2024

I guess github scaled it because the screenshot was too big to fit, making the lines look thinner

you didn't like the sharpness change?

emilk added a commit that referenced this pull request Jun 19, 2024
### What
* Builds upon and merges into
#6596
* Closes #5174



https://github.com/rerun-io/rerun/assets/1148717/37b29988-9cdb-4e9a-8ac1-e7b25b3836d5


### 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/6597?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/6597?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/6597)
- [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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🔺 re_renderer affects re_renderer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants