A utility to create volumesh files.
Project description
Volumesh
Utility to create volumetric mesh container files.
Installation
pip install volumesh
Draco Compression
To install the Google Draco compression the DracoPy library is needed. Because it is still under development, we just include it if 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 ./human test.glb
First specify the folder where the OBJ's are located (human
) 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 will be stored into the mesh if available:
- vertices
- triangle indices
- normals
- vertex-uvs
- textures (png / jpeg)
Limitations
If draco compression is turned on, only vertex and triangle information is stored into the mesh. This is due to the fact that DracoPy does only support these two primitive values. At the moment we recommend to not use the internal compression, but convert the sequence into a glb file and later convert it using the gltf-pipeline. This leads to way better compression and contains still all information parts:
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 framerate (default 24
) and set the animation flag.
volumesh ./human test.glb --animate --fps 24
Help
usage: volumesh [-h] [--compressed] [--jpeg-textures] [--animate] [--fps FPS]
[-tex TEXTURE_SIZE]
input output
A utility to work with volumesh files.
positional arguments:
input Path to the mesh files (directory).
output GLTF output file (file).
optional arguments:
-h, --help show this help message and exit
--compressed Compress the mesh data.
--jpeg-textures Use JPEG compression for textures instead of PNG.
--animate Animate mesh frames with GLTF animation system.
--fps FPS Animation frames per second (fps).
-tex TEXTURE_SIZE, --texture-size TEXTURE_SIZE
Resize texture to the specified width.
About
Copyright (c) 2022 Zurich University of the Arts ZHdK
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 Distributions
Built Distribution
File details
Details for the file volumesh-1.2.5.1-py3-none-any.whl
.
File metadata
- Download URL: volumesh-1.2.5.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1062def9b21f889c27b16e65b0a2c5beec1679c37970ce10918809b0f83fb8ce |
|
MD5 | c5c58f7d69e614318e1767409bb36afe |
|
BLAKE2b-256 | 229b21da14351ab56943b1868c6438954dd78289a3b56e7b0e6be2afdada7d17 |