A first look at the next generation of UE5

UE5:新一代虚幻引擎初探

Finally, at the end of May 2021, UE5 is set to launch its first preview version, Unreal Engine 5 — Early Access Program starts at 10 PM on May 26, Wednesday China time!.

I have been looking forward to UE5 for a long time; last year, Nanite and Lumen created a huge stir, and after a year’s wait, I finally get to experience it. Over the past year, there haven’t been many technical updates about UE5. I have summarized and analyzed some information disclosed by Epic regarding UE5, which can be found in notes/ue5. This article will document some experiences using UE5, focusing on the changes in development methods compared to UE4, the transition from UE4 to UE5, and a technical pre-research on applying UE5 in production environments. I will keep updating this article in the near future.

Official UE5 resources:

Released demo video:

The most noteworthy aspects are, of course, Lumen/Nanite, as well as the engine’s integration of Quixel Bridge, which allows for direct resource import, significantly changing the scene editing process. Powerful animation support has been added, allowing for more convenient direct editing and reuse of animation resources within the engine, adapting animations according to the scene—extremely amazing!

In terms of gameplay, a new mechanism called Game Feature has been introduced, which supports the modular creation and publishing of game content. The asset management and packaging processes have also changed compared to UE4. From the perspective of hot updates, it seems there is a need to add support for Game Feature as part of asset package functionalities. I plan to upgrade the current version of HotPatcher to UE5 soon when I have time. I’ll be looking into the new mechanisms in UE5 and writing a few articles about them.

You can install the binary version in Epic Launcher:

The GitHub address for the UE5 preview source code: ue5-main. The dependencies that need to be downloaded from ue4-gitdeps can be copied to the .git/ue4-gitdeps directory in the UE5 code, which will reduce the amount of content downloaded during Setup.bat.
Additionally, Epic has released the Valley of the Ancient project, which can be downloaded from Epic Launcher via the link. Documentation: Valley of the Ancient Sample.


My blog contains pre-release analysis notes on UE5 (notes/ue5):

Attached are Epic China’s live streamed video on the UE development roadmap:


Note: The preview version released this time does not include the new script language Epic Verse, and it is estimated that it will take a considerable amount of time for updates to support it.

Platform Support

UE5 has dropped support for 32-bit platforms and now supports Apple Silicon devices (M1), but the Editor is not native Arm and still requires Rosetta for translation execution. Lumen and Nanite do not support mobile platforms or last-generation console platforms. Recommended devices: GTX 1080+.

The engine has added Unreal Turnkey, which allows for convenient unification of platform SDK configurations among teams compared to UE4. The various SDK versions integrated into UE5: New: Platform SDK Upgrades. The minimum supported Windows compiler version is VS2019 v16.4 and above, hence no longer supporting VS2015 and VS2017.

Engine Code

Two branches of UE5 code are available on GitHub: ue5-main and ue5-early-access.

The differences between the two are:

  • ue5-early-access: the same source branch as Epic Launcher
  • ue5-main: Epic’s development branch

The organization of the engine code has not changed compared to UE4. The module code seen currently remains consistent with UE4, so it shouldn’t be too difficult to upgrade UE4 code to UE5. However, the issues that need to be resolved are as follows:

  1. Changes in the organization of previously dependent module codes
  2. Changes in the warning levels due to BuildSettingsVersion being set to Latest
  3. Default CppStandardVersion is now Cpp17 (Latest is Cpp20)
  4. Code that checks engine version, such as ENGINE_MAJOR_VERSION becoming 5, ENGINE_MINOR_VERSION becoming 0

Some new compilation options have been added to TargetRules:

  • DefaultWarningLevel
  • DeprecationWarningLevel
  • bWarningsAsErrors
  • bEnableCppModules

Nvidia’s components have switched from being enabled by default in UE4 to being disabled by default in UE5 (it’s unclear whether this was retained for compatibility with UE4 project upgrades, and it may be removed later, as mentioned in the UE5 documentation). The physics system in UE5 defaults to using Chaos:

1
2
3
bCompilePhysX = false;
bCompileAPEX = false;
bCompileNvCloth = false;

The ModuleRules in the engine have hardly changed, with no new parameters added, just checks for bEnableCppModules. The UE5 compilation system can be viewed as a regular upgrade of UE4; I will upgrade my open-source plugins to UE5 and conduct tests when I have time.

Moreover, compared to UE4.25, UE5 has added several new Programs:

  1. BaseTextureBuildWorker
  2. ChaosVisualDebugger
  3. DerivedDataBuildWorker
  4. EpicWebHelper
  5. HeadlessChaosPerf
  6. Horde
  7. InterchangeWorker
  8. EpicGames.Core/Jupiter/MongoDB/Perforce/Perforce.Managed
  9. SwitchboardListener
  10. TextureShare
  11. UnrealBuildToolTests
  12. UnrealObjectPtrTool
  13. VirtualProduction

