Skip to main content

Python rendering framework for Blender

Project description

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

pip install blendify

Optional requirements

pip install blendify[utils / examples / docs / all]

Running examples 4 and 5 requires PyTorch with PyTorch3D.

Running example 5 requires SMPL model files, please refer to the installation instructions in README.

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.

Changelog

The most recent version of Blendify is 2.0.0. The update introduced some breaking changes that are summarized alongside the overview of the new features 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blendify-2.0.0.tar.gz (64.0 kB view details)

Uploaded Source

Built Distribution

blendify-2.0.0-py3-none-any.whl (75.0 kB view details)

Uploaded Python 3

File details

Details for the file blendify-2.0.0.tar.gz.

File metadata

  • Download URL: blendify-2.0.0.tar.gz
  • Upload date:
  • Size: 64.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for blendify-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ebd0ac357ba4911f7c7bc97e68145581f803ebb2c7f99cf07eb03d0d74bf0136
MD5 3ff1966da2c43fdae8a55b5dbc9168a3
BLAKE2b-256 48b540126732b6302d1e1885d4f6e6aa9e9e61ddd3f8599b5b5ea90f2d5a7b47

See more details on using hashes here.

File details

Details for the file blendify-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: blendify-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 75.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for blendify-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa48626574477d8a4d75aa5849237e2f546076cad0f8563e3235993cda54957e
MD5 080b4c1151081aeb39f2af664bb4be12
BLAKE2b-256 4e2709e26273df514f2ef2ea70010755193c8267b96a6c367df715f0b3060241

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page