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.24k stars 290 forks source link

Variable colors along a single line #7192

Open Famok opened 4 weeks ago

Famok commented 4 weeks ago

Describe the solution you'd like I want to display a feature f1(times, values) along a path p1(times, x, y) using a color coded line in 2D using the time so I end up with an array a1(x, y, values). To visualize that, I could use LineSegments2D with each segment having on color. But this leads to this issue, even more so since now we would have to consider multiple segments. Therefore I suggest a simple Line2D with a RGBA color vector (or single value)

Describe alternatives you've considered I could use Points2D but this is not as good.

Wumpf commented 4 weeks ago

Haven't thought it through yet, but this sounds like we need to add dedicated Lines2D/Lines3D archetype or come up with some way to model intra-line properties - colors would need to be an array of array the way things are set up right now 🤔. Separate archetype might be both nicer to use and to implement. Not sure yet!

Tagging this with re_renderer as well since the line renderer right now only understands a single color for every connected run of vertices. Not concerned that we can't tackle that, but needs some thinking of how this can be done efficiently (might be time to introduce some form of internal variant for these cases).