Runtime screenshots with custom name/res/UI ?

Hi,

I can’t find a possibility to take a screenshot ingame while both specifying the resolution and displaying the UI.

A brief summary of what i found in all my googling:

  • Console command “highresshot” allow to choose the name and the res, but can’t display the UI
    Taking Screenshots | Unreal Engine Documentation

  • FScreenshotRequest let us choose the name and has a bool for displaying the UI, but won’t let us choose the resolution
    FScreenshotRequest | Unreal Engine Documentation

  • Then there’s the mysterious FHighResScreenshotConfig
    FHighResScreenshotConfig | Unreal Engine Documentation
    This one seems to be linked to the editor, and i couldn’t find a way to correctly use it with the two previous ones.
    Apparently it used to have a “SaveImage” fonction that was popular but was removed a few version ago.
    So now people on the net seem to use it to make their own screenshot function, manipulating textures and file saving functions.

What’s more puzzling (only tried in PIE, not in a packaged game), it looks like FHighResScreenshotConfig partially affects the others, but not completely.
For example:



// generate the correct file path with an incorrect resolution (not 400x200), and the UI isn't there (of course)
GetHighResScreenshotConfig().SetFilename(MyFilePath);
GetHighResScreenshotConfig().SetResolution(400, 200);
ConsoleCommand("HighResShot");
//ConsoleCommand("HighResShot 400x200"); // corect name MyFilePath and correct res, but no UI

---------------------------------------

// when specifying nothing, the 3 options are well used but the resolution is the native one
FScreenshotRequest ThisScreenShotRequest;
ThisScreenShotRequest.RequestScreenshot(SomeOtherFilePath, true, true);

---------------------------------------

// generates a file named MyFilePath, with the requested resolution (400x200), but no UI:
// when specifying GetHighResScreenshotConfig, none of the FScreenshotRequest options is taken into account
GetHighResScreenshotConfig().SetFilename(MyFilePath);
GetHighResScreenshotConfig().SetResolution(400, 200);
FScreenshotRequest ThisScreenShotRequest;
ThisScreenShotRequest.RequestScreenshot(SomeOtherFilePath, true, true);

So it looks that GetHighResScreenshotConfig can affect both HighResShot and GetHighResScreenshotConfig, but incompletely.

Anyone with a bit more experience or knowledge of the engine would know how to create a screenshot with the following features ?

  • a custom path
  • a custom resolution
  • the UI displayed

Thanks
Cedric

Cedric, have you solved this problem? I’m facing the same thing and so far had not able to find any working solution yet.

I’m also looking for the same, some help would be appreciated.

Thanks,
Suren