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

Transform is not visible in same scope level #8440

Open
Famok opened this issue Dec 12, 2024 · 1 comment
Open

Transform is not visible in same scope level #8440

Famok opened this issue Dec 12, 2024 · 1 comment
Assignees
Labels
🪳 bug Something isn't working 📖 documentation Improvements or additions to documentation

Comments

@Famok
Copy link

Famok commented Dec 12, 2024

Describe the bug
When adding a Transform3D to the same entity_path of a Spatial2DView as e.g. an arrow the transformation is not visible when displaying the same "Space origin".

To Reproduce

import rerun as rr
import rerun.blueprint as rrb

rr.init("test", recording_id="test", spawn=True)

rr.log(
    "some/path",
    entity=rr.Transform3D(
        rotation=rr.RotationAxisAngle(axis=[0, 0, 1], angle=rr.Angle(deg=45)),
    ),
    static=True,
    timeless=True,
)
rr.log(
    "some/path",
    rr.Arrows2D(
        origins=[[0.0, 0.0], [0.0, 0.0], [0, -0]],
        vectors=[[1.0, 0.0], [0.0, -1.0], [-0.7, 0.7]],
        colors=[[255, 0, 0], [0, 255, 0], [127, 0, 255]],
        labels=["right", "up", "left-down"],
        radii=0.025,
    ),
)


my_blueprint = rrb.Blueprint(
    rrb.Horizontal(
        rrb.Vertical(

            rrb.Spatial2DView(
                name="no transform",
                origin="some/path",
            ),
            rrb.Spatial2DView(
                name="transform",
                origin="some",
            ),

        ),
    ))

rr.send_blueprint(my_blueprint, make_active=True, make_default=True)

Expected behavior
When setting the "Space origin" to "some/path" I expect to get everything from that path, including the transform. Maybe I just misunderstand how this works, but I found this very(!) unintuitive.

Screenshots
Sorry, upload is blocked for me ... just use my script, it should be apparent.

Rerun version
rerun-cli 0.20.3 (default map_view nasm native_viewer release web_viewer) [rustc 1.79.0 (129f3b996 2024-06-10), LLVM 18.1.7] x86_64-pc-windows-msvc release-0.20.3 7a031f3, built 2024-12-03T17:46:47Z
Video features: av1 default ffmpeg nasm serde

@Famok Famok added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Dec 12, 2024
@Wumpf Wumpf self-assigned this Dec 13, 2024
@Wumpf
Copy link
Member

Wumpf commented Dec 13, 2024

I get this on 0.20 (and on main as of writing) when running the script as is:
Image

The reason the no transform is not rotated is because setting the space origin means that the view takes over the exact coordinates at that entity path. E.g. if this was a camera zipping through 3D scene it would look like the camera is still at the origin and everything else is moving. I.e. it is the "point of view" of a spatial scene.

That's for instance how the reprojections in the arkitscenes example work - the image/camera is still but the projections move over the screen because the 2d view took the point of view at the camera by setting the camera as the origin.

So it's a bit of a "feature not a bug" situation but I can see how this might be non-intuitive. Any ideas how we could improve this?


Sidenotes on 3D transforms in 2D:

The fact that 3d transforms affect 2d views in the first place is arguably a bug on its own, but since we still haven't introduced 2d transforms I'd rather not break that now (and would probably have a deprecation warning for at least one version before letting them have no effect at all 🤔)

The transform 3d's arrow visualization doesn't show & can't be enabled because that is generally not visualized in 2d views (also heuristically off because there's something else on the path).

@Wumpf Wumpf added 📖 documentation Improvements or additions to documentation and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 📖 documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants