Skip to main content

blendify Logo

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!

Installation instructions

Install from pip (minimal package, no extra dependencies)

pip install blendify

Install the full package with optional requirements

pip install blendify[all]

The full package includes extra dependencies for utilities, examples and documentation. To install older versions of blendify (with Blender < 4.0) add --find-links https://download.blender.org/pypi/bpy/.

Quick Start

# 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.

Examples

Check examples in our repository here.

Note: Examples require extra dependencies, make sure to install them with pip install blendify[examples]

Running examples 4 and 5 requires PyTorch, running example 5 also requires SMPL model files, please refer to the installation instructions in SMPL-X README.

Changelog

The most recent version of blendify is 2.1.0. The 2.1.0 update introduces support for Blender 4.5 LTS, which in turn required some breaking changes that are summarized in the CHANGELOG file.

Citation

If you use Blendify in your research, please cite:

@article{blendify2024,
  title={Blendify -- Python rendering framework for Blender},
  author={Guzov, Vladimir and Petrov, Ilya A and Pons-Moll, Gerard},
  journal={arXiv preprint arXiv:2410.17858},
  year={2024}
}

Works that use Blendify

Contributors

Blendify is written and maintained by Vladimir Guzov and Ilya Petrov.

Acknowledgments

We thank Verica Lazova for providing her Blender rendering scripts, István Sarandi for his suggestions and help in implementing new features, and Riccardo Marin for his helpful suggestions and feedback. Our code for processing point clouds is mostly based on the amazing Blender-Photogrammetry-Importer addon.

License

The code is released under the GNU General Public License v3.

The Python logo is trademark of Python Software Foundation. The Blender logo is a registered property of Blender Foundation. Blender-Photogrammetry-Importer is distributed under the MIT License. Blender is released under the GNU General Public License v3.

Metadata

Release files for blendify 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blendify 2.1.0
File Size Uploaded
blendify-2.1.0.tar.gz 102.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for blendify 2.1.0
File Interpreter ABI Platform
blendify-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 211.5 kB

Release files / blendify-2.1.0.tar.gz

Download URL blendify-2.1.0.tar.gz
Size 102.6 kB
Tags Source
SHA-256 checksum
How to use checksums
73cf1d0a7b5297e2ef3cb6295c98ca310793775a45d1802e611030c80a5c78c6
BLAKE2b-256 checksum
How to use checksums
d2d51b7fa4d1a55cde216137e68e7381f4dde6e57b63f0168f392e5c2cf21ded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / blendify-2.1.0-py3-none-any.whl

Download URL blendify-2.1.0-py3-none-any.whl
Size 108.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
335120fa1eb923d5e62f9e2e5de8b6bed4128cbd3c194ac24d657e219a9b9fbe
BLAKE2b-256 checksum
How to use checksums
8dd732fc11ea579e1a61e99d7b6077a9104c92ba9b893db0064871ff7eb497b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page