Code Monkey home page Code Monkey logo

azure-batch-apps-blender's Introduction

Azure Batch Apps Blender Sample

Warning - Code currently being re-written

This sample is based on the now-deprecated Azure Batch Apps service. The Blender sample is currently being re-written to work directly against Azure Batch. This updated version of the code can be accessed in the following fork while it is under-going development: https://github.com/annatisch/azure-batch-apps-blender/tree/dev/.

Please check the issues forum for guidance on using the in-development code and to report any bugs.

Summary

Microsoft Azure Batch Apps is an Azure service offering on-demand capacity for compute-intensive workloads. This sample uses the Azure Batch Apps SDK and the Azure Batch Apps Python client to show how one could set up a cloud-based rendering platform using Blender.

The sample involves two parts, the cloud assembly project, and the Blender client project for job submission. For more information on Batch Apps concepts, terms, and project structure check out this article.

The client project is a Python 'Addon' for Blender, to allow for a seamless user experience for submitting render jobs to the cloud from within Blender.

The compiled components can be downloaded in the release.

License

This project is licensed under the MIT License. For details see LICENSE.txt or visit opensource.org/licenses/MIT.

Blender

Blender is a free and open source 3D animation suite. It supports the entirety of the 3D pipeline - modeling, rigging, animation, simulation, rendering, compositing and motion tracking, even video editing and game creation. Advanced users employ Blender's API for Python scripting to customize the application and write specialized tools; often these are included in Blender's future releases. Blender is well suited to individuals and small studios who benefit from its unified pipeline and responsive development process.

For more information and to download Blender, visit blender.org.

Building and Installing the Addon

To package up the addon, zip up the Blender.Client/batchapps_blender directory. Alternatively set Blender.Client as the start-up project and run the solution. This will zip up the addon into Blender.Client/build

To install the Addon:

  1. Run Blender
  2. Open File > User Preferences
  3. Navigate to the Addons tab
  4. Click 'Install from File...' at the bottom of the dialog window.
  5. Navigate to and select the packaged client zip.
  6. The Addon 'Batch Apps Blender' will now be registered under the 'Render' category. Once located, select the check box to activate the Addon.
  7. Once activated, the Addon UI will appear in the 'Render Properties' panel - by default, in the lower right corner of the screen.

Addon Logging and Configuration

The sample addon logs to both Blender's stdout and to file. By default this log file will be saved to $HOME/BatchAppsData. This directory is also the location of the Addon configuration file.

This directory, the config file to use, and the level of logging detail are all configurable within the Blender UI. The authentication configuration settings of the file can also be overridden in the Blender UI.

  1. Run Blender
  2. Open File > User Preferences
  3. Navigate to the Addons tab
  4. Either search for 'Batch Apps Blender', or navigate to the Addon under the 'Render' category.
  5. Select the arrow next to the Addon to open the details drop down - here you will find info on the version and installation directory.
  6. Listed here you will also find the configuration preferences. If modified, click 'Save User Settings' at the bottom of the dialog window (Note: this will also cause the Batch Apps Blender Addon to be activated on Blender start-up).
  7. Once saved, restart Blender for the changes to take effect.

azure-batch-apps-blender's People

Contributors

