Skip to content

Allow for custom visualizer with custom shader that integrates into existing view #9820

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

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Apr 28, 2025

Related

  • Extensibility tracking issue #3087
    • puts "Modify Views" to "level 1.8" - depends a bit on the view how much can be extended since views have a bit different approaches to how they draw things

What

Previously, it was already possible to add fully custom views to the Viewer. However, it was pretty much impossible to add a visualizer to an existing View, e.g. to add a new kind of visualization to the 3D view. This PR enables exactly that!

Most of this PR is an example demonstrating such a custom visualizer extending the 3D view with a new visualization. However, there's plenty of fixes and function/struct/trait exports that had to happen to make this possible!

DRAFT TODO:

  • split out general improvements that also apply to custom views into a separate PR?
  • visualize something interesting
  • make custom visualizer pickable
  • give custom visualizer outlines
  • write readme for the new example
  • add to viewer customization doc page (can be short for starters)

Known limitations:

  • this is mostly useful for 2D, 3D and Map Views: on other view types, custom visualizers won't be able to affect what is shown since this is all happening in the view's ui method
    • can we make all views at least overlay with re_renderer draw data like we do on the map view?
  • most of the newly exposed interfaces are not considered stable
  • there may be still functionality of re_renderer that isn't exposed that should be

@Wumpf Wumpf added enhancement New feature or request 📺 re_viewer affects re_viewer itself labels Apr 28, 2025
@Wumpf Wumpf self-assigned this Apr 28, 2025
Copy link

github-actions bot commented Apr 28, 2025

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

  • I have tested the web viewer
Result Commit Link Manifest
f188c23 https://rerun.io/viewer/pr/9820 +nightly +main

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

Copy link

github-actions bot commented Apr 28, 2025

Latest documentation preview deployed successfully.

Result Commit Link
f188c23 https://landing-be3u9gnsy-rerun.vercel.app/docs

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

@Wumpf Wumpf force-pushed the andreas/custom-visualizer branch 2 times, most recently from a578e3d to ace639f Compare April 28, 2025 12:51
@Wumpf Wumpf added the 🦀 Rust API Rust logging API label Apr 28, 2025
@Wumpf Wumpf force-pushed the andreas/custom-visualizer branch from ace639f to 88e726f Compare April 28, 2025 20:21
@Wumpf Wumpf changed the base branch from main to andreas/improved-custom-viewer-imports April 28, 2025 20:22
@Wumpf Wumpf force-pushed the andreas/custom-visualizer branch from 88e726f to 5491623 Compare April 28, 2025 20:23
Base automatically changed from andreas/improved-custom-viewer-imports to main April 29, 2025 09:30
@Wumpf Wumpf mentioned this pull request May 26, 2025
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 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant