# Volumesh
Utility for creating volumetric mesh container files in glTF format.
[![Hypergrid](media/hypergrid.gif)](https://easyguet.ch/ias/volumesh-viewer/?model=hypergrid)
*Hypergrid example ([hypergrid.glb](https://easyguet.ch/ias/volumesh-viewer/hypergrid.glb)) (Source: [Justin Jensen](https://github.com/neverhood311/Stop-motion-OBJ/wiki#gallery))*
## Installation
```
pip install volumesh
```
### Draco Compression
To install the [Google Draco](https://google.github.io/draco/) compression, the [DracoPy](https://github.com/seung-lab/DracoPy) library is required. As it is still under development, we only include it when the [extra](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-setuptools-extras) `draco` is specified.
```
pip install "volumesh[draco]"
```
## Usage
To convert a sequence of OBJ files into a volumesh container use the following command:
```bash
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](https://github.com/seung-lab/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](https://github.com/CesiumGS/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
```bash
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.
```
## About
Copyright (c) 2024 Zurich University of the Arts ZHdK
![ZHdK Logo](https://lh4.googleusercontent.com/-7NafHJ8zrlE/AAAAAAAAAAI/AAAAAAAAAAA/x4MYabXKMVQ/s88-p-k-no-ns-nd/photo.jpg)
Raw data
{
"_id": null,
"home_page": "https://github.com/cansik/volumesh",
"name": "volumesh",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Florian Bruggisser",
"author_email": "github@broox.ch",
"download_url": null,
"platform": null,
"description": "# Volumesh\nUtility for creating volumetric mesh container files in glTF format.\n\n[![Hypergrid](media/hypergrid.gif)](https://easyguet.ch/ias/volumesh-viewer/?model=hypergrid)\n\n*Hypergrid example ([hypergrid.glb](https://easyguet.ch/ias/volumesh-viewer/hypergrid.glb)) (Source: [Justin Jensen](https://github.com/neverhood311/Stop-motion-OBJ/wiki#gallery))*\n\n## Installation\n\n```\npip install volumesh\n```\n\n### Draco Compression\nTo install the [Google Draco](https://google.github.io/draco/) compression, the [DracoPy](https://github.com/seung-lab/DracoPy) library is required. As it is still under development, we only include it when the [extra](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-setuptools-extras) `draco` is specified.\n\n```\npip install \"volumesh[draco]\"\n```\n\n## Usage\n\nTo convert a sequence of OBJ files into a volumesh container use the following command:\n\n```bash\nvolumesh ./data test.glb\n```\n\nFirst 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.\nThe following information is stored in the mesh, if available::\n\n* vertices\n* triangle indices\n* normals\n* vertex-uvs\n* textures (png / jpeg)\n\n### Limitations\nWhen Draco compression is enabled, only **vertex** and **triangle** information is stored in the mesh. This is due to the fact that [DracoPy](https://github.com/seung-lab/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](https://github.com/CesiumGS/gltf-pipeline). This gives a much better compression and still contains all the information:\n\n```\ngltf-pipeline -i .\\sequence.glb -o .\\sequence-draco.glb -d\n```\n\n### Animation\nTo 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.\n\n```\nvolumesh ./human test.glb --animate --fps 24\n```\n\n### Help\n\n```bash\nusage: volumesh [-h] [--compressed] [--jpeg-textures]\n [--jpeg-quality JPEG_QUALITY] [--animate] [--fps FPS]\n [-tex TEXTURE_SIZE] [--load-safe]\n input output\n\nA utility to create volumesh files.\n\npositional arguments:\n input Path to the mesh (*.obj) files (directory).\n output GLTF output file (.glb).\n\noptions:\n -h, --help show this help message and exit\n --compressed Compress the mesh data with Draco compression.\n --jpeg-textures Use JPEG compression for textures instead of PNG.\n --jpeg-quality JPEG_QUALITY\n JPEG quality parameter.\n --animate Animate mesh frames with GLTF animation system.\n --fps FPS Animation frames per second (fps).\n -tex TEXTURE_SIZE, --texture-size TEXTURE_SIZE\n Limit texture size to the specified width.\n --load-safe Load meshes slow but save.\n```\n\n## About\nCopyright (c) 2024 Zurich University of the Arts ZHdK\n\n![ZHdK Logo](https://lh4.googleusercontent.com/-7NafHJ8zrlE/AAAAAAAAAAI/AAAAAAAAAAA/x4MYabXKMVQ/s88-p-k-no-ns-nd/photo.jpg)\n",
"bugtrack_url": null,
"license": null,
"summary": "Utility for creating volumetric mesh container files in glTF format.",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/cansik/volumesh"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "942a41a28e25ea5ce7474a9d855e20cdb5486af679810362eebab87a85a1d7b7",
"md5": "953bb6c8799e31f9bc36705955876b5f",
"sha256": "49805be662d6c1779ab8e291d897671fb2de69311bfc616c6f83f78c96a118f1"
},
"downloads": -1,
"filename": "volumesh-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "953bb6c8799e31f9bc36705955876b5f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10247,
"upload_time": "2024-06-24T11:02:58",
"upload_time_iso_8601": "2024-06-24T11:02:58.436777Z",
"url": "https://files.pythonhosted.org/packages/94/2a/41a28e25ea5ce7474a9d855e20cdb5486af679810362eebab87a85a1d7b7/volumesh-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-24 11:02:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cansik",
"github_project": "volumesh",
"github_not_found": true,
"lcname": "volumesh"
}