rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
6.3k stars 298 forks source link

Varying opacity for spatial primitives #1611

Open roym899 opened 1 year ago

roym899 commented 1 year ago

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.

Wumpf commented 1 year ago

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.

shabbirmarzban commented 11 months ago

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

Wumpf commented 11 months ago

@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 commented 8 months ago

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 commented 5 months ago

I have interest for this feature too

nshankar commented 5 months ago

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

Wumpf commented 5 months ago

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

georgematheos commented 4 months ago

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 --

Thanks!