Skip to content

Commit

Permalink
Doc page improvements for instancing & video (rerun-io#7778)
Browse files Browse the repository at this point in the history
### What

* more cross linking
* recycle instancing example
* general advice on picking browser compatible video formats 

### 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 examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7778?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/7778?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)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7778)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
  • Loading branch information
Wumpf and emilk authored Oct 16, 2024
1 parent d311acd commit f4efb80
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ namespace rerun.archetypes;
/// If both [archetypes.InstancePoses3D] and [archetypes.Transform3D] are present,
/// first the tree propagating [archetypes.Transform3D] is applied, then [archetypes.InstancePoses3D].
///
/// Currently, many visualizers support only a single instance transform per entity.
/// Check archetype documentations for details - if not otherwise specified, only the first instance transform is applied.
///
/// From the point of view of the entity's coordinate system,
/// all components are applied in the inverse order they are listed here.
/// E.g. if both a translation and a max3x3 transform are present,
/// the 3x3 matrix is applied first, followed by the translation.
///
/// Currently, many visualizers support only a single instance transform per entity.
/// Check archetype documentations for details - if not otherwise specified, only the first instance transform is applied.
/// Some visualizers like the mesh visualizer used for [`archetype.Mesh3D`],
/// will draw an object for every pose, a behavior also known as "instancing".
///
/// \example archetypes/instance_poses3d_combined title="Regular & instance transforms in tandem" image="https://static.rerun.io/leaf_transform3d/41674f0082d6de489f8a1cd1583f60f6b5820ddf/1200w.png"
/// \example archetypes/mesh3d_instancing !api title="3D mesh with instancing" image="https://static.rerun.io/mesh3d_leaf_transforms3d/c2d0ee033129da53168f5705625a9b033f3a3d61/1200w.png"
table InstancePoses3D (
"attr.docs.category": "Spatial 3D",
"attr.docs.view_types": "Spatial3DView, Spatial2DView: if logged above active projection",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ namespace rerun.archetypes;
/// This means that if you first log a transform with only a translation, and then log one with only a rotation,
/// it will be resolved to a transform with only a rotation.
///
/// For transforms that affect only a single entity and do not propagate along the entity tree refer to [archetypes.InstancePoses3D].
///
/// \example archetypes/transform3d_simple title="Variety of 3D transforms" image="https://static.rerun.io/transform3d_simple/141368b07360ce3fcb1553079258ae3f42bdb9ac/1200w.png"
/// \example archetypes/transform3d_hierarchy title="Transform hierarchy" image="https://static.rerun.io/transform_hierarchy/cb7be7a5a31fcb2efc02ba38e434849248f87554/1200w.png"
table Transform3D (
Expand Down
8 changes: 5 additions & 3 deletions crates/store/re_types/src/archetypes/instance_poses3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/store/re_types/src/archetypes/transform3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 18 additions & 4 deletions docs/content/reference/types/archetypes/instance_poses3d.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/content/reference/types/archetypes/transform3d.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 13 additions & 9 deletions docs/content/reference/video.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ It is implemented by all modern browsers, but with varying levels of support for

With that in mind, here are the browsers which we have tested and verified to generally work:

| | Linux | macOS | Windows |
| ---------- | ------ | ----- | ------- |
| Firefox |[^1] |||
| Chrome[^2] |||[^3] |
| Safari | || |
| | Linux | macOS | Windows |
| ---------- | ----- | ----- | ------- |
| Firefox |[^1] | | |
| Chrome[^2] || |[^3] |
| Safari | | | |

[^1]: Firefox on Linux has been observed to [stutter when playing back H.264 video](https://github.com/rerun-io/rerun/issues/7532).
[^2]: Any Chromium-based browser should work, but we don't test all of them.
Expand All @@ -75,15 +75,19 @@ At the moment, we test the following codecs:

| | Linux Firefox | Linux Chrome | macOS Firefox | macOS Chrome | macOS Safari | Windows Firefox | Windows Chrome |
| ---------- | ------------- | ------------ | ------------- | ------------ | ------------ | --------------- | -------------- |
| AV1 ||||| 🚧[^4] |||
| H.264/avc ||||||||
| H.265/hevc ||||| 🚧[^6] || 🚧[^7] |
| AV1 | | | | | 🚧[^4] || |
| H.264/avc | | | | ||| |
| H.265/hevc | | | | | 🚧[^6] || 🚧[^7] |

[^4]: Safari/WebKit does not support AV1 decoding except on [Apple Silicon devices with hardware support](https://webkit.org/blog/14445/webkit-features-in-safari-17-0/).
[^5]: Firefox does not support H.265 decoding on any platform.
[^6]: Safari/WebKit has been observed suttering when playing `hvc1` but working fine with `hevc1`. Despite support being advertised Safari 16.5 has been observed not support H.265 decoding.
[^7]: Only supported if hardware encoding is available. Therefore always affected by Windows stuttering issues, see [^3].
[^7]: Only supported if hardware encoding is available. Therefore always affected by Windows stuttering issues, see above.

Beyond this, for best compatibility we recommend:
* prefer YUV over RGB & monochrome formats
* don't use more than 8bit per color channel
* keep resolutions at 8k & lower (see also [#3782](https://github.com/rerun-io/rerun/issues/3782))

## Links
* [Web video codec guide, by Mozilla](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs)
8 changes: 5 additions & 3 deletions rerun_cpp/src/rerun/archetypes/instance_poses3d.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions rerun_cpp/src/rerun/archetypes/transform3d.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions rerun_py/rerun_sdk/rerun/archetypes/instance_poses3d.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions rerun_py/rerun_sdk/rerun/archetypes/transform3d.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f4efb80

Please sign in to comment.