Difference between revisions of "Engine:Unreal Engine 4"
(→Stuttering: Disabling Control Flow Guard fixed the issues for Squad, It Takes Two and Borderlands 3) |
m (→Permanent console variable (cvar) changes: Wording) |
||
(One intermediate revision by the same user not shown) | |||
Line 440: | Line 440: | ||
'''Notes''' | '''Notes''' | ||
− | {{ii}} Values set with 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 [[#Enable developer console|through the developer console]] after loading the save and expect that the modified value may be written into the save. | + | {{ii}} Values set with this method should usually override any value set elsewhere, however, some games might store values inside savegames or set them per-scene, which may override them when the save gets loaded or a scene gets switched - the only workaround for these kind of games is to set the value [[#Enable developer console|through the developer console]] after loading the save and expect that the modified value may be written into the save. |
{{ii}} The game may rewrite this file when exiting, usually removing any empty lines and lines containing only comments - any custom cvars should still be saved, though the file can be set as "read-only" if this rewrite isn't desired. | {{ii}} The game may rewrite this file when exiting, usually removing any empty lines and lines containing only comments - any custom cvars should still be saved, though the file can be set as "read-only" if this rewrite isn't desired. | ||
{{ii}} Changes to the games config files should be made while it is not running. As previously mentioned, the game may overwrite the file when exiting. | {{ii}} Changes to the games config files should be made while it is not running. As previously mentioned, the game may overwrite the file when exiting. | ||
{{ii}} Unreal Engine 4 uses a hierarchical configuration scheme (on top of the multiple configuration categories previously mentioned), meaning that there can be multiple versions of (e.g.) {{file|Engine.ini}} found in different places, some of which may be prefixed with 'Default', 'Base', or 'Windows'. In general, it is best to edit the config file in the user configuration directory, as this should take priority over all others and work even if the game ships with encrypted config files. The file is usually located in {{folder|{{P|localappdata}}\<Game>\Saved\Config\}}. | {{ii}} Unreal Engine 4 uses a hierarchical configuration scheme (on top of the multiple configuration categories previously mentioned), meaning that there can be multiple versions of (e.g.) {{file|Engine.ini}} found in different places, some of which may be prefixed with 'Default', 'Base', or 'Windows'. In general, it is best to edit the config file in the user configuration directory, as this should take priority over all others and work even if the game ships with encrypted config files. The file is usually located in {{folder|{{P|localappdata}}\<Game>\Saved\Config\}}. | ||
+ | }} | ||
+ | {{Fixbox|description=Force console variables in the runtime|fix= | ||
+ | {{ii}} If the alternative methods to set cvars don't work due to the game overriding them after loading a savefile or setting them per-scene, you can try forcing them in runtime using [https://github.com/UE4SS-RE/RE-UE4SS Unreal Engine 4/5 Scripting System]. | ||
+ | # Extract [https://github.com/UE4SS-RE/RE-UE4SS/releases UE4SS] next to the game exe. | ||
+ | # Create a new folder in {{File|Mods|folder}} with your mod's name. | ||
+ | # Inside that folder, create a {{File|Scripts|folder}} folder. | ||
+ | # Inside {{File|Scripts|folder}}, create a new file called {{File|main.lua}}. | ||
+ | # Use the [https://community.pcgamingwiki.com/files/file/2921-sample-mainlua-for-forcing-ue4-cvars-in-runtime/ sample file] for reference on configuration. In the <code>Init()</code> function put values that only need to be initalized once. In the <code>Loop()</code> function put values that need to be initialized actively in the runtime. | ||
+ | # Once you're done editing the script to your needs, save the file. | ||
+ | # Edit {{File|mods.txt}} with the name of your mod folder at the bottom, i.e. <code>ForceRT : 1</code>. | ||
+ | # Save the file. | ||
}} | }} | ||
Revision as of 13:50, 7 March 2024
Developers | |
---|---|
Epic Games | |
Website | |
https://www.unrealengine.com/ | |
First release date | |
March 2014 | |
Predecessor | |
Unreal Engine 3 | |
Successor | |
Unreal Engine 5 | |
Key points
- Complete suite of game development tools and engine used by over 1000 games, see Games.
Video
Multi-monitor
See Ultra-widescreen.
Ultra-widescreen
- 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 or 32:9 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 workarounds.
Field of view (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 |
---|
Using the guide below, change [/Script/Engine.LocalPlayer] AspectRatioAxisConstraint=AspectRatio_MaintainYFOV
|
Borderless fullscreen windowed
Borderless Fullscreen |
---|
Using the guide below, change [SystemSettings] r.FullScreenMode=1 |
Exclusive fullscreen
Exclusive Fullscreen |
---|
Using the guide below, change [SystemSettings] r.FullScreenMode=0 |
Anti-aliasing (AA)
- The engine supports both FXAA and TAA, and in most games either one can be forced, or outright disabled.
Enable Temporal AA (TAA) |
---|
Using the guide below, modify [SystemSettings] r.DefaultFeature.AntiAliasing=2 r.PostProcessAAQuality=4 Notes
|
Enable FXAA |
---|
Using the guide below, modify [SystemSettings] r.DefaultFeature.AntiAliasing=1 r.PostProcessAAQuality=4 Notes
|
Disable anti-aliasing |
---|
Using the guide below, modify [SystemSettings] r.DefaultFeature.AntiAliasing=0 r.PostProcessAAQuality=0 |
Sharpen
Enable and adjust image sharpening |
---|
Using the guide below, modify [SystemSettings] r.Tonemapper.Sharpen=1 |
Anisotropic filtering (AF)
Set anisotropic filtering to the highest quality |
---|
Using the guide below, modify [SystemSettings] r.MaxAnisotropy=16 |
Vertical sync (Vsync)
Disable Vsync |
---|
Using the guide below, change [SystemSettings] r.VSync=0 |
Frame rate (FPS)
Disable smooth frame rate |
---|
Using the guide below, change [/Script/Engine.Engine] bSmoothFrameRate=False |
Disable FPS cap |
---|
Using the guide below, change [/Script/Engine.RendererSettings] t.MaxFPS=0 |
Set FPS limit |
---|
Edit [/Script/Engine.GameUserSettings] FrameRateLimit=60.000000 |
High dynamic range (HDR)
For a list of known games and their specifics, see Unreal Engine 4-5 games where HDR can be forced.
Unreal Engine 4 have native HDR output that can be forced in many newer games with mixed results. Earlier versions of the engine required running in Exclusive Fullscreen (FSE) in order for this to work, while newer versions supports it for windowed modes as well, though some more recent versions have broken HDR in DirectX 12,[citation needed] requiring the use of -dx11
launch argument to run games in DirectX 11.[Note 1]
Force the built-in HDR display output of the engine: |
---|
Notes
|
Adaptive exposure
Disable Adaptive Exposure |
---|
Using the guide below, change [SystemSettings] r.EyeAdaptationQuality=0 |
Ambient occlusion
Disable Ambient Occlusion |
---|
Using the guide below, change [SystemSettings] r.AmbientOcclusionLevels=0 |
Bloom
Disable Bloom |
---|
Using the guide below, change [SystemSettings] r.BloomQuality=0 |
Screen Space Reflections
Disable SSR |
---|
Using the guide below, change [SystemSettings] r.SSR=0 |
Fog
Disable Fog |
---|
Using the guide below, change [SystemSettings] r.Fog=0 r.VolumetricFog=0 |
Chromatic aberration
Disable Chromatic Aberration |
---|
Using the guide below, change [SystemSettings] r.SceneColorFringeQuality=0 |
Depth of field
Disable depth of field |
---|
Using the guide below, modify [SystemSettings] r.DepthOfFieldQuality=0 |
Film grain
Disable film grain |
---|
Using the guide below, modify [SystemSettings] r.Tonemapper.GrainQuantization=0 |
Lens flare
Disable lens flare |
---|
Using the guide below, modify [SystemSettings] r.LensFlareQuality=0 |
Motion blur
Disable motion blur |
---|
Using the guide below, modify [SystemSettings] r.MotionBlurQuality=0 |
Temporal Super Resolution
- See the official engine documentation for more details.
Enable temporal AA upsampling (TAAU) GEN 4 |
---|
Using the guide below, modify [SystemSettings] r.DefaultFeature.AntiAliasing=2 r.PostProcessAAQuality=4 r.TemporalAA.Upsampling=1 r.TemporalAA.Algorithm=0 r.ScreenPercentage=75 |
Enable temporal AA upsampling (TAAU) GEN 5 |
---|
Using the guide below, modify [SystemSettings] r.DefaultFeature.AntiAliasing=2 r.PostProcessAAQuality=4 r.TemporalAA.Upsampling=1 r.TemporalAA.Algorithm=1 r.ScreenPercentage=75 |
Vignette
Disable Vignette |
---|
Using the guide below, modify [SystemSettings] r.Tonemapper.Quality=1
|
Ray tracing
Input
Mouse smoothing
Disable mouse smoothing |
---|
Using the guide below, change [/Script/Engine.InputSettings] bEnableMouseSmoothing=False |
Controller analog stick options
Change sensitivity, deadzone size, inversion |
---|
Using the guide below, change [/script/engine.inputsettings] AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) where the currently used values are the default. |
Issues fixed
Stuttering
- There are two main causes of stutters in Unreal Engine 4 games, shader compilation stutters as well as texture streaming related stutters.
Shader compilation related stuttering |
---|
Unfortunately there is no console variable (cvar) to tweak this behavior,[citation needed] however DXVK-async might be used to reduce or eliminate shader compilation stutters since it offloads these operations to a worker thread instead of performing them on the main rendering thread of the game. Note however that using DXVK-async may reduce the average frame rate by up to 20% depending on the game. |
Forcibly enable compiling of shaders on load |
---|
[/script/engine.renderersettings] r.CreateShadersOnLoad=1 niagara.CreateShadersOnLoad=1
|
Texture streaming related stuttering |
---|
Using the guide below, change [SystemSettings] r.TextureStreaming=0 |
Disable Control Flow Guard |
---|
|
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 may cause more ghosting to appear in some games.
Stop current frame from being considered in TAA |
---|
Using the guide below, change 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. Using a value range of =0.2 through =.45 will remove ghosting and jitter. Value range is dependent on the game. Start at .2 then increase as needed. |
- 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% |
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[7] |
---|
|
SteamVR starts despite the game not using HMD devices
Start the game with -nohmd parameter.[8][9]
|
---|
Other information
GameThread timed out waiting for RenderThread - After Windows Standby
- Games may crash after a longer standby period. This can be fixed by increasing the timeout value.
Edit Engine.ini
and add g.TimeoutForBlockOnRenderFence=9999999
to the [SystemSettings]
.
Enable developer console
- The developer console allows real-time adjustments through various Unreal Engine 4 console variables, along with being able to run debug commands like ToggleDebugCamera that enables a flycam mode. Most games ship with the console disabled, although often retains code related to it that allows for its reactivation through third-party DLL injection.
- Independent of custom game code - potential for reliability.
Extract and set up the Universal Unreal Engine 4 Unlocker |
---|
Notes
|
Permanent console variable (cvar) changes
- Like most engines that use console variables, Unreal Engine 4 has a config file that the variables' values are read from at startup.
- Unlike in most engines, the method it uses may not be obvious. Editing files such as
Scalability.ini
could result in entered values being ignored depending on the graphics settings. - Entering cvars into
Engine.ini
instead should ensure the value changes will take place.
Add cvar name/values to Engine.ini
|
---|
Notes
|
Force console variables in the runtime |
---|
|
Modding tools
- Customized versions of the Unreal Editor for creating custom maps and mods for select UE4 games can be found on the Epic Games Store.
Games
Notes
References
- ↑ 1.0 1.1 Scalability Reference - last accessed on 2023-05-07
- ↑ TAAU GEN 4 - last accessed on 2022-07-05
- ↑ TAAU GEN 5 - last accessed on 2022-07-05
- ↑ ACES Tonemapper - last accessed on 2022-08-16
- ↑ https://new.reddit.com/r/borderlands3/comments/odd9zb/comment/hqlkyh0/?utm_source=reddit&utm_medium=web2x&context=3
- ↑ https://www.reddit.com/r/borderlands3/comments/odd9zb/comment/hsqsdxf/?utm_source=share&utm_medium=web2x&context=3
- ↑ Verified by User:Aemony on 2019-10-25
- Used same method now for both Code Vein and The Outer World.
- ↑ Verified by User:Suicide machine on 2021-07-30
- ↑ Stopping game from launching in VR - last accessed on 2021-07-30