forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize getting-started and blueprint tutorials (rerun-io#5762)
### What Strips out some gratuitous hierarchy. Moves the blueprint guides into getting-started. ### 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: [rerun.io/viewer](https://rerun.io/viewer/pr/5762) * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/5762?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/5762?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/5762) - [Docs preview](https://rerun.io/preview/214057272e4b01359946488cd8227e689e94fd70/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/214057272e4b01359946488cd8227e689e94fd70/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) --------- Co-authored-by: Antoine Beyeler <[email protected]>
- Loading branch information
Showing
22 changed files
with
754 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
title: Blueprint | ||
order: 9 | ||
--- | ||
|
||
## Blueprints and Recordings | ||
|
||
When you are working with the Rerun viewer, there are two separate pieces that | ||
combine to produce what you see: the "recording" and the "blueprint." | ||
|
||
- The recording provides the actual data you are visualizing. | ||
- The blueprint is the configuration that determines how the data from the | ||
recording is displayed. | ||
|
||
Both of these pieces are crucial -- without the recording there is nothing to | ||
show, and without the blueprint there is no way to show it. Even if you have | ||
used Rerun before without explicitly loading a blueprint, the viewer was | ||
actually creating one for you. Without a blueprint, there is literally nothing | ||
for the viewer to display. | ||
|
||
## Loose coupling | ||
|
||
The blueprint and the recording are only loosely coupled. Rerun uses the | ||
"application ID" to determine whether a blueprint and a recording should be used | ||
together, but they are not directly linked beyond that. | ||
|
||
This means that either can be changed independently of the other. Keeping the | ||
blueprint constant while changing the recording will allow you to compare | ||
different datasets using a consistent set of views. On the other hand, changing | ||
the blueprint while keeping a recording constant will allow you to view the same | ||
data in different ways. | ||
|
||
## What the blueprint controls | ||
|
||
Every aspect of what the viewer displays is controlled by the blueprint. This | ||
includes the type and content of the different views, the organization and | ||
layout of the different containers, and the configuration and styling properties | ||
of the individual data visualizers. | ||
|
||
In general, if you can modify an aspect of how something looks through the | ||
viewer, you are actually modifying the blueprint. (Note that while there may be | ||
some exceptions to this rule at the moment, the intent is to eventually migrate | ||
all state to the blueprint.) | ||
|
||
## What is a blueprint | ||
|
||
Under the hood, the blueprint is just data. It is represented by a | ||
[time-series ECS](./entity-component.md), just like a recording. The only | ||
difference is that it uses a specific set of blueprint archetypes and a special | ||
blueprint timeline. Note that even though the blueprint may be sent over the | ||
same connection, blueprint data is kept in an isolated store and is not mixed | ||
together with your recording data. | ||
|
||
Although the Rerun APIs for working with blueprint may look different from the | ||
regular logging APIs, they are really just syntactic sugar for logging a | ||
collection of blueprint-specific archetypes to a separate blueprint stream. | ||
|
||
Furthermore, when you make any change to the viewer in the UI, what is actually | ||
happening is the viewer is creating a new blueprint event and adding it to the | ||
end of the blueprint timeline in the blueprint store. | ||
|
||
## Viewer operation | ||
|
||
Outside of caching that exists primarily for performance reasons, the viewer | ||
persists very little state frame-to-frame. The goal is for the output of the | ||
viewer to be a deterministic function of the blueprint and the recording. | ||
|
||
Every frame, the viewer starts with a minimal context of an "active" blueprint, | ||
and an "active" recording. The viewer then uses the current revision on the | ||
blueprint timeline to query the container and space-view archetypes from the | ||
blueprint store. The space-view archetypes, in turn, specify the paths types | ||
that need to be queried from the recording store in order to render the views. | ||
|
||
Any user interactions that modify the blueprint are queued and written back to | ||
the blueprint using the next revision on the blueprint timeline. | ||
|
||
## Blueprint architecture motivation | ||
|
||
Although this architecture adds some complexity and indirection, the fact that | ||
the viewer stores all of its meaningful frame-to-frame state in a structured | ||
blueprint data-store has several advantages: | ||
|
||
- Anything you modify in the viewer can be saved and shared as a blueprint. | ||
- A blueprint can be produced programmatically using just the Rerun SDK without | ||
a dependency on the viewer libraries. | ||
- The blueprint is capable of representing any data that a recording can | ||
represent. This means in the future, blueprint-sourced data overrides will | ||
be just as expressive as any logged data. | ||
- The blueprint is actually stored as a full time-series, simplifying future | ||
implementations of things like snapshots and undo/redo mechanisms. | ||
- Debugging tools for inspecting generic Rerun data can be used to inspect | ||
internal blueprint state. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
158 changes: 158 additions & 0 deletions
158
docs/content/getting-started/configure-the-viewer/interactively.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
--- | ||
title: Configure the viewer interactively | ||
order: 1 | ||
--- | ||
|
||
The Rerun Viewer is configurable directly through the UI itself. | ||
|
||
## Viewer overview | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/overview/158a13691fe0364ed5d4dc420f5b2c39b60705cd/full.png" alt=""> | ||
<source media="(max-width: 480px)" srcset="https://static.rerun.io/overview/158a13691fe0364ed5d4dc420f5b2c39b60705cd/480w.png"> | ||
<source media="(max-width: 768px)" srcset="https://static.rerun.io/overview/158a13691fe0364ed5d4dc420f5b2c39b60705cd/768w.png"> | ||
<source media="(max-width: 1024px)" srcset="https://static.rerun.io/overview/158a13691fe0364ed5d4dc420f5b2c39b60705cd/1024w.png"> | ||
<source media="(max-width: 1200px)" srcset="https://static.rerun.io/overview/158a13691fe0364ed5d4dc420f5b2c39b60705cd/1200w.png"> | ||
</picture> | ||
|
||
|
||
The central part is known as the viewport and contains the various views displaying the data. | ||
|
||
The left panel of the viewer is the "Blueprint Panel". It shows a visual tree view representing | ||
the contents of the current blueprint. | ||
|
||
The right panel of the viewer is the "Selection Panel" this panel allows you to configure | ||
specific blueprint properties of the currently selected element. | ||
|
||
The blueprint defines the structure, the type of views, and their content in the viewport. Changing the content of the viewport is done by editing the blueprint. | ||
|
||
After editing the viewer you may want to [save or share the blueprint](./save-and-load.md). | ||
|
||
## Configuring the view hierarchy | ||
|
||
The viewport is made of various views, laid out hierarchically with nested containers of various kinds: vertical, horizontal, grid, and tabs. This hierarchy is represented in the blueprint panel, with the top container corresponding to the viewport. In this section, we cover the various ways this view hierarchy can be interactively created and modified. | ||
|
||
### Show or hide parts of the blueprint | ||
|
||
Any container or view can be hidden or shown by clicking the "eye" icon. | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/show_hide_btn/bbca385d4898ec220bfb91c430ea52d59553913e/full.png" alt=""> | ||
</picture> | ||
|
||
|
||
### Add new Containers or Views | ||
|
||
Adding a container or a view to the view port can be done by clicking the "+" at the top of the blueprint panel. | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/add_view/3933d7096846594304ddec2d51dda9c434d763bf/full.png" alt=""> | ||
</picture> | ||
|
||
|
||
If a container (or the viewport) is already selected, a "+" button will also be available in the selection panel. | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/add_view_selection_panel/e3355e61a8ec8f2e7860968f91032f7f7bf6ab6e/full.png" alt=""> | ||
<source media="(max-width: 480px)" srcset="https://static.rerun.io/add_view_selection_panel/e3355e61a8ec8f2e7860968f91032f7f7bf6ab6e/480w.png"> | ||
</picture> | ||
|
||
|
||
### Remove a View or Container | ||
|
||
Removing a view or a container can be done by clicking the "-" button next to it: | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/remove/6b9d97e4297738b8aad89158e4d15420be362b4a/full.png" alt=""> | ||
</picture> | ||
|
||
|
||
### Re-arrange existing Containers or Views | ||
|
||
The viewport hierarchy can be reorganized by drag-and-dropping containers or views in the blueprint panel. It ssi also possible to drag views directly in the viewport by using their title tab: | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/drag_and_drop_viewport/8521fda375a2f6af15628b04ead4ba848cb8bc27/full.png" alt=""> | ||
<source media="(max-width: 480px)" srcset="https://static.rerun.io/drag_and_drop_viewport/8521fda375a2f6af15628b04ead4ba848cb8bc27/480w.png"> | ||
</picture> | ||
|
||
|
||
### Rename a View or Container | ||
|
||
Both views and containers may be assigned a custom name. This can be done by selecting the view or container, and editing the name at the top of the selection panel. | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/rename/94be9e29a0120fbab1a7c07a8952f2cba4dcea68/full.png" alt=""> | ||
</picture> | ||
|
||
### Change a Container kind | ||
|
||
Containers come in four different kinds: vertical, horizontal, grid, and tabs. To change an existing container's kind, select it and change the value from the dropdown menu in the selection panel: | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/container_kind/44fea90f2b3e5a699549c204948f677fc95e2157/full.png" alt=""> | ||
<source media="(max-width: 480px)" srcset="https://static.rerun.io/container_kind/44fea90f2b3e5a699549c204948f677fc95e2157/480w.png"> | ||
</picture> | ||
|
||
|
||
### Using context menus | ||
|
||
The context menu is accessed by right-clicking on a container or view in the blueprint panel. Many of the previous operations are also available there: | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/context_menu_container/e90e4688f306187d902467b452fb7146eec1bf4b/full.png" alt=""> | ||
</picture> | ||
|
||
|
||
One key advantage of using the context menu is that it enable operations on multiple items at once. For example, you may select several views (ctrl-click, or cmd-click on Mac), and remove them all in a single operation using the context menu. | ||
|
||
|
||
## Configuring the content of a view | ||
|
||
The content of a view is determined by its entity query, which can be manually edited in the selection panel when the view is selected (see [Entity Queries](../../reference/entity-queries.md) for more information). This section covers the interactive means of manipulating the view content (which typically operate by actually modifying the query). | ||
|
||
|
||
### Show or hide view content | ||
|
||
Like containers and views, any entity in a view may be shown and hidden with the "eye" icon or the context menu. | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/show_hide_entity/587a5d8fd763c0bade461bc54a66a4acdd087821/full.png" alt=""> | ||
</picture> | ||
|
||
|
||
### Remove Data from a View | ||
|
||
Likewise, entities may be removed from a view by clicking the "-" next to it: | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/remove_entity/ec0447ca7e420bc9d19a7bf015cc39f88b42598a/full.png" alt=""> | ||
</picture> | ||
|
||
|
||
### Using the query editor | ||
|
||
A visual query editor is available from the selection panel when a view is selected. Click the "Edit" button next to the entity query: | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/add_remove_entity/9b7b29b3be4816d5d42e66549d899039235b10ee/full.png" alt=""> | ||
<source media="(max-width: 480px)" srcset="https://static.rerun.io/add_remove_entity/9b7b29b3be4816d5d42e66549d899039235b10ee/480w.png"> | ||
</picture> | ||
|
||
The query editor allows visually adding and removing entities and entity trees from the query. | ||
|
||
### Adding entities to a new view with context menu | ||
|
||
Like with viewport hierarchy, most operations on view data are available from the context menu. In particular, a new view can be created with custom content by selecting one or more entities (either in existing views in the blueprint panel, or in the time panel's streams), and clicking "Add to new space view" in the context menu: | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/add_to_new_view/87f2d5ffb3ef896c82f398cd3c3d1c7321d59073/full.png" alt=""> | ||
<source media="(max-width: 480px)" srcset="https://static.rerun.io/add_to_new_view/87f2d5ffb3ef896c82f398cd3c3d1c7321d59073/480w.png"> | ||
<source media="(max-width: 768px)" srcset="https://static.rerun.io/add_to_new_view/87f2d5ffb3ef896c82f398cd3c3d1c7321d59073/768w.png"> | ||
<source media="(max-width: 1024px)" srcset="https://static.rerun.io/add_to_new_view/87f2d5ffb3ef896c82f398cd3c3d1c7321d59073/1024w.png"> | ||
</picture> | ||
|
||
When using one of the recommended views with this method, the view's origin will automatically be set to a sensible default based on the actual data. | ||
|
||
|
||
|
Oops, something went wrong.