Skip to content

JR-Morgan/blender-automate

Repository files navigation

Blender <> Automate

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.

Using this Speckle Function

  1. Create a new Speckle Automation.
  2. Select your Speckle Project and Speckle Model.
  3. Select the existing Speckle Function named blender-automate.
  4. Click Create Automation.

Examples

SpeckleView-top down -- d0f1b976d35dba744dbc701bb18c88a5 SpeckleView-Arieal -- a8d2f4badd4ba018da45064fb3cae3b5 Living Room -- 0fd2a68d955f9228584a2c36ef145c6b

More examples!!

SpeckleView-Courtyard -- 6494c467aeaa7275bb23ad221c24612d SpeckleView-Front Elevatio -- bfc2b6601ef60662cd0246eeb94f3b39 From Yard -- bc71d60642872c831c4595d6423d0073 Kitchen -- e8c66dd46cb37e80c6117c121060113a

Repo Structure

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.

Developer Requirements

  1. Install the following:
  2. Run poetry shell && poetry install to install the required Python packages.

Building and Testing

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.

Resources

  • Learn more about SpecklePy, and interacting with Speckle from Python.

About

Speckle Automate for running blender screenshot tool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published