Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
d2753f1
Can send task to target machine (locally)
tiberiumboy Feb 19, 2025
4e1e70b
Update frontend codework.
tiberiumboy Feb 20, 2025
88cf552
Add WithId generics and apply to render and job store.
tiberiumboy Feb 27, 2025
c22fc05
Update content and model struct
tiberiumboy Mar 14, 2025
dd2c3ce
Fix gui bug of dc workers, impl. clear worker fn
tiberiumboy Mar 14, 2025
d0b4697
Fix job data struct that was preventing displaying properly
tiberiumboy Mar 14, 2025
49856d9
Remove extra code
tiberiumboy Mar 14, 2025
012bf70
Update job deletion logic. Corrected blender stdout
tiberiumboy Mar 16, 2025
42f157a
rewriting method impl.
tiberiumboy Mar 16, 2025
2fdfa62
ref changes in network
tiberiumboy Mar 17, 2025
ac4e26e
transferring machine
tiberiumboy Mar 19, 2025
2f9575a
rewriting network pattern
tiberiumboy Mar 22, 2025
75a68bc
Code reformatted
tiberiumboy Apr 5, 2025
7525ab4
Update codebase to functional code. Still WIP.
tiberiumboy Apr 9, 2025
b55c41a
transfering computer
tiberiumboy Apr 13, 2025
8173e80
Reducing network coupling
tiberiumboy Apr 17, 2025
ecc3ae3
Impl cli actions
tiberiumboy Apr 18, 2025
2f98410
Updating network traffic
tiberiumboy Apr 19, 2025
c2555b6
Changing computer
tiberiumboy Apr 20, 2025
5b953e9
Forgot last file changes
tiberiumboy Apr 20, 2025
3a1a9f3
switching computer
tiberiumboy Apr 20, 2025
678e391
transfering computer over
tiberiumboy Apr 26, 2025
d3343f7
transferring computer
tiberiumboy May 5, 2025
585a432
Working executable code
tiberiumboy May 5, 2025
4b1811b
transferring computer
tiberiumboy May 7, 2025
8f72c0d
File transfer protocol works again. Refactoring code to rely on DHT i…
tiberiumboy May 9, 2025
c6fbba8
Transfer computers
tiberiumboy May 10, 2025
afbfcef
transferring computer
tiberiumboy May 11, 2025
136dfc7
Updating render.py script
tiberiumboy May 12, 2025
65c02ec
Transferring computer
tiberiumboy May 14, 2025
431c569
Refactored Python Scripts + Config data
tiberiumboy May 15, 2025
658c312
Update files to include correct json parsing methods
tiberiumboy May 16, 2025
49c62ff
Refactored render.py, got blender working again
tiberiumboy May 21, 2025
fd9f248
CICD works - switching to trigger on main branch instead
tiberiumboy May 22, 2025
f5eaaf2
Switching computers
tiberiumboy May 23, 2025
884c628
major code refactorization
tiberiumboy May 31, 2025
9e5779d
Update task mode for row
tiberiumboy Jun 1, 2025
cae4702
Update sqlx table usage
tiberiumboy Jun 5, 2025
f89dd2d
impl. DAO for Task
tiberiumboy Jun 6, 2025
2501971
Reformat, update job sql table structure
tiberiumboy Jun 8, 2025
719d877
Remove BlenderHome, refactor Manager impl, and optimize PageCache usage.
tiberiumboy Jun 11, 2025
fbe05ae
Fix deleting job, left notes
tiberiumboy Jun 12, 2025
bec9a60
create advertise migration
tiberiumboy Jun 12, 2025
069cf45
Commiting because there's too many pigs at the coffee shop(starbucks …
tiberiumboy Jun 14, 2025
dedc2d3
transferring machine
tiberiumboy Jun 19, 2025
1fbaff1
impl. separation of starting job to handle multi-thread better.
tiberiumboy Jun 22, 2025
f18249d
Update readme, ignoring gen schema files
tiberiumboy Jun 22, 2025
cc24093
Got tauri app refresh list working again
tiberiumboy Jun 22, 2025
aa5313a
println cleanup. add notes. refactor
tiberiumboy Jun 22, 2025
05ac184
Refactor job methods, Update NodeEvent structure.
tiberiumboy Jun 23, 2025
0e11dfb
Refactoring network code once more...
tiberiumboy Jun 23, 2025
f24b61e
Replaced status event to use blender event instead
tiberiumboy Jun 24, 2025
ab35096
Moving to another computer
tiberiumboy Jun 29, 2025
133550d
impl open dir boilerplate
tiberiumboy Jun 29, 2025
a87386d
finalize get_relative_path design pattern
tiberiumboy Jun 29, 2025
fc18589
rename blender to blender_rs for submodules
tiberiumboy Jun 29, 2025
514a2f6
[switch]mbp->linux
tiberiumboy Jun 29, 2025
33b4807
Switching computers
tiberiumboy Jun 30, 2025
8c7683e
Display render image works
tiberiumboy Jun 30, 2025
ddbd6b9
image now appears
tiberiumboy Jun 30, 2025
0d529a6
refactor
tiberiumboy Jul 1, 2025
e1bfe61
Impl. Unit test, code formatted
tiberiumboy Jul 4, 2025
aa719fb
Clean up file solution - omit user generated contents
tiberiumboy Jul 5, 2025
16ac93a
Impl. unit test
tiberiumboy Jul 5, 2025
441a9ae
Revised IPC communications for unit test
tiberiumboy Jul 5, 2025
3b927a8
Code clean up + refactoring
tiberiumboy Jul 5, 2025
83fa6f6
App working state
tiberiumboy Jul 6, 2025
3155fba
Removing template file
tiberiumboy Jul 6, 2025
927f5e4
code clean up
tiberiumboy Jul 6, 2025
2a961e8
getting ready to push code changes before EOD
tiberiumboy Jul 6, 2025
5f3590e
Switching computer
tiberiumboy Jul 8, 2025
fa8d920
Impl unit test
tiberiumboy Jul 9, 2025
bc0a3d4
Fix unit test, now works as intended
tiberiumboy Jul 10, 2025
7bded49
Impl more unit test
tiberiumboy Jul 10, 2025
5e4d6c6
remove println statements
tiberiumboy Jul 10, 2025
b9bcdc8
Remove requestor as it's no longer needed
tiberiumboy Jul 10, 2025
2a54faa
impl. unit test for task
tiberiumboy Jul 11, 2025
f74730d
lint cleanup
tiberiumboy Jul 11, 2025
a49a7e9
Rewiring UI code to make more sense of space usage
tiberiumboy Jul 11, 2025
1b4ff35
switching computer
tiberiumboy Jul 13, 2025
77095de
resolve unit test issue.
tiberiumboy Jul 13, 2025
3dbfc31
switching computer
tiberiumboy Jul 13, 2025
a915445
Refactor job logic to make more sense and less ambiguousity
tiberiumboy Jul 14, 2025
d3ae00b
milestone progress
tiberiumboy Jul 18, 2025
da2d384
Remove live view
tiberiumboy Jul 20, 2025
17af172
uncommented delete blender - needs unit test
tiberiumboy Jul 20, 2025
d46a388
add get_url component
tiberiumboy Jul 20, 2025
ba52c9d
major changes -
tiberiumboy Jul 21, 2025
c71fe85
Add obsidian to checkout repo
tiberiumboy Jul 21, 2025
f979c28
Got import job dialog working. Cleaning up network code.
tiberiumboy Jul 27, 2025
1a67b74
Resolve merge conflcits
tiberiumboy Aug 1, 2025
d30981e
writing notes for myself on what to work on next
tiberiumboy Aug 1, 2025
16d1c24
Decouple cmd and render code.
tiberiumboy Aug 3, 2025
ec232cc
Remove redundant command events
tiberiumboy Aug 4, 2025
1a585b2
commit changes
tiberiumboy Aug 14, 2025
c9efd8a
bkp
tiberiumboy Aug 29, 2025
fba477c
bkp
tiberiumboy Aug 31, 2025
162d25d
bkp
tiberiumboy Sep 6, 2025
efaa4e0
bkp
tiberiumboy Sep 13, 2025
b80f5f8
Add makefile. Fix unit test. `make` and `make test` work
tiberiumboy Sep 13, 2025
f655173
unit test works again
tiberiumboy Sep 15, 2025
d85a4f9
set usemarkdown links true
tiberiumboy Sep 22, 2025
467936e
include footnotes + bases
tiberiumboy Sep 22, 2025
4232688
update docs
tiberiumboy Sep 22, 2025
d24bfb3
bkp
tiberiumboy Sep 25, 2025
866656c
bkp
tiberiumboy Oct 5, 2025
469d3d6
lint formatting
tiberiumboy Oct 5, 2025
f9c1855
bkp
tiberiumboy Oct 5, 2025
dd36d4f
bkp
tiberiumboy Oct 9, 2025
5924161
adding notes
tiberiumboy Oct 10, 2025
e2e18a9
formatting
tiberiumboy Oct 11, 2025
2f1fb6e
Working on getting client working with blender again
tiberiumboy Oct 13, 2025
9f49cc4
bkp
tiberiumboy Nov 16, 2025
886db64
client can render, partially works.
tiberiumboy Oct 16, 2025
4bc9f44
Adding completed render stack to db
tiberiumboy Oct 17, 2025
8fe3c84
Update obsidian docs
tiberiumboy Oct 20, 2025
39ea828
Removing println of json data file.
tiberiumboy Oct 20, 2025
81576d4
delete_blender will panic for macos, need to test this feature out fi…
tiberiumboy Oct 20, 2025
90a526d
Update obsidian workspace
tiberiumboy Oct 20, 2025
ab89879
Replaced Uninstall_blender with delete_blender function
tiberiumboy Oct 20, 2025
e9a5ef7
code refactor
tiberiumboy Oct 20, 2025
000d48f
Update obsidian
tiberiumboy Nov 16, 2025
c8dcded
expand listening logs for more info
tiberiumboy Nov 16, 2025
372e074
Update to use local modified xml-rpc dep
tiberiumboy Nov 29, 2025
ad19b61
Update obsidian
tiberiumboy Jan 2, 2026
c3ebc92
update args to use valid BlendFile struct
tiberiumboy Jan 25, 2026
0c603c3
Resolve merge conf. Add excalidraw. Might do mermaid plugin for md ch…
tiberiumboy Feb 1, 2026
337e7e1
testing something out
tiberiumboy Feb 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'publish'

