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

Varying opacity / transparency for spatial primitives #1611

Open
roym899 opened this issue Mar 18, 2023 · 11 comments
Open

Varying opacity / transparency for spatial primitives #1611

roym899 opened this issue Mar 18, 2023 · 11 comments
Labels
🔺 re_renderer affects re_renderer itself 📺 re_viewer affects re_viewer itself user-request This is a pressing issue for one of our users

Comments

@roym899
Copy link
Collaborator

roym899 commented Mar 18, 2023

Is your feature request related to a problem? Please describe.
Varying opacity can be useful to visualize overlapping or occluded data.

Seems like most primitives support RGBA arguments, however the alpha channel was ignored for the one I tested (rr.log_line_segments) or didn't correspond to opacity (rr.log_mesh).

Describe the solution you'd like
Would be great if all primitives (including 3D primitives) support some form of transparency / alpha compositing.

@roym899 roym899 added enhancement New feature or request 👀 needs triage This issue needs to be triaged by the Rerun team labels Mar 18, 2023
@Wumpf
Copy link
Member

Wumpf commented Mar 19, 2023

Partially blocked by #702 - in planning this week we decided to get in some more transparency without order independence. I.e. we'll move forward to supporting it, but visual bugs will be expected when several transparent surfaces overlap on screen.

@Wumpf Wumpf added 🔺 re_renderer affects re_renderer itself 📺 re_viewer affects re_viewer itself and removed enhancement New feature or request 👀 needs triage This issue needs to be triaged by the Rerun team labels Mar 19, 2023
@shabbirmarzban
Copy link

Hi there, what is the current status (of this feature)? I particularly would like to use it for meshes, thanks.

@Wumpf
Copy link
Member

Wumpf commented Oct 7, 2023

@shabbirmarzban no progress and no eta so far sadly. But curious to hear what you're looking for exactly - e.g. if you'd get transparency for meshes how do you want to control it? (uniformly/per-vertex/via-texture, data via custom mesh or mesh format or set via viewer etc.)

@julianschoep
Copy link

From a user perspective, for me the most straight-forward would be to have an opacity slider next to the entity visibility toggle, so entity-level control in the UI. Even if it's not ordered correctly it will add a lot of value for us.

@Ipuch
Copy link
Contributor

Ipuch commented Apr 4, 2024

I have interest for this feature too

@nshankar
Copy link

nshankar commented Apr 8, 2024

I also have interest in transparency. Are there any examples of how to correctly render 3D points with RGBA values? Here is a minimal example where the transparent point is rendered as opaque, do I need to pass something alongside the RGBA value?

import rerun as rr
from numpy.random import default_rng

rr.init("rerun_example_points3d_random", spawn=True)
rng = default_rng(12345)

positions = rng.uniform(-5, 5, size=[10, 3])
colors = rng.uniform(0, 255, size=[10, 3])
radii = rng.uniform(0, 1, size=[10])

rr.log(
    "transparent",
    rr.Points3D(positions=[(0, 0, 0)], colors=[(0.5, 0.5, 0.5, 0.1)], radii=1),
)
rr.log("random", rr.Points3D(positions, colors=colors, radii=radii))

image

@abey79 abey79 added the user-request This is a pressing issue for one of our users label Apr 9, 2024
@Wumpf
Copy link
Member

Wumpf commented Apr 9, 2024

@nshankar this issue is about transparency not being available, i.e. you can't achieve this yet from api code

@georgematheos
Copy link

Hi, I just wanted to upvote this again.

In an application my team is working on, the ability to visualize meshes with different opacities is quite important. (It is important enough that we are thinking of introducing meshcat visualizations in a codebase otherwise using the rerun visualizer, so we can produce visualizations like this.) Having support for making such visualizations in rerun would be great!

In case helpful, here are a few more details about the desiderata we are encountering --

  • A sufficient MVP for our application is if each mesh could be marked with an alpha value, to set the opacity of the whole mesh.
  • If it were possible to have each triangle in the mesh have its own independent opacity, that would be even better.
  • It is necessary for our application that the opacity values can be set programmatically (as the alpha values we want in the visualizations are computed via numerical calculations).

Thanks!

@Wumpf Wumpf mentioned this issue Aug 15, 2024
@PeterMitrano
Copy link

Also interested in this, specifically for LineStrips3D. I'm testing with 0.18.0 and it still seems to not work (just turns black instead of transparent)

@dojoscan
Copy link

dojoscan commented Oct 8, 2024

Hi, I just wanted to upvote this again.

In an application my team is working on, the ability to visualize meshes with different opacities is quite important. (It is important enough that we are thinking of introducing meshcat visualizations in a codebase otherwise using the rerun visualizer, so we can produce visualizations like this.) Having support for making such visualizations in rerun would be great!

In case helpful, here are a few more details about the desiderata we are encountering --

  • A sufficient MVP for our application is if each mesh could be marked with an alpha value, to set the opacity of the whole mesh.
  • If it were possible to have each triangle in the mesh have its own independent opacity, that would be even better.
  • It is necessary for our application that the opacity values can be set programmatically (as the alpha values we want in the visualizations are computed via numerical calculations).

Thanks!

My team have an application with the very similar requirements. Would be great to have this feature!

@emilk emilk changed the title Varying opacity for spatial primitives Varying opacity / transparency for spatial primitives Oct 8, 2024
@leonmkim
Copy link

leonmkim commented Dec 3, 2024

Just want to echo everyone above in their interest in this feature. I work in robotics and would like to visualize planned trajectories. Using a sequence of coordinate axes is ok, but a trajectory of object meshes/primitives with decaying opacity through the trajectory would be much more useful and is a common approach. A uniform opacity per mesh would be totally sufficient. For an example, see meshcat video courtesy of Will Yang.

Any partial support would be great (e.g. only support native rerun primitives as a first step). Lack of opacity support is a bit of a dealbreaker for many CV/robotics applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔺 re_renderer affects re_renderer itself 📺 re_viewer affects re_viewer itself user-request This is a pressing issue for one of our users
Projects
None yet
Development

No branches or pull requests