Visualization of numpy matrixes as voxel models
Project description
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).
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for voxel-model-visualizer-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb40bebec0f3e2c5aa8e467426a4e3248510129a5ac67bfe84418152b592ca1c |
|
MD5 | acb9bbbda729d0428a6dee9e95c5c80f |
|
BLAKE2b-256 | 826c5c803fd7665ada4b9531796e92b39c75f65a32715452620745d200bcc302 |