Skip to main content

glue-ar

This package is an experimental plugin for glue that allows exporting augmented reality (AR) figures out of the 3D scatter and volume viewers from glue-vispy-viewers. Currently this ability is exposed via viewer tools that save a 3D file representing the current view. Currently supported file formats include glTF/glB and USD.

Installation

This package is pip-installable:

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

Viewer tools

In the Qt desktop application, the AR export tool is exposed in the toolbar as subtools of the "save" meta-tool, and can be accessed from its dropdown menu.

Qt viewer tool

In glue-jupyter, the AR export tool is a top-level toolbar tool: Jupyter viewer tool

Sharing figures

model-viewer

If glTF is selected as the output file format, an HTML file is exported in addition to the glTF. This HTML file provides a display of the exported figure using the model-viewer web component. This model-viewer page provides a THREE.js-powered glTF viewer that, on an Android or iOS device, allows viewing the glTF file using the hardware AR capability. Additionally, this exported HTML has no additional dependencies and can be served using static file hosting.

glTF compression

The files exported by glue-ar can, in their original form, be quite large. In order to mitigate this problem for glTF files, glue-ar allows using Draco compression via the gltf-pipeline package, or Meshopt via the gltfpack package. These compression methods allow for a considerable reduction in file size (often an order of magnitude or more), and files compression by both methods can be read by model-viewer.

CoSpaces

Another popular option for sharing 3D files in augmented reality is CoSpaces, which allows viewing 3D files in a browser or 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 file format, so the outputs of glue-ar can be used in CoSpaces without modification. It is our aim 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:

  1. Go to the CoSpaces website and log in to your account
  2. On the left side menu, navigate to "CoSpaces"
  3. Click the "Create CoSpace" button
  4. Select the environment you want:
    • 3D environment > Empty scene for tabletop AR
    • MERGE Cube > Empty scene to use the MERGE Cube (note that creating a MERGE Cube requires a plan addon)
  5. In the bottom left corner, select Upload > 3D models, then press the Upload button to the right
  6. Select your 3D model
    • Note that CoSpaces currently does not support the extensions needed for Draco or Meshopt compression
  7. Done!

Metadata

Release files for glue-ar 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glue-ar 0.6.0
File Size Uploaded Provenance
glue_ar-0.6.0.tar.gz 113.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for glue-ar 0.6.0
File Interpreter ABI Platform
glue_ar-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 240.2 kB

Release files / glue_ar-0.6.0.tar.gz

Download URL glue_ar-0.6.0.tar.gz
Size 113.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ac679a2140ce1c93a32a57c0a9931ac86fe76f414b9427f4465999634035d65e
BLAKE2b-256 checksum
How to use checksums
a50883b06b01b4b4ff6660e50a72f75517ab905e93c4116543e242ef6b1e77fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / glue_ar-0.6.0-py3-none-any.whl

Download URL glue_ar-0.6.0-py3-none-any.whl
Size 127.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3af08339a8ad95d3ce22cd50e0a6127e3e6c83be3fece128d17f28c97748a81a
BLAKE2b-256 checksum
How to use checksums
e9650cee5e0070b58ee299c144ee4a5d06d818a0819594cd6f7eca0e300f6ea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for glue-ar 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page