Opening files
The Rerun Viewer and SDK have built-in support for opening many kinds of files, and can be extended to support any other file type without needing to modify the Rerun codebase itself.
The Viewer can load files in 3 different ways:
- via CLI arguments (e.g.
rerun myfile.jpeg
), - using drag-and-drop,
- using the open dialog in the Rerun Viewer.
All these file loading methods support loading a single file, many files at once (e.g. rerun myfiles/*
), or even folders.
ā Drag-and-drop of folders does not yet work on the web version of the Rerun Viewer ā
The following file types have built-in support in the Rerun Viewer and SDK:
- Native Rerun files:
rrd
- 3D models:
gltf
,glb
,obj
,stl
- Images:
avif
,bmp
,dds
,exr
,farbfeld
,ff
,gif
,hdr
,ico
,jpeg
,jpg
,pam
,pbm
,pgm
,png
,ppm
,tga
,tif
,tiff
,webp
. - Point clouds:
ply
. - Text files:
md
,txt
.
With the exception of rrd
files that can be streamed from an HTTP URL (e.g. rerun https://demo.rerun.io/version/latest/examples/dna/data.rrd
), we only support loading files from the local filesystem for now, with plans to make this generic over any URI and protocol in the future.
Logging file contents from the SDK logging-file-contents-from-the-sdk
To log the contents of a file from the SDK you can use the log_file_from_path
and log_file_from_contents
methods (C++, Python, Rust) and the associated examples (C++, Python, Rust).
Note: when calling these APIs from the SDK, the data will be loaded by the process running the SDK, not the Viewer!
import sys
import rerun as rr
rr.init("rerun_example_log_file", spawn=True)
rr.log_file_from_path(sys.argv[1])