Skip to content

Replace OutOfTreeTransform3D (encapsulating full transform) with OutOfTreeTransform (a bool component)#6988

Closed
Wumpf wants to merge 14 commits intomainfrom
andreas/outoftreetransform-component
Closed

Replace OutOfTreeTransform3D (encapsulating full transform) with OutOfTreeTransform (a bool component)#6988
Wumpf wants to merge 14 commits intomainfrom
andreas/outoftreetransform-component

Conversation

@Wumpf
Copy link
Copy Markdown
Member

@Wumpf Wumpf commented Jul 25, 2024

What

Pulling this off nicely and with more out of tree transforms in mind required significant changes to the transform_context. The resulting testing caught some previously introduced bugs (to my knowledge this PR sets all things transforms right again!)
(github may minimize this diff, don't be fooled all the meaty things are in there!)
Also, I tried making the confusing things about 2d transforms easy to identify and more forward looking.

So far out of tree transform 3D was only used in asset 3d, follow-up prs will expand here and remove previous implicit out-of-tree transform behavior we had in other places.

Migration guide regarding transform is now mostly finished, there will be some additional notes on soft-deprecated components that will follow on Box3D and maybe others.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 25, 2024

Deployed docs

Commit Link
68a0e0a https://landing-9g7uuksby-rerun.vercel.app/docs

@Wumpf Wumpf added 🍏 primitives Relating to Rerun primitives 🪵 Log & send APIs Affects the user-facing API for all languages labels Jul 25, 2024
@Wumpf
Copy link
Copy Markdown
Member Author

Wumpf commented Jul 30, 2024

we decided to do this differently. Learnings all went into #7015

@Wumpf Wumpf closed this Jul 30, 2024
Wumpf added a commit that referenced this pull request Jul 31, 2024
### What

* Part of #6831
* Replacement for #6988

Introduces a new `LeafTransform3D` archetype that is always applicable.
It entails a copy of all of `Transform3D`'s components - axis length and
transform relation have been omitted so far.

Surprisingly, I didn't have much need for the extensive extensions we
have on `Transform3D` so far: Leaf transform is much less commonly used
and deals with arrays, making it sufficiently different from
`Transform3D`. Also a lot of the extensions associated with
`Transform3D` are there for legacy reasons - with the new more
componetized interface we get much more reasonable ergonomics out of the
box!

This PR entails a major overhaul of the `TransformContext`. For *sure*
not the last time we do this (looking at you 2D transform handling &
not-so-great 2D<->3D interactions!), but the intention is to be a bit
more forward looking and to enforce use of leaf transforms everywhere.

Single component leaf transforms are supported everywhere now. Multi
component leaf transforms logs a warning for all visualizers except
Mesh3D and Asset3D where it bottoms out in instantiating the mesh
multiple times:


https://github.com/user-attachments/assets/62d26661-cd8c-4b4a-b912-063ef60e063a

Snippet demonstrating combination of `Transform3D` with
`LeafTransforms3D`:


https://github.com/user-attachments/assets/ebb2ce5b-6d9a-407d-9f21-57b92f4ac25c

Follow-up PRs will improve the interaction of various archetypes with
`LeafTransforms3D` as well as remove now unused legacy types.


### Checklist
* [x] run main ci to ensure that roundtrip & snippet tests are passing
* [x] check transform checklist again!
* [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/7015?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/7015?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/7015)
- [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`.
@Wumpf Wumpf deleted the andreas/outoftreetransform-component branch August 9, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

include in changelog 🪵 Log & send APIs Affects the user-facing API for all languages 🍏 primitives Relating to Rerun primitives

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant