Auto-detect Optimal Graphics Settings for Unreal

Unreal Engine can auto-detect ‘optimal’ (graphical) settings per player based on a quick CPU and GPU benchmark. The functions are available in Blueprint to hook up into your game’s options menu.

Behind the scenes, the benchmark returns a performance index for CPU and GPU with a reference of 100.0 for “average good CPU/GPU”. These values are then used to apply a series of scalability options like shadow resolution, texture quality, SSR quality etc.

You can see your own performance index by running the SynthBenchmark console command. scalability auto runs the hardware benchmark and logs the resulting scalability and CPU/GPU scores.

// Run benchmark, will freeze game for a bit. Higher workscale increases time it takes to run tests (10 is default and should be used for shipping builds)
UGameUserSettings::RunHardwareBenchmark(int32 WorkScale, float CPUMultiplier, float GPUMultiplier);

// Call after the benchmark to apply settings to running game
UGameUserSettings::ApplyHardwareBenchmarkResults()

Settings are applied in ../MyProject/Saved/Config/Windows/GameUserSettings.ini (ScalabilityGroups)

Advanced: (Base)Scalability.ini has PerfIndexThresholds_* under [ScalabilitySettings] to customize index vs. quality-level per Group.

This should be adjusted (towards the end of the project) to match your project’s CPU/GPU demands vs. each of the Quality Settings (Low to Epic). It may require the help of QA with a variety of machines and configurations and retrieve their respective performance scores to match their targetted scalability. (eg. the min-spec machine’s score should match the Low scalability threshold)

References

3 Responses

  1. It would be cool if there was a easier way to check if the game has been opened once. So you can run this only the first time a user plays your game. I guess just have to manually save a variable or cvar in a config. Would be cool to add how you would implement this in your post, as I imagen thats how most people would use it.

Leave a comment on this post!