rerun icon indicating copy to clipboard operation
rerun copied to clipboard

Image opacity heuristic

Open jprochazk opened this issue 7 months ago • 2 comments

  • https://github.com/rerun-io/rerun/issues/9782

Previously, only segmentation images had an opacity fallback of 0.5 when other non-segmentation images were in the same view. We now keep track of the number of images per image kind, and use that to determine what the opacity should be for all image kinds that support opacity.

The images further to the front will be transparent if there are images possibly behind them.

Assuming the draw order fallback is also used, the draw order will be (front to back):

  • Segmentation
  • Color
  • Depth (does not support opacity, so we can ignore that)

Examples of fallback opacity:

  • 2x Segmentation:
    • Segmentation (1): 1.0
    • Segmentation (2): 1.0
  • 1x Segmentation + 1x Color:
    • Segmentation: 0.5
    • Color: 1.0
  • 1x Color + 1x Depth:
    • Color: 0.5
    • Depth: 1.0 (ignored)

jprochazk avatar Apr 23 '25 13:04 jprochazk

Web viewer built successfully. If applicable, you should also test it:

  • [ ] I have tested the web viewer
Result Commit Link Manifest
6afd7bb https://rerun.io/viewer/pr/9787 +nightly +main

Note: This comment is updated whenever you push a commit.

github-actions[bot] avatar Apr 23 '25 13:04 github-actions[bot]

So, this is annoying. I noticed some snapshot tests were failing, and after updating them, now they're failing on CI. But looking at the differences, there really aren't any. Not sure what to do here.

jprochazk avatar Apr 23 '25 14:04 jprochazk

Have you checked the diff images that were changed on ci?

Yes. There is some difference between how it renders on my machine and CI. Is there a chance that it's different llvmpipe versions, or maybe it isn't software rendering on my end?

jprochazk avatar Apr 29 '25 08:04 jprochazk

No change that I'm aware of, no But yeah we don't do software rendering on dev machines right now since the setup is a bit tedious/invasive and depends on platform circumstances

I'll have a poke later today!

Wumpf avatar Apr 29 '25 09:04 Wumpf

Emil is right that we should also add this to the video visualizer just the same! Please do so before merging, thx!

It looks like video doesn't support Opacity. At a glance it seems like it could, but it feels out of scope for this PR

jprochazk avatar Apr 29 '25 12:04 jprochazk

Opened an issue for that and linked it in a comment:

  • https://github.com/rerun-io/rerun/issues/9832

jprochazk avatar Apr 29 '25 12:04 jprochazk

Decided to revert the snapshot to what's on CI for the time being

jprochazk avatar Apr 29 '25 13:04 jprochazk

which is proving to be a mistake, because now I'll have to wait for CI to report all the sequential failures one by one...

jprochazk avatar Apr 29 '25 14:04 jprochazk

Opened an issue for that and linked it in a comment:

* [Support `Opacity` for `VideoFrameReference` #9832](https://github.com/rerun-io/rerun/issues/9832)

thanks!

Wumpf avatar Apr 29 '25 15:04 Wumpf

don't merge this yet, i left some ~~temporary~~ code in tests so i could get more failures in parallel

(it was supposed to be temporary, but i think it's fine to leave it in)

jprochazk avatar Apr 29 '25 15:04 jprochazk

Latest documentation preview deployed successfully.

Result Commit Link
6afd7bb4419d8070bc013c7217dbce17013e1679 https://landing-3yv2m9m2w-rerun.vercel.app/docs

Note: This comment is updated whenever you push a commit.

github-actions[bot] avatar Apr 29 '25 15:04 github-actions[bot]

~~It seems like what you pushed in b914586 didn't fix the failures :thinking:~~

(my fault, forgot to invert the condition)

jprochazk avatar Apr 29 '25 15:04 jprochazk