Skip to main content

Visualization of numpy matrixes as voxel models

Project description

Voxel Model Visualizer

PyPI version PyPI downloads

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

Package Installation

Can be done directly from pypi

pip install voxel-model-visualizer

Dependencies

Package Usage

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

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)

Project details


Download files

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

Source Distribution

voxel-model-visualizer-0.0.1.tar.gz (15.0 kB view details)

Uploaded Source

File details

Details for the file voxel-model-visualizer-0.0.1.tar.gz.

File metadata

  • Download URL: voxel-model-visualizer-0.0.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for voxel-model-visualizer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bb40bebec0f3e2c5aa8e467426a4e3248510129a5ac67bfe84418152b592ca1c
MD5 acb9bbbda729d0428a6dee9e95c5c80f
BLAKE2b-256 826c5c803fd7665ada4b9531796e92b39c75f65a32715452620745d200bcc302

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