3D ray tracing package for Python, aimed at easy and aesthetic visualization of large datasets (and small as well). Data features can be represented on plots as a position, size/thickness and color of markers of several basic shapes, or projected onto the surfaces of objects in form of a color textures and displacement maps. All finished with a photorealistic lighting and depth of field.
No need to write shaders, intersection algorithms, handle 3D scene technicalities. Basic usage is even more simple than with matplotlib:
import numpy as np from plotoptix import TkOptiX n = 1000000 # 1M points, better not try this with matplotlib xyz = 3 * (np.random.random((n, 3)) - 0.5) # random 3D positions r = 0.02 * np.random.random(n) + 0.002 # random radii plot = TkOptiX() plot.set_data("my plot", xyz, r=r) plot.show()
but PlotOptiX is much faster on large data and, with all the raytraced shades and DoF, more readable and eye catching.
Documentation pages are currently generated from the source code docstrings. Please, see examples on GitHub for practical code samples.
PlotOptiX is based on NVIDIA OptiX framework wrapped in RnD.SharpOptiX C#/C++ libraries and completed with custom CUDA shaders by R&D Team. PlotOptiX makes use of RTX-capable GPU's.
- progressive path tracing with explicit light sampling
- pinhole cameras and cameras with depth of field simulation
- geometries: particle (sphere), parallelepiped, parallelogram, tetrahedron, bezier line, surface mesh
- parameterized materials shading: flat, diffuse, reflective, refractive (including light dispersion and nested volumes)
- spherical and parallelogram light sources
- environmental light and ambient occlusion
- post-processing: tonal correction curves, levels adjustment, apply mask/overlay, AI denoiser
- GPU acceleration using RT Cores, multi-GPU support, and everything else what comes with OptiX 6.0
- callbacks at the scene initialization, start and end of each frame raytracing, end of progressive accumulation
- image output to numpy array, or save to popular image file formats
- hardware accelerated video output to MP4 file format using NVENC 9.0
- Tkinter based UI or headless raytracer
Subscribe to Python Awesome
Get the latest posts delivered right to your inbox