LogicReinc / LogicReinc.BlendFarm

A stand-alone Blender Network Renderer
GNU General Public License v3.0
412 stars 35 forks source link

Apple Silicon version #92

Open Macwelshman opened 7 months ago

Macwelshman commented 7 months ago

It's really important that an ARM 'Apple Silicon' native version is made available. The switch was made about 3 years ago now and new software should always be at least compatible with both if not native.

LogicReinc commented 7 months ago

Main reason it is not made yet is because I do not own an ARM Macbook (and no need to). Adding support is fairly simple, I just have no ability to actually test it. I thought ARM Macbooks had backwards compatibility for x86 builds, and expected most Macbook users to use powerful external machines for rendering anyway (meaning there is no practical performance downside to running it in x86 mode).

Another option which would be fairly easy to make is to keep all current stuff as is, but only add support for Blender ARM builds. This would run the performance critical parts in ARM, and keep everything else in x86.

If you could confirm that the current binaries work fine on a ARM Macbook, I can atleast attempt to add the ARM Blender binary support quick, it should be fairly low effort. I could even spin out a ARM Blendfarm and you could test it.

Macwelshman commented 7 months ago

Thanks for your quick response. I'm running a Mac Studio M1 Max and would be happy to help in any way. I'm not a coder but would be happy to test builds.

Macwelshman commented 7 months ago

Apple Silicon Macs are compatible with x86 via the Rosetta translation layer. It won't be long before this won't be available anymore and there are performance compromises when translating from x86 to ARM. Native is always best.

LogicReinc commented 7 months ago

I'm building an OSX-ARM64 version which ill post here soon-ish. This will NOT use Blender ARM64 yet. This is solely to check if the binaries for BlendFarm itself (and especially its dependencies) can be ARM64 without changes.

Afterwards I can see if I can have it download ARM64 Blender (so far doesn't seem like an issue, but you never know with these things).

Macwelshman commented 7 months ago

The current version appears to be running OK on the Mac. Does it need to download Blender or can you point to an already installed version? I have to server running on my PC but it's taking an age to download.

Macwelshman commented 7 months ago

On PC got an "Exception on extraction: One or more errors occurred. (Received an unexpected EOF or 0 bytes from the transport stream)" error. The PC is a secondary machine so I'm not as knowledgable with the setup as I am on the Mac.

LogicReinc commented 7 months ago

BlendFarm by default downloads Blender on its own. You can define "custom" Blender versions but because all versions of Blender should be the same across all machines, it is generally not recommended, and more effort.

If you do really want to use a custom installation, click the "Add Custom Version" button in the client. It mostly guides you through it.

The error you got sounds to me like the download failed?

LogicReinc commented 7 months ago

Here is a ARM64 build with the stuff mentioned before. If you can see if it works, that would be great. If it doesn't work, I'll probably postpone atleast the native executables, but will still look into supporting Blender ARM64. https://github.com/LogicReinc/LogicReinc.BlendFarm/raw/main/.data/temp/BlendFarm-1.1.5-OSX-ARM64-v1.zip

Macwelshman commented 7 months ago

I get this.

Screenshot 2023-11-18 at 17 39 05
Macwelshman commented 7 months ago

Not sure if this is relevant but there seems to be a discrepancy with files within the app bundle.

Screenshot 2023-11-18 at 17 38 19 Screenshot 2023-11-18 at 17 38 33
LogicReinc commented 7 months ago

I'm aware of the discrepancy, which might be because these libraries aren't available for ARM64. Or they are embedded differently. Was wondering if it would at least boot, as most of those libraries are related to image manipulation. I'll leave this hanging for a bit then. Tomorrow I'll see if I can make the Blender ARM64 work.

LogicReinc commented 7 months ago

Hey @Macwelshman, could you give this version a shot: https://github.com/LogicReinc/LogicReinc.BlendFarm/raw/dev-v1.1.6/.data/temp/BlendFarm-1.1.6-OSX64.zip This one should allow you to use ARM-based Blender. If things work correctly, during bootup, you should see in the console "Server OS: macOS-arm64", if you see something else here, it means it doesn't properly detect ARM.

If it does detect it correctly, try connecting to the Local node, and see if it downloads the Blender version correctly. If everything goes as it should, it means Blender itself should run in ARM64, meaning performance should be pretty good as expected.

Macwelshman commented 7 months ago

Hi

I’ve run the latest build and it loads fine. Not sure how I can confirm whether it has downloaded the arm version or not. You mention the console but I cannot find a way to open it. I’m sure on an earlier build there were console icons to access it.

I cannot test a render as I’m getting an error from the PC server. When I connect by clicking the red circle it presents an error (see attached). In the PC console it reports the following:

"Received checkProtocol [58] from 192.168.0.3:61900 TCP listening exception: Expected header of length 24, found 0”

If you could let me know how to proceed I will test further.

Tegards Ian

On 19 Nov 2023, at 18:43, LogicReinc @.***> wrote:

Hey @Macwelshman https://github.com/Macwelshman, could you give this version a shot: https://github.com/LogicReinc/LogicReinc.BlendFarm/raw/dev-v1.1.6/.data/temp/BlendFarm-1.1.6-OSX64.zip This one should allow you to use ARM-based Blender. If things work correctly, during bootup, you should see in the console "Server OS: macOS-arm64", if you see something else here, it means it doesn't properly detect ARM.

If it does detect it correctly, try connecting to the Local node, and see if it downloads the Blender version correctly. If everything goes as it should, it means Blender itself should run in ARM64, meaning performance should be pretty good as expected.

— Reply to this email directly, view it on GitHub https://github.com/LogicReinc/LogicReinc.BlendFarm/issues/92#issuecomment-1817942626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKOFF5BSHTTDVQAYNZYAC7TYFJHNVAVCNFSM6AAAAAA7RB43VGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXHE2DENRSGY. You are receiving this because you were mentioned.

Charmandrigo commented 7 months ago

I personally did a test and works fine, BUT I believe the app downloads the Intel version of blender instead of the ARM one. Doesn't matter anyways since I keep using the main version I have installed for editing, I rather not use my M1 mac to render so I can only use it to visualize the updates rendered in real time as I save my project and watch it being rendered on my nodes

Macwelshman commented 6 months ago

Happy New Year!

Is there any news on the Apple Silicon version of Blend Farm?

I’d love to test out any further developments.