Skip to main content

Utility for creating volumetric mesh container files in glTF format.

Project description

Volumesh

Utility for creating volumetric mesh container files in glTF format.

Hypergrid

Hypergrid example (hypergrid.glb) (Source: Justin Jensen)

Installation

pip install volumesh

Draco Compression

To install the Google Draco compression, the DracoPy library is required. As it is still under development, we only include it when the extra draco is specified.

pip install "volumesh[draco]"

Usage

To convert a sequence of OBJ files into a volumesh container use the following command:

volumesh ./data test.glb

First specify the folder where the OBJs are located (data) and then the output file (test.glb). Use the --compressed flag if you have draco extras installed and want to compress the container. The following information is stored in the mesh, if available::

  • vertices
  • triangle indices
  • normals
  • vertex-uvs
  • textures (png / jpeg)

Limitations

When Draco compression is enabled, only vertex and triangle information is stored in the mesh. This is due to the fact that DracoPy only supports these two primitives. At the moment we recommend not to use the internal compression, but to convert the sequence to a glb file and convert it later with the gltf-pipeline. This gives a much better compression and still contains all the information:

gltf-pipeline -i .\sequence.glb -o .\sequence-draco.glb -d

Animation

To use the GLTF animation system to render the meshes in a sequence, it is possible to specify the frame rate (default 24) and set the animation flag. Volumesh will add an animation track that will fade the objects in and out using the GLTF animation tools.

volumesh ./human test.glb --animate --fps 24

Help

usage: volumesh [-h] [--compressed] [--jpeg-textures]
                [--jpeg-quality JPEG_QUALITY] [--animate] [--fps FPS]
                [-tex TEXTURE_SIZE] [--load-safe]
                input output

A utility to create volumesh files.

positional arguments:
  input                 Path to the mesh (*.obj) files (directory).
  output                GLTF output file (.glb).

options:
  -h, --help            show this help message and exit
  --compressed          Compress the mesh data with Draco compression.
  --jpeg-textures       Use JPEG compression for textures instead of PNG.
  --jpeg-quality JPEG_QUALITY
                        JPEG quality parameter.
  --animate             Animate mesh frames with GLTF animation system.
  --fps FPS             Animation frames per second (fps).
  -tex TEXTURE_SIZE, --texture-size TEXTURE_SIZE
                        Limit texture size to the specified width.
  --load-safe           Load meshes slow but save.

Credits

Developed at the Immersive Arts Space, Zurich University of the Arts (ZHdK).

Copyright © Zurich University of the Arts (ZHdK).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

volumesh-1.5.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file volumesh-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: volumesh-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for volumesh-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 288aff4b79e9c78d46164c7b7b2d521f922d3cb77c12cde8edd22a09c04512b3
MD5 bcd0d55fc0c23675edc17a29dc4b5b37
BLAKE2b-256 524cfd7d7ab7d047ea92c254f2e2721f53e0dc05e9a42bbd325e3ce30198b2fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page