Speckle Automate unlocks new potentials for running Blender in the cloud.
This Speckle Function uses Blender's rendering engine Cycles to produce global illumation renders for each 3d view/camera in your versioned Speckle data.
When you send a new Speckle Version to Speckle, this Function creates stylized renders of your 3D Views and Cameras.
- Create a new Speckle Automation.
- Select your Speckle Project and Speckle Model.
- Select the existing Speckle Function named
blender-automate
. - Click
Create Automation
.
The function entry point is main.py
following the structure of the speckle_automate_python_example.
The function serializes an automate_data.json
file with the required data to receive the Speckle data within a Blender subprocess running the Speckle Blender connector.
speckle_import.py
runs within the Blender context, receiving speckle data, applying material styalisation, replacing Speckle Rooms with point lights, and rendering each camera to the ./Screenshots
folder. Automate will then pickup and attach these renders as blobs to the automate result.
- Install the following:
- Run
poetry shell && poetry install
to install the required Python packages.
The code can be tested locally by running poetry run pytest
.
The code should also be packaged into the format required by Speckle Automate, a Docker Container Image, and that should also be tested.
- Learn more about SpecklePy, and interacting with Speckle from Python.