Hey guys, I just wrote a little tutorial on my indie game development blog but since I have literally zero readers yet I’ll post it here as well so that it might be of some use to someone.
Is UE4 Distributed Rendering Worth It?
There are countless tutorials how to set up UE4 (Unreal Engine 4) to distrubute lightmaps tasks across a network, but I wasn’t interested in the ‘how’. I wanted to know if it’s even worth all the hassles associated with DR (Distributed Rendering). My curiosity got the best of me so I dove in to find out!
After a life of experiments with buggy DR’s my question was “should I even bother?”. The time I’ve previously spent troubleshooting mysteriously idle render machines has by a hundred-fold exceeded the time I’ve gained from its marginally faster renders.
My results have been disappointing regardless of software (primarily I’ve used Mental Ray and V-Ray) yet one little fact made me wish to give UE4’s DR a try. Despite having frequently complained about poor documentation for the Unreal Engine, I must admit I’ve never once been disappointing with the software. Despite DR probably being a low priority feature, I had a feeling Epic might leave me jaw-dropped impressed as usual. I was not wrong.
Lacking a pro render farm now that I’m taking a little break from the industry, all I had to test on was spare hardware lying around the house. I was lucky enough to find a 5 year old laptop with a surprisingly fast quad-core i7 processor.
It’s a surprising rule of nature that if you connect a fast computer to a slower render farm, the render farm will actually SLOW DOWN the render as opposed to speed it up. The logic of this escapes me, but is something I’ve had verified from personal experience trying to use DR in Mental Ray.
Still, I decided to hook up this aging laptop to my monster machine to see if it could contribute to my lightmap renders.
Once again Unreal had found a way to impress me. My 33 minutes lightmap render was cut to a mere 20 minutes with a little help from an aging laptop.
The fact that it’s time consuming to set up DR is an unavoidable law of nature, but at least in this case most problems were merely Windows networking issues. Anything Epic-related ran smooth as could realistically be expected.
Since I don’t wish to set up an internet connection to my render farm, it would have been helpful if Epic could make a swarm installer complete with the requisite offline installers for ‘Visual C++ Redistributable Packages’ and ‘DirectX’. But since DR is not a mainstream feature I wouldn’t expect such streamlining.
With Unreal’s documentation being vague as usual, I completely followed the advice from this tutorial on DR for UDK.
Things to Keep in Mind
Each Task Split per Object
At first I couldn’t get it to work, al though my render machine was pinging properly it was behaving mysteriously idle. It turns out there was no bug involved, it was merely my test scene too small for Lightmass to send across the network.
Despite having turned up my values high enough to warrant a long 10 minute render, the scene itself was too small for DR. Al though I don’t know the code behind the curtain my guess is that the lightmap is processed per actual object. So if you have more CPU cores than objects in your scene, it doesn’t matter how heavy these objects are, they will all be assigned to the first available cores they can find. Once I moved to a larger scene the objects were finally offloaded to my render machine.
Swarm/Lightmass will Crash if out of RAM
Despite my found laptops surprisingly powerful CPU, the machine showed its age in its limited 6 gb of RAM. I falsely assumed my virtual memory would pick up any slack, but was surprised to find the process crashing the second the RAM usage reached the peak of ‘Windows Task Manager’.
Apparently Lightmass is designed to only use dedicated RAM even if it means crashing like a kamikaze pilot. This meant I couldn’t completely dedicate the job to my render machine as its tiny 6 gb of RAM was quickly consumed. However when I split the chore between my main and render machine the RAM burden was split equally as well.
Do you need to Share your Textures Folder with your Render Machine?
One of the rogue forum posts online had me convinced I needed to share my textures folder with my render machine. Al though making perfect sense, this proved not to be the case.
So there you go, finally a software with a DR that actually works! My inner geek is radiating with joy. Hope this little article was to any help or inspiration.