Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Engine:Unreal Engine 4

From PCGamingWiki, the wiki about fixing PC games
Revision as of 10:56, 22 November 2019 by Aemony (talk | contribs) (changes to infobox)
Unreal Engine 4
Unreal Engine 4 logo.svg
Developers
Website
First release date
Predecessor

Issues unresolved

Smoothed frame rate

Similar to Unreal Engine 3, many Unreal Engine 4 games (particularly Indie-developed games) use frame rate smoothing with a default value of 62, limiting fps in these games to 62.
Unlike Unreal Engine 3, the .ini configuration files of Unreal Engine 4 games are by default compressed into encrypted files and not readily accessible. As a result this 62 fps cap cannot be removed through editing of the configuration files unless the developer actively enables the files to be accessible. Most indie developers lack the experience or foresight to do this since Unreal Engine 4 does not do it by default.
If the developer does allow for the fps limit to be edited, the relevant commands are generally in GameUserSettings.ini.

Issues fixed

Re-enable developer console

The developer console allows changing various UE4 console-variables at runtime, along with being able to run commands like ToggleDebugCamera to enable a flycam mode, among many others.
Sadly the majority of games ship with the console disabled, even though all the code for it is mostly still in place.
Fortunately that residual code allows for a simple mod that can bring back the console on most UE4 titles!
Extract & set up UE4 Console Unlocker
  1. Download and extract Universal UE4 Console Unlocker.
  2. Run IGCSinjectorUI.exe as administrator.
  3. Click 'Select' to select the process to inject the DLL into.
  4. Once the injection succeeds, press ~ in game to bring up the UE4 console (one press brings up mini-console, two presses will show the full thing).

Notes

You'll also need to re-run the IGCSinjectorUI.exe each time you start the game, as this fix sadly isn't permanent (or use the console-launcher below).
If the console doesn't open when pressing ~, try following the instructions in the console unlocker's Readme.txt file.
After setting it up, you can also download the UE4 dev-console launcher EXE to be able to automatically run the game with the console enabled.
A list of default UE4 cvars can be found here, note that this list is for UE4 in general, most games will likely have custom ones not listed here.

Permanent console-variable (cvar) changes

Like most engines that use console-variables UE4 has a config file that it can read these variables values from at startup.
Unlike most engines though the method it uses is a little non-obvious, which resulted in people editing files such as Scalability.ini (which could end up with inputted values being ignored depending on your graphics settings).
Entering cvars into the Engine.ini file instead should ensure the value changes will take place no matter what.
Add cvar name/values to the Engine.ini file

The Engine.ini file will usually accept cvar name/value pairs inside it, but only if they're entered into a [SystemSettings] section.

  1. Open the Engine.ini file inside the games config folder in a text editor.
  2. If the file doesn't have a [SystemSettings] section, add one to the bottom.
  3. Inside that section add any cvar name/value pairs that you want, with the name/value separated with an '=' character, eg: r.MaxAnisotropy=16. Comments can also be added to the file by starting them with a ';' character.
  4. Save the file.
  5. Now when you next start the game, the cvars should hopefully be set as you entered them.

Notes

Values set via this method should usually override any value set elsewhere, however some games might store values inside savegames, which may override them when the save gets loaded - the only workaround for these kind of games is to set the value after loading the save via the developer console, and hope that the modified value might be written into the save.
The game may rewrite this file when exiting, usually removing any empty lines and lines containing only comments - any custom cvars should hopefully still be saved however.
You should only make changes to the games config files while it's not running, as mentioned above the game may overwrite the file when exiting.

Streaming stutter/slowdown

By default UE4 is setup to stream in level assets while playing, which could cause stuttering during gameplay when those assets are loaded.
Fortunately this streaming can be controlled with a console-variable, for people with plenty of RAM & VRAM it might be better to disable it and load in all assets when the level first loads instead.
Changing it this way will cause some stutter/freezing when first loading into the level, but after finished loading it should hopefully let gameplay be more stable.
Disable UE4 asset streaming, and load all assets on map load
  1. Using the guide above, change Engine.ini to include these lines:
