While the Engine Loads
What the plugin does while Unreal loads a level, what stops any loading screen in the engine, and what you can change when a screen freezes.
On this page
In a game on Direct3D 12, Windows 64-bit, Neo Async Loading Screen's own thread draws the loading screen while the engine loads (below).
This page gives no figure: how a load looks depends on your game, your content and the player's machine, and only your packaged game tells. Each screen's report says what happened on it (Diagnostics).
What the plugin does
- Its own thread. While Unreal blocks the game thread at a point the plugin knows (the launch, a map load, the switch of a seamless travel, the blocks the engine announces, synchronous loads during a screen, and your own blocks declared with
FNeo), a thread of the plugin draws the screen at the display's pace, on Direct3D 12: the activity mark turns. When the game thread is back, the game layer draws the same screen again, from the same clock, so the picture does not jump. That thread takes the game thread's place only: its frames still go through the render thread, so what the render thread is doing when a block starts (the frames the game drew just before it, a long upload) holds them until it is done, and the report says so (HLP419). A screen whose texts are in a script Unreal shapes on the game thread only (Arabic, Hebrew, Thai, the scripts of India, emoji, combining marks; every text when the project setsLoading Screen Blocking Scope Slate.to 2), or that shows in such a language, is drawn by the game layer alone: it holds its last frame while the game thread is blocked (HLP406, Localization).Default Text Shaping Method - Nothing synchronous. The screen loads nothing synchronously: its images, its style and its fonts are loaded in advance, asynchronously, and the next screen's content is preloaded at the end of each screen.
- It goes on a ready game. The screen never goes before the new world begins play, and it waits under cover for what would otherwise stall the first moments of play: World Partition streaming around the players, the precaching of pipeline state objects (PSOs), texture streaming, then a few frames of the new world rendered under the opaque screen (
ready { ... }, Recipes). Each wait is bounded by the screen's maximum time: Timing > Maximum Seconds for a level change, thestartupblock's ownmax_timefor the launch. By default the launch waits for its minimum time, the first map's begin play, the holds, the loads in flight and the precache of that map's pipelines, not for the map's streaming, textures or frames (startup { until ready }adds them, Recipes). - Levers, given back. While a screen shows, the plugin can raise the PSO cache's batch mode, pause garbage collection, change the streaming budgets or force VSync, and gives each setting back after the screen (Engine Levers).
- A report for each screen. Outside Shipping builds, each screen journals what was presented and what froze it, and names the cause of each freeze when it is known (Diagnostics).
What stops any loading screen
Some engine work stops any loading screen in Unreal, this one included. The report names it when it happens:
- The engine's native splash is a still image shown before the renderer exists.
- Long commands of the render thread or of the graphics API: a PSO or a shader compiled at its first use, the first frame of a new world, a long upload, the frames the game drew just before a block it declared. There is one render thread, and the screen is drawn by it too (HLP412, HLP413, HLP419).
- A full garbage collection, while the engine keeps Slate's resources locked during it (the engine's default,
Slate.) (HLP411).Resource Manager. Lock Resource During GC - A level's cleanup, when the old world is torn down.
- The shaders compiled at a first launch, while the driver's cache is empty (below).
- A change of window mode or resolution.
- Blocks of the game thread the engine does not announce, outside your own
FNeo(HLP414: an Insights trace names them).Loading Screen Blocking Scope - Play In Editor and the editor: the screen shows on the game layer only (HLP001), so a block the game declared freezes it there (HLP415).
- Tearing without VSync: write
engine { vsync force }in a recipe (the checklist says HLP015). - A client's network wait: the screen goes on drawing, but the server decides when the client can play.
- Graphics APIs the screen's thread is not validated on: the thread draws on Direct3D 12 only (
Neo); elsewhere the game layer draws the screen, which stays on its last frame while the game thread is blocked, a block the game declared included (HLP415).Loading Screen. Presenter. Validated RHIs
The image's effects
The effects a style gives its image (Recipes) are drawn as follows:
- Once per image file: its grade, computed on a worker thread while the file is decoded, never while a frame is drawn. A texture asset takes no grade pass.
- Each frame, over the image: a full-screen wash when the style has a tint, the glow spots, the scanlines and the grid, the vignette, the grain (one small tiled texture, made once for the whole game), and in Holo the band of light while it crosses. Each is a blended layer over the whole screen.
- None on the launch screen, nor on a screen without an image.
To judge them on your target machine, show the same screen with the style's effects and without them, with Report: Log And File, and read both reports. A property set to 0 in a style's loading.media takes its layer away, and Look > Image Life: Subtle or Off calms or stills them.
Video tips
- Its own thread. A tip's video is decoded by Windows' Media Foundation on a thread of its own, below normal priority, with one decoding thread. It decodes a few frames ahead, and nothing while no screen shows it.
- Its frames on the GPU. On Direct3D 12 the video's thread also puts each new frame on the GPU; the render thread only converts it to colors. Where the graphics API cannot take textures from another thread, the render thread copies each new frame first.
- Where it plays. On Direct3D 12 the screen's own thread draws the video while the game thread is blocked; elsewhere the video plays while the game runs and stays on its frame during blocks, like the rest of the screen.
- Its size. Videos larger than 1920 x 1080, or above 60 frames a second, are refused (HLP441); 1280 x 720 is enough under a loading screen's texts, and a smaller video holds less memory.
- Its start. The video fades in over its image as soon as its first frame is ready; the first video of a session starts later, while Windows starts its media library. What the GPU needs to draw a video is asked for ahead, as soon as your recipes have a tip with a video: before the first screen and between two screens, not when the video starts. Where the engine compiles graphics pipelines in the background (Direct3D 12 with its RHI thread, the default), nothing waits for it; elsewhere the render thread compiles it at that moment, once a session. If you open videos yourself (
Open, inNeo Loading Screen Video Neo: API Reference), callLoading Screen Video.h Preparebefore the screen that plays them.Neo Loading Screen Videos - Its grade. The style's grade is applied while each frame is converted to colors on the GPU, in the same pass; a new style converts the frame on screen once more.
The first launch after an install
The first launch after an install, or after a graphics driver update, precaches far more PSOs than the next ones: the driver's cache is empty. The launch screen waits for that precache, within the startup block's own max_time, and keeps the world unrendered meanwhile, so that its first frame does not stall on pipelines still compiling. Since a screen leaves as soon as its game is ready, later launches do not wait for it.
A precache longer than max_time still lets the screen go with the precache running (HLP305 in the log names what it was still waiting for), and the first moments of play may stutter: the world's first frame compiles the pipelines it still lacks on the render thread, and the screen's last frame stays up until that frame is done (its hidden line in the log says for how long). Ship a PSO cache with your game (Unreal's bundled PSO cache) to shorten that first precache.
Reading a report
Run a Standalone game or a packaged Development build (Play In Editor measures nothing):
- With Report: Log And File (Project Settings > Plugins > Neo Async Loading Screen > Advanced > Report), each screen writes
Saved/; the Setup tab's Advanced > Reports shows the last one. With the default Report: Log, each screen ends with aLogs/ Neo Loading Screen/ <time>. hlrun. json hiddenline in the log, and each note has a line of its own. - The report gives the screen's longest freeze and its cause when it is known, how many freezes it had, and one note for each kind of freeze longer than the recipe's
warn_gap(HLP410 to HLP421), with one HLP410 note for each package a synchronous load froze it on, except a freeze caused by an async loading flush or a window resize, which gets none; time with no known cause gets HLP414 when it is more than a small share of the time the screen was frozen. -trace=cpu,records the plugin's scopes and counters in an Unreal Insights trace, beside the engine's own and its loads: a freeze without a known cause (HLP414) is found there.frame, bookmark, counters, loadtime, Neo Loading Screen
To check the diagnosis on your project before you look at a real load (not in Shipping): show a screen (Neo), block the game thread (Neo) or stall it on purpose (Neo, sync <package>, flush <ms>, block <ms>), then Neo, and read the report. More in Diagnostics.
What to change when a screen freezes
| The report says | Try |
|---|---|
| HLP410, a synchronous load, with the package | load it before the screen, asynchronously |
| HLP411, a garbage collection | engine { gc pause_ or gc under_cover (Engine Levers) |
| HLP412, the game thread waited for the render thread | find the Flush in an Insights trace |
| HLP413, PSOs created at render | a bundled PSO cache; keep ready { shaders on } |
| HLP415, one of your blocks | split the work, or move it off the game thread |
| HLP418, the handover at the end of a load | the new world's first frames: lighter BeginPlay work |
| HLP305, the maximum hold reached | remove each hold you add; raise Maximum Seconds if the content needs it, or, at the launch, the startup block's max_time |
Something not as described? Every code the editor or the log shows has its own entry in Troubleshooting.