This project is inspired by the original project - LogicReinc
This is still a experimental program I'm working on. If you find bugs or problem with this tool, please do not heistate to create an issue, I will review them when I get to the next milestone step.
Learning 3D animation back in college, there exist a priorietary application used by Autodesk that allows network rendering possible on school computer called Autodesk Backburner that came with Autodesk foundation that saved me many hours of rendering shots for my school projects. When Blender soar through popularity among the community and industry, I shifted my focus to use Blender 3D tool instead of using Autodesk 3ds Max and Maya. It wasn't until I realized that Blender, out of the box, does not have any network rendering solution similar to Autodesk backburner, I realize this was the piece that is still missing from this amazing open-source, industry leading, software tool. Digging through online, there are few tools out there that provides "good enough", but I felt like there's so much potential waiting to be tapped into that unlocks the powertrain to speed development all the way to production velocity by utilizing network resources. I humbly present you BlendFarm 2.0, a open-source software completely re-written in Rust from scratch with memory safety in mind, simplified UI for artist friendly, and easy to setup by launching the application with minimal to no experience required. Thanks to Tauri library, the use of this tool comes into three separate parts -
Tauri - Frontend UI interface for the application, as well as Rust backend service that glue all of the API together.
libp2p - Peer 2 Peer decenteralize network service that enables network discovery service (mDNS), communication (gossipsub), and file share (kad/DHT).
Blender - Custom library I wrote that acts as a blender CLI wrapper to install, invoke, and launch Blender application.
Blend - Used to read blender file without blender application to enable extracting information to the user with pre-configured setup (Eevee/Cycle, frame range, Cameras, resolution, last blender version used, etc).
The overall level of how the network works can be seen below:
The GUI will submit a gossip message to all of the connected render node, having the blend file available to download. The node will then kick off a background task to handle the job process. This will interface with the blender library to check for the blender installation. If the node doesn't have the proper blender version, it will ask other peers on the network for matching blender version to reduce network traffic from the internet. Afterward, the blender library will invoke the command to start the job. The library outputs status to provide back to the host for real time updates and progress check. Once Blender is completed with the render, the application will receive the notification and publish the completed render image for the host to obtain the image.
For new users and anyone who wants to get things done quickly. Simply run the application. When you run the app on computers that will be used as a rendering farm, simply navigate to the app and run as client instead. This will minimize the app into a service application, and under the traybar, you can monitor and check your render progress. To launch the GUI interface from source - simply run from BlendFarm/ directory cargo tauri dev to run in development mode or cargo run build for production lightweight shippable mode.
For those who wish to run the tools on headless server and network farm solution, this tool provide ease of comfort to setup, robust dialogs and information, and thread safety throughout application lifespan. To launch the application as a client mode simply run the following command inside src-tauri/ directory:
cargo run -- client
[ ] Pipe Blender's rendering preview [ ] Node version distribution - to reduce internet traffic to download version from source. [ ] File distribution for Blender version for other node to reduce INternet download traffic using DHT/Provider service from Kademila/libp2p
Blender's limitation applies to this project's scope limitation. If a feature is available, or compatibility to run blender on specific platform - this tool will need to reflect and handle those unique situation. Otherwise, this tool follows Blender's programming guideline to ensure backward compatibility for all version available.
There are several ways to start; the first and easiest would be to download the files and simply run the executable, the second way is to download the source code and compile on your computer to run and start.
First and foremost - this commands may be subject to change in the future. (Need to find a better way to handle Clap subcommand with tauri's cli plugin - for now, I'm treating it as an argument)
First - Install tauri-cli as this component is needed to run cargo tauri command. Run the following command:
cargo install tauri-cli --version ^2.0.0-rc --locked
*Note- For windows, you must encapsulate the version in double quotes!
To run Tauri app - run the following command under /BlendFarm/ directory - cargo tauri dev
To run the client app - run the following command under /BlendFarm/src-tauri/ directory - cargo run -- client
Under the hood, this program uses libp2p with QUIC transport. This treat this computer as both a server and a client. Wrapped in a containerized struct, I am using mdns for network discovery service (to find other network farm node on the network so that you don't have to connect manually), gossipsub for private message procedure call ( how node interacts with other nodes), and kad for file transfer protocol (how node distribute blend, image, and blender binary files across the network). With the power of trio combined, it is the perfect solution for making network farm accessible, easy to start up, and robost. Have a read into libp2p if this interest your project needs!