annatisch avatar microsoft-github-policy-service[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-batch-apps-blender's Issues

Simplify "install package into Blender" instructions

The instructions in the readme file (shown on the front page) suggest installing the Python package and then copying into Blender's folder, or extracting the package into the location. (Example of someone needing more help with the instructions.)

These could be simplified to a single command line with pip install --root <path>. I don't have it all set up, so I can't test it to figure out exactly what <path> should be, but that should be able to install directly into the required location.

Uploading the Application to Your Batch Apps Service

In step 6 of the sample in this heading it states that you should have an option to upload the cloud assembly except that I do not see that option. I only have the Application Package option. Is there something else I need to do?

Test with linked objects and materials.

I tried to render a .blend file with one linked (DNA) and one local object (Cube).
Using Cycles on a 3 node Standard A1 machines running Ubuntu (I run Windows 10 local machine)
The job was started from Blender 2.78a (will try 2.78b next time).
Jobs on node seemed fine (it uploaded all linked .blend files)
But the result seemed to be missing stuff.
Azure result:
linkedtest
Local result:
localresult
Files on Node:
filesonnode

Next test was with all elements made 'local'.
It took a bit longer to render on the A1 CPU then on my local 580 GPU, but the result was fine!
resultlocaldoubledna

Any tips on what to do with linked files/ elements?

Azure Portal doesn't have a Cloud and Application, +

Hi,

Can't raise issues in https://github.com/annatisch/azure-batch-apps-blender repository, so raising it here.

From the Readme file Uploading the Application to Your Batch Apps Service I was expecting the ability to upload 2 zip files, but Azure Portal seems to allow only an Application to be uploaded
image

Also,
I don't know where can I get those values
image
From the docs
image
But in Azure Portal I haven't seen any Unattended Account button or Unattended Key,
Any idea?

Thanks,
D

The service is rendering all frames blank

After configuring everything, uploading all my assets and setting the service to render I realize now that all frames are being rendered blank. Same project renders fine on my machine. Is there any additional setting I need to do?

Having problems making it run

Followed all steps bit it's not working. Two issues:

1-When uploading blender.zip to the portal the upload goes all the way to the end and then tells me there was an error uploading the file. It won't tell me what error or give me any details. But if I refresh the page the file is there. Did it upload or not?

2-Installed the addon but it keeps showing "addon failed to load correctly". I reviewed all configurations, everything looks fine but it keeps showing me that error. The console won't show anything in addition. How do I find out the reason for the failure?

Thanks

The service can't render animations

It looks like I'm forced to render only PNGs. So what's the approach if you have an animation with thousands of frames? Render them as PNG, download everything and then stitch together as a single animation?

Blender 2.8?

Please upgrade addon for blender 2.8. It's not working for 2.8. The python code for blender has changed from ground level

Repository needs to be archived or deleted

@annatisch This very old repo is causing compliance issues with Microsoft admin policies. Could you please:

  1. assign internal owners/maintainers (should be an email about this somewhere); or
  2. archive the repo; or
  3. delete the repo.

Sorry to be a pest - thanks!

Assets unable to upload

Not sure why but in I keep getting unable to upload assets errors
For example when trying to render the "Classroom" demo available on the blender site
https://www.blender.org/download/demo-files/

See blenders output

Batch: [INFO] uploading classroom.blend
Batch: [INFO] Checking if asset is already uploaded...
Batch: [INFO] Retrieved uploaded assets: ['classroom.blend']
Batch: [INFO] Uploaded classroom.blend_9fdbe30c8c9365f63ffd478c629abcbe: False
Batch: [INFO] uploading render.py
Batch: [INFO] Checking if asset is already uploaded...
Batch: [INFO] Retrieved uploaded assets: ['render.py_42eacd44c5ff271ed7af6e7989ec19ac']
Batch: [INFO] Uploaded render.py_42eacd44c5ff271ed7af6e7989ec19ac: True
Batch: [ERROR] classroom.blend: The operation did not complete (write) (_ssl.c:1846)
Batch: [ERROR] Error occurred: Some required assets failed to upload.

Azure new portal, miss match client ID

2016-06-15 13:14:37,965 [ERROR] exceptions: InvalidConfigException: Unattended Account must be in the format 'ClientID=abc;TenantID=xyz'

I am seeing a problem with the new portal, as some of the features are not matching configurations with blender.

Can you let me know, how do I get the Unattended Account and account ID?? in the NEW azure portal???

batched blender - dll load failed

Dear Annatisch,

I'm trying to install Batched Blender 0.2.0 for colleague who's doing eLearning videos with blender. The situation is that i installed it on my computer without any issues but trying to install it on his laptop, which is an office note book, hence same windows version and I got an Error similar to the one, which has been already discussed here for Azure-Batch-Apps-Blender.

Do you have an idea how to fix this?

blenderbatcherror

Issues with this release

I am not an experienced Python Developer. I've tried to follow your instructions but when I check the add-on to enable it, I get various imported modules missing.

I need directions on just what to install in my Visual Studio Python environment vs, what to install in the "Blender Python" environment. I have used your pip command and gotten indications of success. I'm using it within the visual studio 2015 Python environment to install the azure modules into the Blender environment.

Is there a licensing issue? Why not just pre-build everything and post the ZIP like most BLENDER developers provide add-ins ready to install?

When trying to install the add-on I get this:

5, in
from batched_blender.submission import BatchSubmission
File "C:\Users\aknit\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\batched_blender\submission.py", line 41, in
from batched_blender.utils import BatchOps, BatchAsset, BatchUtils
File "C:\Users\aknit\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\batched_blender\utils.py", line 35, in
import isodate
ImportError: No module named 'isodate'

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\modules\addon_utils.py", line 330, in enable
mod = import(module_name)
File "C:\Users\aknit\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\batched_blender__init__.py", line 41, in
from batched_blender.shared import BatchSettings
File "C:\Users\aknit\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\batched_blender\shared.py", line 35, in
from batched_blender.submission import BatchSubmission
File "C:\Users\aknit\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\batched_blender\submission.py", line 41, in
from batched_blender.utils import BatchOps, BatchAsset, BatchUtils
File "C:\Users\aknit\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\batched_blender\utils.py", line 35, in
import isodate
ImportError: No module named 'isodate'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.