```{eval-rst}
:og:description: Blendify Documentation
```
```{image} _static/logo/blendify_logo_light_bg.png
:width: 800
:align: center
:alt: blendify
:class: only-light
```
```{image} _static/logo/blendify_logo_dark_bg.png
:width: 800
:align: center
:alt: blendify
:class: only-dark
```
```{toctree}
:hidden:
:caption: Feature walkthrough
:maxdepth: 2
./walkthrough.md
```
```{toctree}
:hidden:
:caption: API Reference
:maxdepth: 4
api/modules
```
## Introduction
Blendify is a lightweight Python framework that provides a high-level API for creating and rendering scenes with Blender. Developed with a focus on 3D computer vision visualization, Blendify simplifies access to selected Blender functions and objects.
Key features of Blendify:
1. **Simple interface:** Blendify provides a user-friendly interface for performing common visualization tasks without having to dive into the complicated Blender API.
2. **Easy integration:** Blendify seamlessly integrates with development scripts, implementing
commonly used routines and functions:
* native support of point clouds, meshes, and primitives;
* support of per-vertex colors and textures;
* advanced shadows with shadow catcher objects;
* video rendering with smooth camera trajectories;
* support for common camera models;
* import and export of .blend files for deeper integration with Blender;
* per-face definition of materials for meshes;
* support for common rotation representations and look-at utility to automatically setup orientation.
3. **Quick start:** Blendify is easy to get started with and does not require a standalone Blender installation. All you need to do is run `pip install blendify`.
4. **Blendify works in Colab:** check out [our Google Colab demo](https://colab.research.google.com/github/ptrvilya/blendify/blob/main/examples/ipynb/blendify_colab_demo.ipynb)!
Blendify simplifies interaction with Blender, allowing you to focus on developing your application.
The following example shows the simplicity of visualizing with Blendify in comparison to the native Blender API:
```{image} _static/examples/blender_api_vs_blendify.jpg
:width: 800
:align: center
:alt: blender_vs_blendify
```
## Installation instructions
Please note: **Blendify requires Python 3.13** and **Blender 5.2 LTS**.
To install older versions of blendify (with Blender < 4.0) add `--find-links https://download.blender.org/pypi/bpy/`.
### Install from pip (minimal package, no extra dependencies)
```bash
pip install blendify
```
### Install the full package with optional requirements
```bash
pip install blendify[all]
```
The full package includes extra dependencies for utilities, examples and documentation.
## Quick Start
```python
# Script to render cube
from blendify import scene
from blendify.materials import PrincipledBSDFMaterial
from blendify.colors import UniformColors
# Add light
scene.lights.add_point(strength=1000, translation=(4, -2, 4))
# Add camera
scene.set_perspective_camera((512, 512), fov_x=0.7, rotation=(0.82, 0.42, 0.18, 0.34), translation=(5, -5, 5))
# Create material
material = PrincipledBSDFMaterial()
# Create color
color = UniformColors((0.0, 1.0, 0.0))
# Add cube mesh
scene.renderables.add_cube_mesh(1.0, material, color)
# Render scene
scene.render(filepath="cube.png")
```
## Feature walkthrough
Walkthrough of Blendify features with code and commentaries can be found [here](https://ptrvilya.github.io/blendify/walkthrough.html).
## Examples
**Note:** Examples require extra dependencies, make sure to install them with `pip install blendify[examples]`
Running examples 4 and 5 requires [PyTorch](https://pytorch.org/), running example 5 also requires SMPL model files, please refer to the installation instructions in
SMPL-X [README](https://github.com/vchoutas/smplx#downloading-the-model).
| Cornell Box | Color, albedo and depth |
![]() |
![]() |
| Mesh with texture | Camera colored point cloud |
![]() |
![]() |
| SMPL movement | NURBS trajectory |
![]() |
![]() |
| Various materials and shadow catcher | Per-face material |
![]() |
![]() |