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

New screenshots and thumbnails for the examples #2440

Merged
merged 6 commits into from
Jun 16, 2023
Merged

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Jun 15, 2023

What

This PR updates the examples' READMEs with new screenshots and adds the thumbnail: entry to their front matter.

This uses #2411 and highlighted some bugs with it, to be fixed in a follow-up PR.

TODO:

  • deal with signed_distance_fields
  • deal with detect_and_track_objects
  • deal with ros_node

Checklist

PR Build Summary: https://build.rerun.io/pr/2440

Docs preview: https://rerun.io/preview/b2d508b/docs
Examples preview: https://rerun.io/preview/b2d508b/examples

@abey79 abey79 added examples Issues relating to the Rerun examples 📖 documentation Improvements or additions to documentation labels Jun 15, 2023
abey79 added a commit that referenced this pull request Jun 15, 2023
### What

Lessons learned from #2440

- On Mac, PIL's clipboard import compresses to JPG, which is bad =>
added a custom function to use PNG instead.
- Tuned the PIL image saving parameters to optimise for file size
- Added some pngcrush CLI parameter for optimisation
- Discard pngcrush output if it ends up bigger than output (PIL's PNG
export is pretty good in most cases it seems)

### 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)
* [ ] ~~I've included a screenshot or gif (if applicable)~~

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2449

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/8563e84/docs
Examples preview: https://rerun.io/preview/8563e84/examples
<!-- pr-link-docs:end -->
emilk pushed a commit that referenced this pull request Jun 15, 2023
### What

Lessons learned from #2440

- On Mac, PIL's clipboard import compresses to JPG, which is bad =>
added a custom function to use PNG instead.
- Tuned the PIL image saving parameters to optimise for file size
- Added some pngcrush CLI parameter for optimisation
- Discard pngcrush output if it ends up bigger than output (PIL's PNG
export is pretty good in most cases it seems)

### 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)
* [ ] ~~I've included a screenshot or gif (if applicable)~~

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2449

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/8563e84/docs
Examples preview: https://rerun.io/preview/8563e84/examples
<!-- pr-link-docs:end -->
@abey79 abey79 marked this pull request as ready for review June 15, 2023 15:51
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

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

Looks fantastic on my end for both desktop and mobile (I find it looks even better on mobile in fact).

Some random feedback, nothing blocking:

  • Navigating the examples on github now looks kinda weird with the front matter turning into a huge weirdly formatted and cropped in half table:
    image
    Can't we hide that stuff behind a comment or something?
  • I find it very hard to see what's going on in the right hand side of the colmap screenshot (is it the angle? not enough visible history?):
    image
    If I wasn't so familiar with it i'm not sure I'd have any idea what I'm looking at. Might just be me.
  • Similarly, I have a hard time making out the shape in the tensor view used in the SDF example:
    image
    Not sure whether that's due to the settings used in the view (need to tweak colormapping etc) or just the mesh itself which doesn't lend itself too well to the exercise (the lamp pole mesh makes for a way clearer demo in my experience).
  • The DICOM example could really use some color:
    image
    Maybe add a second view with a turbo map applied?

@abey79
Copy link
Member Author

abey79 commented Jun 15, 2023

  • Maybe @jprochazk can comment on the front matter stuff. It's likely only going to get worse as we add more metadata there.
  • On the car viz: that point cloud is rather messy. I tried my best but it'll just never be super nice/clear on a frozen screenshot
  • @Wumpf feeling like revisiting that SDF example?
  • Dicom: I'll take a look

@jprochazk
Copy link
Member

Yeah, I had the same concern regarding the frontmatter rendering in the initial PR (#2309). I wish GH would just hide it. But we can change it to something like

<!--[[metadata]]
title: API Demo
python: https://github.com/rerun-io/rerun/tree/latest/examples/python/api_demo/main.py
rust: https://github.com/rerun-io/rerun/tree/latest/examples/rust/api_demo/src/main.rs
thumbnail: https://static.rerun.io/d41179fb380bc6bdeda950d7d69e3c457ff295e9_api_demo_480w.png
-->

...

Another option is to move it to a different file. Either way making the required changes to landing would not be too much work

@Wumpf
Copy link
Member

Wumpf commented Jun 15, 2023

Similarly, I have a hard time making out the shape in the tensor view used in the SDF example:

oof I tried hard already to extract anything out of that is visible, switched through different color maps and found that one the most visible one
@teh-cmc to you also get that many areas of broken depth in that example? I get it on pretty much any mesh, but for the lamppole it felt worse that's why I picked that mesh instead

@teh-cmc
Copy link
Member

teh-cmc commented Jun 15, 2023

Similarly, I have a hard time making out the shape in the tensor view used in the SDF example:

oof I tried hard already to extract anything out of that is visible, switched through different color maps and found that one the most visible one @teh-cmc to you also get that many areas of broken depth in that example? I get it on pretty much any mesh, but for the lamppole it felt worse that's why I picked that mesh instead

I've never seen these artifacts before in my life actually 😄

Here's an example lamp pole with some turbo map on my end:
image

@teh-cmc
Copy link
Member

teh-cmc commented Jun 15, 2023

And the kind of silly ideas I had in mind for a more colorful DICOM:
image

@abey79
Copy link
Member Author

abey79 commented Jun 16, 2023

And the kind of silly ideas I had in mind for a more colorful DICOM:
image

That is cool! Didn't realise all those options existed.

@abey79
Copy link
Member Author

abey79 commented Jun 16, 2023

Yeah, I had the same concern regarding the frontmatter rendering in the initial PR (#2309). I wish GH would just hide it. But we can change it to something like

<!--[[metadata]]
title: API Demo
python: https://github.com/rerun-io/rerun/tree/latest/examples/python/api_demo/main.py
rust: https://github.com/rerun-io/rerun/tree/latest/examples/rust/api_demo/src/main.rs
thumbnail: https://static.rerun.io/d41179fb380bc6bdeda950d7d69e3c457ff295e9_api_demo_480w.png
-->

...

Another option is to move it to a different file. Either way making the required changes to landing would not be too much work

The sad part about this is that the front matter format is sort of standard and benefits from tooling checks, etc.

@Wumpf
Copy link
Member

Wumpf commented Jun 16, 2023

I've never seen these artifacts before in my life actually 😄

I suppose this runs into some GL bugs on Mac (or GL being GL uses some less defined cases)

@Wumpf
Copy link
Member

Wumpf commented Jun 16, 2023

@teh-cmc this is what I get for the lamppole...
image
I think the artifacts also mess up the data range, that's why mine don't look crisp

@abey79
Copy link
Member Author

abey79 commented Jun 16, 2023

Merging this. We'll improve the SDF example later on.

@abey79 abey79 merged commit 2c0ecd0 into main Jun 16, 2023
@abey79 abey79 deleted the antoine/new_screenshots branch June 16, 2023 12:52
@abey79 abey79 mentioned this pull request Jun 16, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation examples Issues relating to the Rerun examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants