voxel-model-vizualizer


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

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-render/master/sample/output_animate.gif" width="400" height="400"/>

## Package Installation

Can be done directly from `pypi`

```bash
pip install voxel_model_vizualizer
```

## 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_vizualizer import VoxelModelVizualizer

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

vizualizer.render(model, colours, output_path='./example_pancake.png', pancake=True)
vizualizer.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-render",
    "name": "voxel-model-vizualizer",
    "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/0a/17/ed7b7750868c726116b7fb7790dc3885731cc8615b4f571545a67f38b65a/voxel-model-vizualizer-0.0.1-2.tar.gz",
    "platform": null,
    "description": "# Voxel Model Vizualizer\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-render/master/sample/output_animate.gif\" width=\"400\" height=\"400\"/>\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_vizualizer\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_vizualizer import VoxelModelVizualizer\r\n\r\nmodel = np.load('./sample/input.npy')\r\ncolours = [(0.8, 0, 0), (0, 0.8, 0), (0, 0, 0.8)]\r\nvizualizer = VoxelModelVizualizer(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\nvizualizer.render(model, colours, output_path='./example_pancake.png', pancake=True)\r\nvizualizer.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",
    "summary": "Visualization of numpy matrixes as voxel models",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/andreasbrake/voxel-render"
    },
    "split_keywords": [
        "voxel",
        "geometry",
        "3d"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a17ed7b7750868c726116b7fb7790dc3885731cc8615b4f571545a67f38b65a",
                "md5": "6ce66c8753c1e8b313da6f3b8120c2fb",
                "sha256": "e9ba6b0397a3895566a6a9b2b795691478b597b32740de435ae7b01fcf332a4d"
            },
            "downloads": -1,
            "filename": "voxel-model-vizualizer-0.0.1-2.tar.gz",
            "has_sig": false,
            "md5_digest": "6ce66c8753c1e8b313da6f3b8120c2fb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14862,
            "upload_time": "2023-05-08T03:09:34",
            "upload_time_iso_8601": "2023-05-08T03:09:34.780411Z",
            "url": "https://files.pythonhosted.org/packages/0a/17/ed7b7750868c726116b7fb7790dc3885731cc8615b4f571545a67f38b65a/voxel-model-vizualizer-0.0.1-2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-08 03:09:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "andreasbrake",
    "github_project": "voxel-render",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "voxel-model-vizualizer"
}
        
Elapsed time: 0.47137s