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

Configurable background color for the 3D view #754

Closed
nikolausWest opened this issue Jan 13, 2023 · 6 comments · Fixed by #5443
Closed

Configurable background color for the 3D view #754

nikolausWest opened this issue Jan 13, 2023 · 6 comments · Fixed by #5443
Labels
enhancement New feature or request 📺 re_viewer affects re_viewer itself ui concerns graphical user interface user-request This is a pressing issue for one of our users

Comments

@nikolausWest
Copy link
Member

The background colors we currently use don't always make sense. It might not look good together with the data or add unnecessary visual noise.

Add options:

  • To change the colors used to produce the "skybox"
  • Se a solid color background
@nikolausWest nikolausWest added enhancement New feature or request ui concerns graphical user interface 📺 re_viewer affects re_viewer itself labels Jan 13, 2023
@Wumpf
Copy link
Member

Wumpf commented Apr 2, 2023

another example/usecase/request where this came up https://discord.com/channels/1062300748202921994/1062300748777529379/1091954545325785169

@roym899
Copy link
Collaborator

roym899 commented May 22, 2023

This is also important for making publication-ready figures. Especially solid white would be important in that case.

@Wumpf Wumpf added the user-request This is a pressing issue for one of our users label Oct 11, 2023
@nsalminen
Copy link

@nikolausWest This would be very useful! Is this feature on the roadmap?

@nikolausWest
Copy link
Member Author

nikolausWest commented Mar 1, 2024

@nsalminen, it is but not until we've enabled setting properties of views from the SDK, which means on or after the second blueprint release (i.e. at least 2 releases from now).

Could you explain a bit on why you need this?

@roym899
Copy link
Collaborator

roym899 commented Mar 1, 2024

A possible workaround is to log a large sphere without vertex normals and vertex color set to whatever background color you want. If you use Open3D this could be done like this:

# create large white sphere to serve as background
sphere = o3d.geometry.TriangleMesh.create_sphere(radius=100.0)
sphere.paint_uniform_color([1.0, 1.0, 1.0])
rr.log(
    "world/background",
    rr.Mesh3D(
        vertex_positions=sphere.vertices,
        indices=sphere.triangles,
        vertex_colors=sphere.vertex_colors,
    ),
    timeless=True,
)

@nsalminen
Copy link

Thanks a lot for the update, @nikolausWest! My reasons are similar to those mentioned by @roym899 and related issues. It would be great to be able to use rerun for visualizations in papers/presentations. While more advanced solutions for off-screen rendering would be very nice, having the option for a white background so I can take high res screenshots is a good intermediate solution.

Thank you for the clever workaround, @roym899!

Wumpf added a commit that referenced this issue Mar 12, 2024
### What

* Fixes  #754

Originally made a sort of tint/alpha color for the existing gradient,
but after some feedback I got I changed it around to be a dropdown of 3
different modes: dark gradient, bright gradient, solid color (with the
picker)
The blend version was quite confusing and admittedly not all that useful
:)



https://github.com/rerun-io/rerun/assets/1220815/2ed21cba-3abe-46f1-9ce3-317f41e576d4



### 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 newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5443/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5443/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5443/index.html?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/5443)
- [Docs
preview](https://rerun.io/preview/5088b46141a6c8823ebe8cd51e112b49c47a165d/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/5088b46141a6c8823ebe8cd51e112b49c47a165d/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 📺 re_viewer affects re_viewer itself ui concerns graphical user interface user-request This is a pressing issue for one of our users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants