Download

Generating Rendering Server Side

Is it possible with Unreal Engine 4 to generate a static image (png) from a scene on the server?

I would like to make a web app where users can provide some parameters and then use Unreal Engine to generate a scene based on these parameters. Is this use case possible? Any suggestions on how to go about doing this?

I’m far from knowledgeable about UE4 yet, but I’m a web developer and maybe I can help clarify some requirements.

Do you need it to run headless? (Without a window visible on some screen, somewhere?) Or can it pop up a window for a moment, make the image, and then close the window?

If so, then it’s probably not too hard to do what you want. I do wonder if it’ll be fast enough for what you want, though. Depending on what you’re doing, it might be a lot quicker to have an already-running instance of UE4 with the scene you want to re-render with changes, and just send it a message to make a new render. It’ll really depend on how detailed you’d want to get.

How I’d set it up in the first case:

Browser would contact the server and send info to a script server-side. The server-side script would either run something on the same box, or send a message to a remote box that would run UE4 with command-line parameters detailing what you want done, and where the output should go. After it finishes running, the image is returned to original server (if necessary) and then the server-side script would move it (if needed) and give the URL back to the app in the browser.

For the second case, there’d need to be some way to have the server-side script talk directly to the UE4 instance, but I’m pretty confident I could figure that out, too.

At any rate, I’m 99% certain it can be done because UE4’s source is available and it could be hacked in, if needed. I’m 90% certain no source code modifications would be necessary, though.

I would prefer headless running on a Linux Ubuntu server.