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 hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page