I will analyze their functions in detail when I have time.

Editor

Documentation introducing the new UE5 Editor: Navigating the New Unreal Editor Interface

Startup screen

I personally feel that the UI style of UE5 is more visually appealing compared to the skeuomorphic UI style of UE4.

You can choose to start UE4 projects in the Launcher interface:

Project settings and editor settings remain consistent with UE4 categories, and you can use Rider as a development IDE and refresh the project.

It has better localization language support than UE4:

Project

The project structure in UE5 remains similar to that in UE4, and the code development process has no differences from UE4.

The requirements for development hardware have increased; my machine has a 10606G CPU, and the Editor in the ThirdPerson project can only run at 80 fps:

I estimate that the best I can achieve on my machine after packaging is about 30 fps.

Data Driven CVars

UE5 also adds support for Data Driven CVars, allowing for configuring Console Variables in project settings:


You can access it through IConsoleManager::Get(). Compared to UE4, there is no need to create TAutoConsoleVariable objects in code, making it more convenient; it is stored in DefaultEngine.ini:

DefaultEngine.ini
1
2
[/Script/Engine.DataDrivenConsoleVariableSettings]
+CVarsArray=(Type=CVarInt,Name="t.testvar",ToolTip="",DefaultValueFloat=0.000000,DefaultValueInt=123,DefaultValueBool=False)

Cook for Platform

UE5 finally supports cooking for non-local platforms within the editor (essentially adding a Cook button by default for platforms, which was also supported for multiple platforms in HotPatcher in UE4).

GamePlay

UE5 brings significant changes in gameplay aspects, such as Game Feature, which I plan to analyze and utilize in detail when I have time.

Plugins

Creating plugins in UE5 and the organization that follows UE4, including the Build.cs code, have not changed. I put my previously open-source ue4-export-nav-data plugin into the UE5 project. The only errors that appeared were symbol-related. These can be resolved through simple modifications for direct compilation. However, UE4’s code modules can be directly used for UE5 compilation, and the corresponding symbol lookup errors need to be handled.

I have upgraded the ue4-export-nav-data plugin to support UE5, and the data export and detour verification in UE5 have passed. For details, please refer to my previous article: Export Recast Navigation Data from UE4, and the repository address is: ue4-export-nav-data.

Assets

The resource management changes in UE5 support the new Game Feature mechanism, allowing for a modular construction of game content. Once enabled, you can see the option for GameFeatureData in the Asset Manager in project settings, indicating that GameFeature is compatible with the packaging methods. I will do a detailed analysis when I have time.

UE5 also supports the PrimaryAssetLabel mechanism to tag assets, which is the same as in UE4. Additionally, the editor options have added the feature for Allow ChunkIDSpecifying. Once enabled, you can find the following menu in the resource’s right-click options:

Package

Blueprint projects only support Apple Silicon through Rosetta2, while C++ projects support local Apple Silicon packaging.

In UE5, the packaging options have moved to the following location:

The packaging still uses UAT for execution, with the command as follows:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmd.exe /c "
"C:/Program Files/Epic Games/UE_5.0ea/Engine/Build/BatchFiles/RunUAT.bat"
-ScriptsForProject="C:/Users/lipengzha/Documents/Unreal Projects/ThirdPerson_UE5/ThirdPerson_UE5.uproject"
Turnkey
-command=VerifySdk
-platform=Win64
-UpdateIfNeeded
-EditorIO
-project="C:/Users/lipengzha/Documents/Unreal Projects/ThirdPerson_UE5/ThirdPerson_UE5.uproject"
BuildCookRun
-nop4
-utf8output
-nocompileeditor
-cook
-project="C:/Users/lipengzha/Documents/Unreal Projects/ThirdPerson_UE5/ThirdPerson_UE5.uproject"
-ue4exe="C:\Program Files\Epic Games\UE_5.0ea\Engine\Binaries\Win64\UnrealEditor-Cmd.exe"
-platform=Win64
-ddc=InstalledDerivedDataBackendGraph
-installed
-stage
-archive
-package
-build
-iostore
-pak
-prereqs
-archivedirectory="C:/Users/lipengzha/Documents/Unreal Projects/ThirdPerson_UE5/Package"
-nodebuginfo
-clientconfig=Development
-nocompil
"

The code compilation command is also the same as UE4:

1
2
3
4
5
6
7
8
9
10
C:\Program Files\Epic Games\UE_5.0ea\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe 
ThirdPerson_UE5 Win64 Development
-Project="C:\Users\lipengzha\Documents\Unreal Projects\ThirdPerson_UE5\ThirdPerson_UE5.uproject" "C:\Users\lipengzha\Documents\Unreal Projects\ThirdPerson_UE5\ThirdPerson_UE5.uproject"
-NoUBTMakefiles
-remoteini="C:\Users\lipengzha\Documents\Unreal Projects\ThirdPerson_UE5"
-skipdeploy
-Manifest="C:\Users\lipengzha\Documents\Unreal Projects\ThirdPerson_UE5\Intermediate\Build\Manifest.xml"
-NoHotReload
-log="C:\Users\lipengzha\AppD
ata\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.0ea\UBT-ThirdPerson_UE5-Win64-Development.txt"

The cooking command is the same as well:

1
2
3
4
5
6
7
8
9
10
C:\Program Files\Epic Games\UE_5.0ea\Engine\Binaries\Win64\UnrealEditor-Cmd.exe 
"C:\Users\lipengzha\Documents\Unreal Projects\ThirdPerson_UE5\ThirdPerson_UE5.uproject"
-run=Cook
-TargetPlatform=Windows
-fileopenlog
-ddc=InstalledDerivedDataBackendGraph
-unversioned
-abslog="C:\Program Files\Epic Games\UE_5.0ea\Engine\Programs\AutomationTool\Saved\Cook-2021.05.27-12.04.09.txt"
-stdout
-CrashForUA

Packaging the ThirdPerson project is very slow. The directory structure after packaging is the same as in UE4:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
C:.
| Manifest_NonUFSFiles_Win64.txt
| ThirdPerson_UE5.exe
|
+---Engine
| +---Binaries
| | \---ThirdParty
\---ThirdPerson_UE5
+---Binaries
| \---Win64
| ThirdPerson_UE5.exe
| turbojpeg.dll
|
\---Content
\---Paks
global.ucas
global.utoc
ThirdPerson_UE5-Windows.pak
ThirdPerson_UE5-Windows.ucas
ThirdPerson_UE5-Windows.utoc

However, in addition to the pak, there are two new file types, ucas and utoc. These will also be mounted during runtime when mounting pak. I’ve seen that the code already existed in UE4.25/26, but I will analyze their functions and loading processes in detail when I get the chance.

Open UE4 Project

The UE5 documentation states that it supports upgrading projects from UE4.26 and earlier versions to UE5. UE5 will coexist with UE4.27 and will not guarantee compatibility with versions after 4.26. Furthermore, UE5 projects cannot be downgraded to UE4.

However, based on current conditions, upgrading a UE4.26 project to UE5 may still encounter several errors, but these errors generally fall into the categories mentioned earlier, which can be adapted with a bit of effort.

Other Compatibility Issues

Additional compatibility issues with UE5 include:

  1. UE4Editor*.exe has been renamed to UnrealEngine*.exe, so paths that relied on UE4Editor*.exe will need to be modified.
  2. UnrealBuildTool has moved from Binaries/DoNET in UE4 to Binaries/DoNET/AutomationTool, which may result in the UnrealVersionSelector for UE4 failing to generate sln files;

Changes in platform names:

  1. Some resource platforms have been removed, and new ones added.
  2. For example, WindowsNoEditor/MacNoEditor have simplified to remove the NoEditor suffix.

Conclusion

Overall, the core updates in UE5 are driven by the innovations in art resources and scene editing processes brought about by Lumen and Nanite, as well as strong support for data-driven animation within the engine. Compared to UE4, there aren’t major changes in programming, and newer versions of UE4 project code and plugins can be relatively easily upgraded to UE5. However, the new scripting language Epic Verse that was rumored earlier has not been released, which I am eagerly awaiting.

The overall operation habit of the editor still follows UE4, but the layout of the main interface and UI style has changed considerably. Once familiarized, there shouldn’t be any obstacles. UE5 provides more convenient support for platform SDKs. Essentially, the knowledge accumulated in resource management and project practices from UE4 can directly apply to UE5, and the packaging process is also fundamentally similar to UE4, but currently, packaging speed has significantly decreased compared to UE4.

As the next-generation game engine, I am very much looking forward to the performance of UE5 on console platforms. However, currently, Lumen and Nanite do not support mobile platforms, making it impossible to use it as a production environment in the short term. I look forward to seeing the performance of the official version on mobile.

未完待续。

Scan the QR code on WeChat and follow me.

Title:A first look at the next generation of UE5
Author:LIPENGZHA
Publish Date:2021/05/25 12:22
Word Count:9.9k Words
Link:https://en.imzlp.com/posts/8724/
License: CC BY-NC-SA 4.0
Reprinting of the full article is prohibited.
Your donation will encourage me to keep creating!