r.Streaming.FullyLoadUsedTextures=1
r.Streaming.HLODStrategy=2

Jittery Temporal Anti-Aliasing

At higher TAA sample counts edges may appear jittery, even when still with no camera movement.
Fortunately it seems there's a way to remove the jitter without compromising on TAA quality/sample count.
This method supposedly could cause more ghosting in some games, though the author couldn't see this happen.
Stop current frame from being considered in TAA
  1. Using the guide above, change Engine.ini to include these lines:
r.TemporalAACurrentFrameWeight=0

Note that as mentioned above this may cause more ghosting artifacts to appear, likely depends on which UE4 version the game uses as different UE4 versions use slightly different TAA implementations.

Entire game besides the HUD and menu elements are white on Linux

This bug may occur when using a Vulkan beta driver from Nvidia.
Disable Use Collapsed Arrays option for the game

Run the game with this Launch Parameter:

__GL_GlslUseCollapsedArrays=0

On Steam that would be:

__GL_GlslUseCollapsedArrays=0 %command%

Ultrawide and multi-monitor support

Unreal Engine games are Vert- by default, unless the developer specifically implements proper Hor+ ultrawide support. See each individual game's entry page for specifics.
If a game is Vert-, FOV can be increased to give a proper 1:1 Hor+ ultrawide image. See the ultra-widescreen glossary page for details.
If a game does not allow FOV to be adjusted, and an external mod to implement it does not exist for the specific game in question, then the game does not support a proper ultrawide experience.
For multi-monitor setups, the resolution may be so wide that the in-game FOV option may not go high enough to achieve a proper 1:1 Hor+ image. See individual game entry pages for work-arounds.

Increasing FOV

The FOV variable name is set individually by each developer and differs from game to game, so unfortunately there is no universal solution for adjusting FOV in games where it is not available as an option.
If the developers of a particular game have implemented FOV as a variable, it can usually be adjusted in GameUserSettings.ini.
For games in which customizable FOV is not supported, a wider FOV can be obtained by changing the FOV scaling from horizontal to vertical.
Change FOV scaling
  1. Add the following lines to Engine.ini in the game's configuration file location.
[/script/engine.localplayer]
AspectRatioAxisConstraint=AspectRatio_MaintainYFOV
This results in a tremendously higher FOV than intended, and will likely result in a "fishbowl" effect on anything narrower than a 48:9 triple-monitor setup. Some users may consider this ultra-high FOV to be desirable, while others will find it detrimental to their enjoyment.

Native resolution is not available in borderless window modes

Newer versions of Unreal Engine 4 handles DPI automatically and prevents the use of native resolutions when a borderless window mode is being used. The render resolution will instead be the lower "DPI-aware" resolution.
For example, on a 3840x2160 monitor with 150% DPI scaling set, 2560x1440 will be used instead, as 3840 / 1.5 (150%) = 2560 and 2160 / 1.5 (150%) = 1440.
Allow a game to use the native resolution in borderless window modes[1]
  1. Locate the main game executable (e.g. <internal-project-name>-Win64-Shipping.exe) in a subfolder of the game.
    • This is usually located in <path-to-game>\<internal-project-name>\Binaries\Win64\ (Win32 if 32-bit).
  2. Right-click on the executable and select Properties.
  3. Navigate to the Compatibility tab and click on Change high DPI settings.
  4. Enable the following options:
    • [x] Use this setting to fix scaling problems for this program instead of the one in Settings
    • Use the DPI that's set for my main display when I signed in to Windows
    • [x] Override high DPI scaling behavior.
    • Scaling performed by: Application
  5. Click on OK followed by OK again.
  6. If performed correctly this should result in the borderless window mode of the game using the native resolution of the monitor as its internal render resolution.
  1. Verified by User:Aemony on 2019-10-25
    Used same method now for both Code Vein and The Outer World.