A robust, GPU-accelerated Python pipeline for rendering 3D point cloud and mesh comparisons using Blender's Cycles renderer.
PyBlender is designed to visualize 3D point cloud and mesh denoising/reconstruction results. It computes distance-based errors between ground truth and reconstructed point clouds, applies colormaps (e.g., viridis, turbo) to represent these distances, and renders high-quality images using Blender Cycles.
Key features include:
- Fast GPU Rendering: OptiX denoising on the GPU for ~8x faster renders.
- Automated Workflows: Ready-to-run Jupyter Notebooks for Google Colab and Kaggle.
- Cloud Integration: Async uploads directly to Google Cloud Storage (GCS) and Weights & Biases (WandB) tracking.
- Extensive Colormap Support: Compare point clouds using 168+ matplotlib colormaps.
flowchart LR
A["Raw Data\n(.xyz / .ply)"] --> B{"Execution Environment"}
subgraph Environments [Rendering Engines]
B -->|Google Colab| C["Colab_Script/\nSingle/Multi-Colormap"]
B -->|Kaggle (TPU/CPU)| D["Kaggel_Script/\nHigh Performance"]
B -->|Local PC| E["Data.py + Local Scripts"]
end
C --> F["Blender Cycles\n(Python 3.10)"]
D --> F
E --> F
F -->|GPU Rendering| G["Outputs\n(.png / .blend)"]
G --> H["Google Drive / GCS"]
G --> I["Colormap Catalog\nWebsite"]
PyBlender/
├── 📁 BlenderToolbox/ # Cloned dependency for Blender Python utilities
├── 📁 Colab_Script/ # Ready-to-use Google Colab notebooks
├── 📁 Kaggel_Script/ # High-performance Kaggle notebooks with GCS/WandB
├── 📁 Colormap_Catloge_Website/ # Vite/React app for browsing rendered colormaps
├── 📁 Data/ # 📦 Point clouds & meshes (Ignored in git, download required)
├── 📁 Deprecate/ # Legacy Python scripts (Colored_PC, etc.)
├── 📁 Tools/ # Utility scripts (Clean notebooks, extract PNGs)
├── 📄 Data.py # Script to download asset data from Google Drive
├── 📄 requirements.txt # Python dependencies
└── 📄 README.md # You are here!
For more details, check the README.md inside each respective directory.
- Blender 4.0+ installed on your system.
- Python 3.10+ (Recommended: use a virtual environment).
Clone the repository and set up your virtual environment:
git clone https://github.com/Mahendra2409/PyBlender.git
cd PyBlender
# Create and activate virtual environment (Windows)
python -m venv .venv
.venv\Scripts\activate
# (Linux / Mac)
# source .venv/bin/activateInstall the required Python dependencies:
pip install -r requirements.txtClone the required BlenderToolbox repository:
git clone https://github.com/HTDerekLiu/BlenderToolbox.gitBecause 3D point cloud data is large, it is not stored in this repository. You need to download it directly. Run the download script:
python Data.py(Alternatively, you can manually download the data from the link inside Data/README.md)
You are now ready to run scripts!
- For Local runs, navigate to the specific script directories or explore the
Tools/. - For Cloud rendering, explore the Colab Scripts or Kaggle Scripts directories and run the provided notebooks.
Note
Are you looking for the legacy local rendering scripts? They have been moved to the Deprecate/ directory in favor of cloud-optimized Colab and Kaggle pipelines.