No project description provided
Project description
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
The AR export tools are exposed in the toolbar as subtools of the "save" meta-tool, and can be accessed from its dropdown menu.
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:
- Go to the CoSpaces website and log in to your account
- On the left side menu, navigate to "CoSpaces"
- Click the "Create CoSpace" button
- 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)
- In the bottom left corner, select Upload > 3D models, then press the Upload button to the right
- Select your 3D model
- Note that CoSpaces currently does not support the extensions needed for Draco or Meshopt compression
- Done!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file glue_ar-0.3.0.tar.gz
.
File metadata
- Download URL: glue_ar-0.3.0.tar.gz
- Upload date:
- Size: 42.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40d7334c84cdfa8b9c47a6caa34d50a68e8dc668fe1e0240bf76cb5487ed74b0 |
|
MD5 | 99d08f734b1527199b87af4695ab8134 |
|
BLAKE2b-256 | fb8238efe887f49c604a6776a0c7d0a2c9e99fa24bf12044fb9b5ae181de5d14 |
File details
Details for the file glue_ar-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: glue_ar-0.3.0-py3-none-any.whl
- Upload date:
- Size: 45.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd88a6f63cc0451b26722c3038587694a201b861c0b8e0a1632f40a28cca2808 |
|
MD5 | 2af858ff8cfac275c16b20b3e3a2a41e |
|
BLAKE2b-256 | 5832466a73640195cc5864bbe2c83f02883445133c29111f81f51c52a5a64e62 |