blendify


Nameblendify JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/ptrvilya/blendify
SummaryPython rendering framework for Blender
upload_time2024-10-24 08:22:15
maintainerNone
docs_urlNone
authorVladimir Guzov, Ilya Petrov
requires_python>=3.10
licenseNone
keywords rendering pointcloud blender mesh
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![blendify Logo](https://github.com/ptrvilya/blendify/blob/main/.github/blendify_logo_light_bg.png?raw=true)

## 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)!


## Installation instructions
### Install from pip
```bash
pip install blendify
```
### Optional requirements
```bash
pip install blendify[utils / examples / docs / all]
```

Running examples 4 and 5 requires [PyTorch](https://pytorch.org/) with [PyTorch3D](https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md).

Running example 5 requires SMPL model files, please refer to the installation instructions in 
[README](https://github.com/vchoutas/smplx#downloading-the-model).


## 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://virtualhumans.mpi-inf.mpg.de/blendify/walkthrough.html).


## Examples
Check examples in our repository [here](https://github.com/ptrvilya/blendify#Examples).


## 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](https://github.com/ptrvilya/blendify/blob/main/CHANGELOG.md) file.

## Citation
If you use Blendify in your research, please cite:
```bibtex
@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
* V. Lazova, E. Insafutdinov, G. Pons-Moll: [360-Degree Textures of People in Clothing from a Single Image](https://virtualhumans.mpi-inf.mpg.de/360tex/)
in 3DV'19
* B.L. Bhatnagar, X. Xie, **I. Petrov**, C. Sminchisescu, C. Theobalt, G. Pons-Moll: 
  [BEHAVE: Dataset and Method for Tracking Human Object Interactions](https://virtualhumans.mpi-inf.mpg.de/behave/), in CVPR'22
* X. Zhang, B.L. Bhatnagar, **V. Guzov**, S. Starke, G. Pons-Moll: 
  [COUCH: Towards Controllable Human-Chair Interactions](https://virtualhumans.mpi-inf.mpg.de/couch/), in ECCV'22
* G. Tiwari, D. Antic, J. E. Lenssen, N. Sarafianos, T. Tung, G. Pons-Moll: [Pose-NDF: 
Modeling Human Pose Manifolds with Neural Distance Fields](https://virtualhumans.mpi-inf.mpg.de/posendf/), in ECCV'22
* **I. Petrov**, R. Marin, J. Chibane, G. Pons-Moll: [Object pop-up: Can we infer 3D objects and their poses from human interactions alone?](https://virtualhumans.mpi-inf.mpg.de/object_popup/), in CVPR'23

## Contributors
Blendify is written and maintained by [Vladimir Guzov](https://github.com/vguzov) and [Ilya Petrov](https://github.com/ptrvilya).


## Acknowledgments
We thank Verica Lazova for providing her Blender rendering scripts, 
[István Sarandi](https://github.com/isarandi) for his suggestions and help in implementing new features, 
and [Riccardo Marin](https://github.com/riccardomarin) for his helpful suggestions and feedback.
Our code for processing point clouds is mostly based on the amazing [Blender-Photogrammetry-Importer][BPI] addon.


## License
The code is released under the [GNU General Public License v3][GNU GPL v3].

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

[GNU GPL v3]: https://www.gnu.org/licenses/gpl-3.0.html
[BPI]: https://github.com/SBCV/Blender-Addon-Photogrammetry-Importer
[BPI license]: https://github.com/SBCV/Blender-Addon-Photogrammetry-Importer/blob/master/README.md

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ptrvilya/blendify",
    "name": "blendify",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "rendering, pointcloud, blender, mesh",
    "author": "Vladimir Guzov, Ilya Petrov",
    "author_email": "vguzov@mpi-inf.mpg.de, i.petrov@uni-tuebingen.de",
    "download_url": "https://files.pythonhosted.org/packages/48/b5/40126732b6302d1e1885d4f6e6aa9e9e61ddd3f8599b5b5ea90f2d5a7b47/blendify-2.0.0.tar.gz",
    "platform": null,
    "description": "![blendify Logo](https://github.com/ptrvilya/blendify/blob/main/.github/blendify_logo_light_bg.png?raw=true)\n\n## Introduction\nBlendify 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.\n\nKey features of Blendify:\n\n1. **Simple interface:** Blendify provides a user-friendly interface for performing common visualization tasks without having to dive into the complicated Blender API.\n\n2. **Easy integration:** Blendify seamlessly integrates with development scripts, implementing\ncommonly used routines and functions:\n    * native support of point clouds, meshes, and primitives;\n    * support of per-vertex colors and textures;\n    * advanced shadows with shadow catcher objects;\n    * video rendering with smooth camera trajectories;\n    * support for common camera models;\n    * import and export of .blend files for deeper integration with Blender;\n    * per-face definition of materials for meshes;\n    * support for common rotation representations and look-at utility to automatically setup orientation.\n3. **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`.\n\n4. **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)!\n\n\n## Installation instructions\n### Install from pip\n```bash\npip install blendify\n```\n### Optional requirements\n```bash\npip install blendify[utils / examples / docs / all]\n```\n\nRunning examples 4 and 5 requires [PyTorch](https://pytorch.org/) with [PyTorch3D](https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md).\n\nRunning example 5 requires SMPL model files, please refer to the installation instructions in \n[README](https://github.com/vchoutas/smplx#downloading-the-model).\n\n\n## Quick Start\n```python\n# Script to render cube\nfrom blendify import scene\nfrom blendify.materials import PrincipledBSDFMaterial\nfrom blendify.colors import UniformColors\n# Add light\nscene.lights.add_point(strength=1000, translation=(4, -2, 4))\n# Add camera\nscene.set_perspective_camera((512, 512), fov_x=0.7, rotation=(0.82, 0.42, 0.18, 0.34), translation=(5, -5, 5))\n# Create material\nmaterial = PrincipledBSDFMaterial()\n# Create color\ncolor = UniformColors((0.0, 1.0, 0.0))\n# Add cube mesh\nscene.renderables.add_cube_mesh(1.0, material, color)\n# Render scene\nscene.render(filepath=\"cube.png\")\n```\n\n## Feature walkthrough\nWalkthrough of Blendify features with code and commentaries can be found [here](https://virtualhumans.mpi-inf.mpg.de/blendify/walkthrough.html).\n\n\n## Examples\nCheck examples in our repository [here](https://github.com/ptrvilya/blendify#Examples).\n\n\n## Changelog\nThe most recent version of Blendify is **2.0.0**. The update introduced some breaking changes that are\nsummarized alongside the overview of the new features in the [CHANGELOG](https://github.com/ptrvilya/blendify/blob/main/CHANGELOG.md) file.\n\n## Citation\nIf you use Blendify in your research, please cite:\n```bibtex\n@article{blendify2024,\n  title={Blendify -- Python rendering framework for Blender},\n  author={Guzov, Vladimir and Petrov, Ilya A and Pons-Moll, Gerard},\n  journal={arXiv preprint arXiv:2410.17858},\n  year={2024}\n}\n```\n\n\n## Works that use Blendify\n* V. Lazova, E. Insafutdinov, G. Pons-Moll: [360-Degree Textures of People in Clothing from a Single Image](https://virtualhumans.mpi-inf.mpg.de/360tex/)\nin 3DV'19\n* B.L. Bhatnagar, X. Xie, **I. Petrov**, C. Sminchisescu, C. Theobalt, G. Pons-Moll: \n  [BEHAVE: Dataset and Method for Tracking Human Object Interactions](https://virtualhumans.mpi-inf.mpg.de/behave/), in CVPR'22\n* X. Zhang, B.L. Bhatnagar, **V. Guzov**, S. Starke, G. Pons-Moll: \n  [COUCH: Towards Controllable Human-Chair Interactions](https://virtualhumans.mpi-inf.mpg.de/couch/), in ECCV'22\n* G. Tiwari, D. Antic, J. E. Lenssen, N. Sarafianos, T. Tung, G. Pons-Moll: [Pose-NDF: \nModeling Human Pose Manifolds with Neural Distance Fields](https://virtualhumans.mpi-inf.mpg.de/posendf/), in ECCV'22\n* **I. Petrov**, R. Marin, J. Chibane, G. Pons-Moll: [Object pop-up: Can we infer 3D objects and their poses from human interactions alone?](https://virtualhumans.mpi-inf.mpg.de/object_popup/), in CVPR'23\n\n## Contributors\nBlendify is written and maintained by [Vladimir Guzov](https://github.com/vguzov) and [Ilya Petrov](https://github.com/ptrvilya).\n\n\n## Acknowledgments\nWe thank Verica Lazova for providing her Blender rendering scripts, \n[Istv\u00e1n Sarandi](https://github.com/isarandi) for his suggestions and help in implementing new features, \nand [Riccardo Marin](https://github.com/riccardomarin) for his helpful suggestions and feedback.\nOur code for processing point clouds is mostly based on the amazing [Blender-Photogrammetry-Importer][BPI] addon.\n\n\n## License\nThe code is released under the [GNU General Public License v3][GNU GPL v3].\n\nThe Python logo is trademark of Python Software Foundation.\nThe Blender logo is a registered property of Blender Foundation.\n[Blender-Photogrammetry-Importer][BPI] is distributed under the [MIT License][BPI license]. \nBlender is released under the [GNU General Public License v3][GNU GPL v3]. \n\n[GNU GPL v3]: https://www.gnu.org/licenses/gpl-3.0.html\n[BPI]: https://github.com/SBCV/Blender-Addon-Photogrammetry-Importer\n[BPI license]: https://github.com/SBCV/Blender-Addon-Photogrammetry-Importer/blob/master/README.md\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python rendering framework for Blender",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://github.com/ptrvilya/blendify"
    },
    "split_keywords": [
        "rendering",
        " pointcloud",
        " blender",
        " mesh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e2709e26273df514f2ef2ea70010755193c8267b96a6c367df715f0b3060241",
                "md5": "080b4c1151081aeb39f2af664bb4be12",
                "sha256": "aa48626574477d8a4d75aa5849237e2f546076cad0f8563e3235993cda54957e"
            },
            "downloads": -1,
            "filename": "blendify-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "080b4c1151081aeb39f2af664bb4be12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 75043,
            "upload_time": "2024-10-24T08:22:14",
            "upload_time_iso_8601": "2024-10-24T08:22:14.494510Z",
            "url": "https://files.pythonhosted.org/packages/4e/27/09e26273df514f2ef2ea70010755193c8267b96a6c367df715f0b3060241/blendify-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48b540126732b6302d1e1885d4f6e6aa9e9e61ddd3f8599b5b5ea90f2d5a7b47",
                "md5": "3ff1966da2c43fdae8a55b5dbc9168a3",
                "sha256": "ebd0ac357ba4911f7c7bc97e68145581f803ebb2c7f99cf07eb03d0d74bf0136"
            },
            "downloads": -1,
            "filename": "blendify-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3ff1966da2c43fdae8a55b5dbc9168a3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 64004,
            "upload_time": "2024-10-24T08:22:15",
            "upload_time_iso_8601": "2024-10-24T08:22:15.777389Z",
            "url": "https://files.pythonhosted.org/packages/48/b5/40126732b6302d1e1885d4f6e6aa9e9e61ddd3f8599b5b5ea90f2d5a7b47/blendify-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 08:22:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ptrvilya",
    "github_project": "blendify",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "blendify"
}
        
Elapsed time: 0.35493s