glue-ar is a plugin for the glue visualization software which allows exporting views from glue's 3D viewers to augmented reality (AR)-compatible file formats.
Currently glue-ar supports exporting to two industry-standard 3D file formats:
glue-ar supports both the JSON/ASCII (.gltf) and binary (.glb) forms of glTF. Additionally, via the glTF Transform JavaScript package, it supports two compression methods for glTF:
glue-ar supports all three forms of USD files:
glue-ar is installable via pip:
pip install glue-ar
Installation requires Node.js to be installed on your system, as we currently use JavaScript packages for performing Draco and Meshopt glTF compression. (Having Node installed is all that you need - the npm/JS management relevant for the package is all handled by the package build process!).
Below are some examples of files generated using glue-ar. Scan the QR codes to see the figures in AR on your phone! We provide three types of interactives for most of our examples:
A rendering of the Per-Tau Shell, using isosurfaces for dust clouds
A static rendering of the Radcliffe Wave, an enormous wavelike structure in the Suns neighborhood.
A 3D model of the Moon.
A 3D model of Jupiter.
A 3D model of the Local Bubble's magnetic field together with the Gum Nebula.
A voxelized rendering of a position-position-velocity data cube for the M83 galaxy. Thanks to Eric Koch for providing this dataset.
A rendering of the Gum Nebula, with points representing the IRAS Vela Shell. The shell is colored by hydrogen density. Thanks to Annie Gao for providing this dataset.
An animated rendering of the Radcliffe Wave, showing the motion of the wave over time.
The figure that started it all! This figure, created in collaboration with Delightex, was the first AR figure to appear in a major astronomical journal.
A rendering of several different data sets of structures within the Milky Way, including the Radcliffe Wave, Local Bubble, and IRAS Vela Shell.
glue-ar can be used with both major frontends for glue: the Qt desktop application, and the glue-jupyter viewers which can be used in Jupyter notebooks.
In Qt glue, the glue-ar export tool is exposed in the toolbar as sub-tools of the "save" meta-tool, and can be accessed from its dropdown menu.
The glue Jupyter viewers don't yet support subtools, so in these viewers the glue-ar export tool is exposed at the top level of the toolbar.
glue-ar supports exporting from the following viewers:
Once you've got a view that you want to export, you can simply use the AR export tool to turn it into a 3D figure. While we try to make the export process as simple as possible, we also provide some options to allow optimizing the output file for the environment where you want to share it. For a description of these options and our user interface, see our export options guide.
A popular option for sharing 3D files in augmented reality is CoSpaces, which allows viewing 3D files on a mobile device via a dedicated app. The CoSpaces app allows viewing figures in AR on a flat surface directly, or using the Merge Cube to allow for a more tangible AR experience.
CoSpaces supports the glTF and glB formats, so it's possible to output from glue-ar and share via CoSpaces directly. It's our goal to eventually allow automatic CoSpaces upload, but for now sharing your AR figures to CoSpaces requires some manual steps (as well as a CoSpaces account).
To create a scene with your newly-exported figure, do the following: