Download

Swarm - What is it and how to use it?

Apologies if this is a newbie question but my background is coming from Linux and I don’t have any UDK experience.

I’ve searched the wiki and these forums but can’t find basic info on Swarm.

So from usage and Google searches re UDK I am guessing that Swarm is a program within the Unreal4 engine that manages mulitple clients to undertake distributed compilation of primarily Lightmass solutions but possible other aspects of maps.

My questions for you fine folks are:

  1. Am I correct above in describing Swarm or does it do something differently than this?

  2. Is there documentation available for its set up or operation?

  3. Do I need to install the full Unreal Engine on the distributed clients or is there a sub-set I can use (what is the minimum client to place on slaves?)?

  4. [Unlikely I know but…] Is there Linux version of the client? If not, has anyone had success using a windows VM under Linux?

  5. To start the client do I just run the “SwarmAgent.exe” found on my Windows Box at C:\Program Files\Unreal Engine\4.0\Engine\Binaries\DotNET ?

<I can’t answer #5 yet because when I execute the executable I get a “Register for Visual Studio C++ dialog box” - Made me laugh that an executable needs registration with Microsfot to run, it has been a long time since using Windows :wink: >

Cheers.

BTW once I’ve got some solid knowledge of the above I’ll happily update the Wiki with the info so others can use it.

1: Nearly correct because Swarm can only be used to build lighting. It wont deal with any other thing. Swarm manages light building locally and can also distribute the lighting build to remote machines in your network.

2: You dont need to setup anything (If you are building locally only). When you press Build Lighting Unreal automatically runs swarm and does everything for you. Otherwise if you plan to use other computers see #5.

3: I think you need to install full Unreal Engine on clients you wish to use. But dont quote me on that because when i used distributed rendering in UDK i had it installed on both my computers.

4: I cant comment on this since i never used Linux.

5: For distributed rendering see this tutorial. Although it was made for UDK, the same rules apply for UE4 swarm.

Dingo_aus,

Could you please post this on AnswerHub? After writing up a response here I realized that my reply may be more appropriate and useful there, so others can find it, too.
Please post a link to the AnswerHub thread here. Thanks!

Yes, Swarm (short for UnrealSwarm) is a standalone C# application that distributes units of work across multiple machines on the network. Currently, Swarm is only used in conjunction with Lightmass to pre-compute lighting for levels, but the application itself is task agnostic, which means that it can work with any other type of task as well. We just haven’t taken advantage of that yet.

UnrealSwarm was created for Unreal Engine 3, and it looks like the documentation hasn’t made it into the UE4 Docs web site yet. That being said, Swarm hasn’t really changed (except for a few bug fixes), so the old documentation still applies. You can find it here:

http://udn.epicgames.com/Three/Swarm.html
http://udn.epicgames.com/Three/DevelopmentKitContentCreation.html#Swarm%20Setup

No, you do not need to install Unreal Engine on the Swarm agent machines. Swarm will automatically transfer all files (including binaries) that are needed to process a given job. The easiest way is to copy the /Engine/Binaries/DotNET/ directory from an existing UE4 installation to a new computer. Then follow the instructions on the pages linked above.

UnrealSwarm currently only runs on Windows operating systems. You may be able to get it to run in a Windows emulator on Linux. We briefly had a version that worked on MacOS, but newer versions of Mono introduced some breaking changes that we haven’t fixed yet. We are planning to rewrite UnrealSwarm in C++, and at that point it will also become cross-platform and seamlessly work on Linux and MacOS. There is no timeline for this project yet, but it will probably happen this year - possibly as early as this Summer.

Yes.

You may be missing some prerequisites for UnrealSwarm. Make sure that the latest version of the .NET Framework is installed on your computer. You may also need the Visual Studio redistributable package. The easiest way to install prerequisites is to install /Engine/Extras/Redist/en-us/UE4PrereqSetup.exe

https://answers.unrealengine.com/questions/27550/swarm-what-is-it-and-how-to-use-it.html

Whilst it seems the UE4 Editor can invoke the SwarmAgent happily, I don’t seem to be able to execute it stand-alone.

I assume that maybe updating to the very latest dotNet version might fix this (issue is with GUI, which dotNET runs).