on:
push:
branches: [ "main" ]
branches: "main"

jobs:
publish-tauri:
Expand All @@ -14,8 +14,9 @@ jobs:
include:
- platform: 'macos-latest' # for ARM based macs
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs
args: '--target x86_64-apple-darwin'
# Blender no longer supports Intel based macs. May phase out in the future
# - platform: 'macos-latest' # for Intel based macs
# args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04' # for linux distro
args: ''
- platform: 'windows-latest'
Expand All @@ -34,8 +35,9 @@ jobs:
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libewbkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

# TODO: Find a way to fix SQLX error: "set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache"
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ target/
*ServerSettings.json
Cargo.lock
*.env

# schemas always update and appear diff on every git changes
src-tauri/gen/*
blender_rs/examples/assets/*.png
src-tauri/.sqlx/
8 changes: 2 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
"name": "dbg Dev client",
"type": "lldb",
"request": "launch",
"program": "${workspaceRoot}/target/debug/blendfarm",
"program": "${workspaceRoot}/src-tauri/target/debug/blendfarm",
"args": [
// "build",
// "--manifest-path=./src-tauri/Cargo.toml",
// "--no-default-features"
"--client",
"true"
"client"
],
"cwd": "${workspaceRoot}",
// "preLaunchTask": "ui:dev"
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"rust-analyzer.showUnlinkedFileNotification": false,
"todo-tree.tree.scanMode": "workspace"
"todo-tree.tree.scanMode": "workspace",
"makefile.configureOnOpen": false
}
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
default:
cd ./src-tauri/
cargo tauri dev

build:
cd ./src-tauri/
cargo tauri build
# maybe a command to bundle a release and upload gpg keys / etc?

rebuild_database: .sqlx
cd ./src-tauri/ # navigate to Tauri's codebase
cargo sqlx db reset -y # create the database file
cargo sqlx prepare # create cache sql result that satisfy cargo compiler

test:
cd ./src-tauri/ && cargo test

clean:
rm -rf ./src-tauri/target ./src-tauri/
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@

This project is inspired by the original project - [LogicReinc](https://github.com/LogicReinc/LogicReinc.BlendFarm)

# A Word from Developer:
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.
## A Word from Developer:

This is still a experimental program I'm working on. If you find bugs or problem with this tool, please create an issue and I will review them when I can. Much of the codebase is experimental of what I've learned over my rust journey.

## TLDR

Run `make` from makefile directory in terminal - This will install dependencies, compile, build, and run Blendfarm from the releases folder. For more info, please read below.

### Why I created this application:

Expand All @@ -17,7 +22,7 @@ I humbly present you BlendFarm 2.0, a open-source software completely re-written

[libp2p](https://docs.libp2p.io/) - Peer 2 Peer decenteralize network service that enables network discovery service (mDNS), communication (gossipsub), and file share (kad/DHT).

[Blender](https://github.com/tiberiumboy/BlendFarm/tree/main/blender) - Custom library I wrote that acts as a blender CLI wrapper to install, invoke, and launch Blender application.
[Blender](https://github.com/tiberiumboy/BlendFarm/tree/main/blender) - Custom library I authored that acts as a blender CLI wrapper to install, invoke, and launch Blender application.

[Blend](https://docs.rs/blend/latest/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).

Expand Down Expand Up @@ -50,24 +55,28 @@ Blender's limitation applies to this project's scope limitation. If a feature is

## Getting Started

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.
Download the latest build from the [release](https://github.com/tiberiumboy/BlendFarm/releases) page. Verify the content using checksum. Then unpack, `chmod +x ./blendfarm` for UNIX users, and run `./blendfarm`. This launches BlendFarm's GUI Manager window. Passing the `client` argument will run the program as worker node. This mode consume your computer to install and run blender! There can only be one client instances per machine.

### TLDR:
### To compile

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)
Run `make` from `Blendfarm` directory. Instruction inside [Makefile](./Makefile) guides step by step instructions to navigate, run, and compile.

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`
<!-- I'm using sqlx framework to help write sql code within the codebase. This will help
with migrations to newer database version per application releases. Evidentably, the compiled application will create a new database in your user's config directory if it doesn't exist. However, opening this project without creating the database file will cause compiler errors. -->

*Note- For windows, you must encapsulate the version in double quotes!

To launch the application in developer mode, navigate to `./src-tauri/` directory and run `cargo tauri dev`.

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`
To run the client app - run the following command under `/BlendFarm/src-tauri/` directory - `cargo tauri dev -- -- client`

### Network:

Under the hood, this program uses libp2p with [QUIC transport](https://docs.libp2p.io/concepts/transports/quic/). This treat this computer as both a server and a client. Wrapped in a containerized struct, I am using [mdns](https://docs.libp2p.io/concepts/discovery-routing/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](https://libp2p.io/) if this interest your project needs!
Under the hood, this program uses libp2p with [QUIC transport](https://docs.libp2p.io/concepts/transports/quic/). This treat this computer as both a server and a client. Wrapped in a containerized struct, I am using [mdns](https://docs.libp2p.io/concepts/discovery-routing/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 computer talks to another computer), 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](https://libp2p.io/) if this interest your project needs!

## Developer blogs
I am using Obsidian to keep track of changes and blogs, which helps provide project clarity and goals. Please check out the [obsidian folder](./obsidian/blendfarm/Context.md) for all of the change logs.

<!-- Hidden from view for developer remarks
Testing out peer 2 peer over two linux box. One of the machine hasn't been update/upgrade in awhile, but reported an issue about missing PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg_config --libs --cflags glib-2.0 glib-2.0 - the pkg-config command could not be found. Install via apt install pkg-config resolve this one problem, but more likely you need to preconfigure PKG_CONFIG_PATH in environment variable.
Expand Down
9 changes: 9 additions & 0 deletions app_flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The application can be start up in two ways. One through a GUI interface, which launches the manager. The manager sole responsibility is to provide blender file and task associated with to distribute across network nodes. The other mode is the client, which is treated as a worker to receive the task and begin the work process.

How it establish connections across the network, the manager broadcast availability through UDP broadcast upon start, then listen for responses. The client will receive the response from the UDP only if the client is exhausted of remaining tasks. However, the client may advertise it's availability to present awareness to the manager. This settings is configurable within the app configuration file. This documentation is created to clarify the design application flow processes looks like. The visual representation below represent the schematic code diagram.

```mermaid
graph TD;
A-->B;
B-->A;
```
17 changes: 0 additions & 17 deletions blender/examples/test/main.rs

This file was deleted.

4 changes: 0 additions & 4 deletions blender/src/lib.rs

This file was deleted.

3 changes: 0 additions & 3 deletions blender/src/main.rs

This file was deleted.

11 changes: 0 additions & 11 deletions blender/src/models.rs

This file was deleted.

23 changes: 0 additions & 23 deletions blender/src/models/blender_peek_response.rs

This file was deleted.

165 changes: 0 additions & 165 deletions blender/src/models/blender_render_setting.rs

This file was deleted.

Loading