voxel-model-visualizer


Namevoxel-model-visualizer JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/andreasbrake/voxel-model-visualizer
SummaryVisualization of numpy matrixes as voxel models
upload_time2023-05-08 03:40:04
maintainer
docs_urlNone
authorAndrea Brake
requires_python
licenseGPL-3.0
keywords voxel geometry 3d
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Voxel Model Visualizer

[![PyPI version](https://badge.fury.io/py/voxel-model-visualizer.svg)](https://badge.fury.io/py/voxel-model-visualizer)
[![PyPI downloads](https://img.shields.io/pypi/dm/voxel-model-visualizer.svg)](https://pypistats.org/packages/voxel-model-visualizer)

This code acts as a standalone tool to vizualize voxelized models stored as 4 dimensional numpy arrays (3 geometric dimensions + 1 class dimension).

<img src="https://raw.githubusercontent.com/andreasbrake/voxel-model-visualizer/master/sample/output_animate.gif" width="400" height="400"/>


## Package Installation

Can be done directly from `pypi`

```bash
pip install voxel-model-visualizer
```

## Dependencies

* [moderngl](https://github.com/moderngl/moderngl)
* [numpy](http://www.numpy.org/)
* [pillow](https://pillow.readthedocs.io/en/stable/)
* [simple-3dviz](https://github.com/angeloskath/simple-3dviz)
* [wxpython](https://wxpython.org/)

## Package Usage

```python
from voxel_model_visualizer import VoxelModelVisualizer

model = np.load('./sample/input.npy')
colours = [(0.8, 0, 0), (0, 0.8, 0), (0, 0, 0.8)]
visualizer = VoxelModelVisualizer(gif_resolution=720,
                                  static_resolution=4096,
                                  frame_count=120,
                                  fps=24,
                                  pancake_spread=5,
                                  verbose=False)

visualizer.render(model, colours, output_path='./example_pancake.png', pancake=True)
visualizer.render(model, colours, output_path='./example_animate.gif', animate=True)
```

## Standalone Usage

```text
usage: main.py [-h] [-a] [-p] [-o OUTPUT] filepath

Voxel Model Renderer

positional arguments:
  filepath       Model input filepath

optional arguments:
  -h, --help     show this help message and exit
  -a, --animate  Generated an Animated GIF (default: False)
  -p, --pancake  Render model as pancake slices (default: False)
  -v, --verbose  Verbose console printing (default: False)
  -o OUTPUT      Output filepath (default: ./out.png)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/andreasbrake/voxel-model-visualizer",
    "name": "voxel-model-visualizer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "voxel geometry 3D",
    "author": "Andrea Brake",
    "author_email": "andrea@andreabrake.com",
    "download_url": "https://files.pythonhosted.org/packages/82/6c/5c803fd7665ada4b9531796e92b39c75f65a32715452620745d200bcc302/voxel-model-visualizer-0.0.1.tar.gz",
    "platform": null,
    "description": "# Voxel Model Visualizer\r\n\r\n[![PyPI version](https://badge.fury.io/py/voxel-model-visualizer.svg)](https://badge.fury.io/py/voxel-model-visualizer)\r\n[![PyPI downloads](https://img.shields.io/pypi/dm/voxel-model-visualizer.svg)](https://pypistats.org/packages/voxel-model-visualizer)\r\n\r\nThis code acts as a standalone tool to vizualize voxelized models stored as 4 dimensional numpy arrays (3 geometric dimensions + 1 class dimension).\r\n\r\n<img src=\"https://raw.githubusercontent.com/andreasbrake/voxel-model-visualizer/master/sample/output_animate.gif\" width=\"400\" height=\"400\"/>\r\n\r\n\r\n## Package Installation\r\n\r\nCan be done directly from `pypi`\r\n\r\n```bash\r\npip install voxel-model-visualizer\r\n```\r\n\r\n## Dependencies\r\n\r\n* [moderngl](https://github.com/moderngl/moderngl)\r\n* [numpy](http://www.numpy.org/)\r\n* [pillow](https://pillow.readthedocs.io/en/stable/)\r\n* [simple-3dviz](https://github.com/angeloskath/simple-3dviz)\r\n* [wxpython](https://wxpython.org/)\r\n\r\n## Package Usage\r\n\r\n```python\r\nfrom voxel_model_visualizer import VoxelModelVisualizer\r\n\r\nmodel = np.load('./sample/input.npy')\r\ncolours = [(0.8, 0, 0), (0, 0.8, 0), (0, 0, 0.8)]\r\nvisualizer = VoxelModelVisualizer(gif_resolution=720,\r\n                                  static_resolution=4096,\r\n                                  frame_count=120,\r\n                                  fps=24,\r\n                                  pancake_spread=5,\r\n                                  verbose=False)\r\n\r\nvisualizer.render(model, colours, output_path='./example_pancake.png', pancake=True)\r\nvisualizer.render(model, colours, output_path='./example_animate.gif', animate=True)\r\n```\r\n\r\n## Standalone Usage\r\n\r\n```text\r\nusage: main.py [-h] [-a] [-p] [-o OUTPUT] filepath\r\n\r\nVoxel Model Renderer\r\n\r\npositional arguments:\r\n  filepath       Model input filepath\r\n\r\noptional arguments:\r\n  -h, --help     show this help message and exit\r\n  -a, --animate  Generated an Animated GIF (default: False)\r\n  -p, --pancake  Render model as pancake slices (default: False)\r\n  -v, --verbose  Verbose console printing (default: False)\r\n  -o OUTPUT      Output filepath (default: ./out.png)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Visualization of numpy matrixes as voxel models",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/andreasbrake/voxel-model-visualizer"
    },
    "split_keywords": [
        "voxel",
        "geometry",
        "3d"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "826c5c803fd7665ada4b9531796e92b39c75f65a32715452620745d200bcc302",
                "md5": "acb9bbbda729d0428a6dee9e95c5c80f",
                "sha256": "bb40bebec0f3e2c5aa8e467426a4e3248510129a5ac67bfe84418152b592ca1c"
            },
            "downloads": -1,
            "filename": "voxel-model-visualizer-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "acb9bbbda729d0428a6dee9e95c5c80f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14951,
            "upload_time": "2023-05-08T03:40:04",
            "upload_time_iso_8601": "2023-05-08T03:40:04.407237Z",
            "url": "https://files.pythonhosted.org/packages/82/6c/5c803fd7665ada4b9531796e92b39c75f65a32715452620745d200bcc302/voxel-model-visualizer-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-08 03:40:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "andreasbrake",
    "github_project": "voxel-model-visualizer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "voxel-model-visualizer"
}
        
Elapsed time: 0.06800s