-
Notifications
You must be signed in to change notification settings - Fork 373
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
Show meshes and images with rerun foo.obj bar.png
#2060
Conversation
ce14280
to
62fe8d5
Compare
rerun mesh.glb
rerun file
rerun file
rerun foo.obj bar.png
a0705c5
to
0e05194
Compare
0e05194
to
5c6de58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see this coming alive.
I find it a bit weird that one cannot load both a file and an HTTP resource at the same time, especially since the HTTP link will be treated as a path which will result in something along the lines of Failed to load "https://app.rerun.io/data/colmap_fiat.rrd": Failed to open file
.
More importantly, I only see downsides to using MsgSender
here: the feature doesn't seem to rely on sending messages at all, it just needs to crafts rows of data.
Implementing this directly as an extension to DataRow
will make it reusable by others and remove the dependency on re_sdk
.
Co-authored-by: Clement Rey <[email protected]>
Yeah, I agree it is a bit weird, but implementing this balloons the PR from "Support loading files" to also include things like "Support hosting multiple web viewers at once, all connected to different web socket addresses, while also showing a viewer which loads two different .rrd files at once" etc etc. Hence I am leaning towards leaving that as a ticket: I will make sure to improve the error message though, and add TODO:s to the code |
Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Trying to load a non-existing file path results in the websocket path being taken, which might be very confusing to end users not familiar with what's going on internally:
[2023-05-16T07:31:23Z INFO re_viewer::remote_viewer_app] Connecting to WS server at "ws:///home/cmc/Downloads/i_dont_exist.png"…
[2023-05-16T07:31:23Z INFO re_ws_comms::client] Connecting to "ws:///home/cmc/Downloads/i_dont_exist.png"…
[2023-05-16T07:31:23Z ERROR re_ws_comms::client] Connection error: HTTP format error: invalid format
let cell = DataCell::from_file_path(file_path)?; | ||
Ok(Self { | ||
num_instances: Some(cell.num_instances()), | ||
instanced: vec![cell], | ||
..Self::new(ent_path) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Not sure how to fix that easily. It can be really hard to tell a file path from a websocket address. Is We can add heuristics, like "ends with .png, jpg, …"… I'll do something |
Just pointing it out, don't think we necessarily have to fix today. Maybe the easiest way for now is to add some explanation as to what's going on in the error message when everything else failed ("hey we tried opening 'xxx' as X, Y and Z and none of them worked"). |
What
I was investigating a performance issue when loading
.glb
files and wanted a simple way to test this. So now you can runrerun foo.obj
to quickly show aglb
,gltf
,obj
,jpeg
, orpng
file. Other image file types will also work if you enable their features in theimage
crate. You can also load multiple files at once, e.g.rerun *.rrd
.Checklist
PR Build Summary: https://build.rerun.io/pr/2060