Building UE4 source to render in headless mode

Hi.I would like to use UE4 in a headless mode.By “headless” I mean,that I want to render not to a display,but to a texture which I can then store to disc,send over network,etc.So the question is whether I have to hack into engin’s source,locate the framebuffer,read the final frame to CPU and disable blit into display,or there is some compiler flag which can build the engine to be run in headless mode.With the first option I see the problem,where it is not enough to read the frame buffer data,but the context init,at least on Linux, should also be headless(probably using egl or pbufer),because when running on a headless server it will probably fail to create display based context.All that means I need also to change the way UE create the OpenGL context.Any advice here?

1 Like

Hi, I am trying to do exactly the same here. Did you make any progress? Is there any way of getting this to work without modifying the engine’s source code?

It took me a while to find for this, but for anyone still searching for this answer, since Unreal version 4.14 headless rendering has been supported on Linux. You shouldn’t have to change any settings, the executable should just be able to run. Reference these links for more info:

1 Like

Hi Nick. This is an old one but I am still curious to know: Once the headless mode is set, is there a default setup for where the frames are stored? Or it is something I have to configure inside the application?Thanks.

1 Like