Fisher Dai's profile

RENDER 16K IMAGES WITH UNREAL ENGINE 5?

Conclusion:

1. It`s no problem to use UE5 EA to render 16K (15360x8640) images.

2. But the rendering module of UE5 EA is not as stable as UE4, you need to take care of it.

3. It`s recommend to use HighRes module of Movie Render Queue(MRQ) to render images which bigger than 6K, and keep the size of each tile around 4K.

4. Different projects may need different settings, be flexible.

Here are the MRQ rendering settings:
At The Very Beginning

One day, the Community Manager of Epic Games China, DaZhao asked me: You got a RTX 8000 right?

I said no, I have a RTX A6000, what can I do for you?

Then he said, he may need my help to render the Key Visual for Unreal Open Day 2021 (UOD 2021). The project file is ready, but the VRAM of his RTX 3080 is not big enough to render a 16K Version for printing purpose.

I see, I have similar experience with Nvidia last time (Check this link please), it`s simple, I just need to press the render button and wait for 1.19s……So I told DaZhao: No problem, give it to me.

Well, as you may guess, I was too young too simple……
The First Test

At the first round, I started to render the picture in UE5 EA with my UE4 experience, but then, it crashes immediately.

I checked the VRAM info, it only takes 9.8GB, so the problem is not from Graphic Card side, it`s something about MRQ.
The Second Round

At the second round, I switched to HighRes module, by basic 2x2 tiles, the frame was split into 4 parts. Meanwhile, I added 20% overlap to fix the seam issues. So the final size for each tile is 10752x6048 pixels, as the picture below:
Sadly this rendering still failed, but I got a valuable log:

[2021.09.28-08.51.17:718][  6]LogThreadingWindows: Error: Runnable thread RenderThread 1 crashed.
[2021.09.28-08.51.17:719][  6]LogWindows: Windows GetLastError: 操作成功完成。 (0)
[2021.09.28-08.51.17:719][  6]LogWindows: Error: HandleError re-entered.
[2021.09.28-08.51.17:719][  6]LogWindows: Error: === Critical error: ===
[2021.09.28-08.51.17:720][  6]LogWindows: FPlatformMisc::RequestExit(1)
[2021.09.28-08.51.17:721][  6]LogWindows: Error:
[2021.09.28-08.51.17:721][  6]LogCore: Engine exit requested (reason: Win RequestExit)
[2021.09.28-08.51.17:722][  6]LogWindows: Error: Assertion failed: CreateInfo.Extent.X <= (int32)GetMax2DTextureDimension() [File:D:/build/++UE5/Sync/Engine/Source/Runtime/D3D12RHI/Private/D3D12Texture.cpp] [Line: 1959]
[2021.09.28-08.51.17:722][  6]LogWindows: Error:

From the log, we can know that the rendering process was not dead accidently. It`s an active shutdown at the system level, and the reason was related to the resolution of the 2D texture (2DTextureDimension).

At first I suspected that some kind of oversized texture was used in the scene, but after a simple check, it can be ruled out. The largest texture in the project is only 8192x8192 pixels, which is a standard Megascans resource.

So, with this question, I started new renderings: Again, again, and again……

3072 Pixels!

The same crash occurred time and time, but in a certain test, I got a key message:

[2021.09.28-09.57.33:776][  6]LogWindows: Error: Requested texture2d x size too large: 18432, Max: 16384

The key information above mentioned that because the horizontal resolution of the 2D texture is 18432 pixels, which is greater than the 16384 pixels limit allowed by the system, rendering crashes are caused.

Please note the following rendering settings: Tile Count = 3, Overlap Ratio = 0.3, and the final resolution of each tile is 8192x4610. If overlap is not considered, the actual size for each tile is 5120x2880.

Since the super large texture cannot come from the assets side, it may be related to the rendering output. Considering that the resolution of the final image is 15360 pixels wide, is it possible that Unreal generated a large cache during the rendering process, which caused the crash?

Let`s manually calculate: 18432 - 15360 = 3072 pixels. Please remember the number 3072, this is the key to solving the problem!

Then let`s recall the way how HighRes works: the resolution of each tile is 5120x2880 pixels, with 30% overlap part, the final size is 8192x4610 pixels. If we subtract 5120 from 8192, we get the same number: 3072!

Now we got it: the frame is divided into 3 parts in the horizontal way, and the original size of each piece is 5120 pixels; with 30% overlap, the final image size is 5120 x 3 + 3072 = 18432 pixels. That`s what the log says.

Please have a look of the picture below. A tile is composed of three parts: a body with a width of 5120 pixels, and an overlap area of 30% (1536 pixels wide) on the left and right sides. The total width of the three areas is 8192 pixels.
At the rendering phase, the three tiles are spliced in sequence, the overlap areas in the middle will merge with each other to eliminate seams. But the leftmost and rightmost parts will still be there, so we got an unexpected super large buffer.
Since we located the problem, the solution is simple: appropriately reduce Overlap, or increase the number of tiles, to ensure that the actual rendering size does not exceed 16384 pixels.

Extra information

Later, I went through several tests and confirmed that the rendering tasks can be completed using the above ideas. But for the most stable and compatible settings, please refer to the beginning of this article.

This should be a bug of the UE5 EA HighRes module. I believe that the final version won`t have this problem, because UE4 does not have the same issue.

Annotation

1. Please check the article about UE4 output 16K video: To render a 16K Unreal video with RTX A6000?

2. I did not make the scene, I just helped to render the output. This scene was made by Dazhao and Ritian.

3. When using the settings mentioned at the beginning of this article, the actual VRAM usage is about 20-30GB, so Dazhao’s RTX 3080 should still be unsolvable, haha.
RENDER 16K IMAGES WITH UNREAL ENGINE 5?
Published:

RENDER 16K IMAGES WITH UNREAL ENGINE 5?

Published:

Creative Fields