Is Unreal Engine or Twinmotion able to use multiple GPUs for path tracer?
Since Unreal Engine 5.1 and Twinmotion 2023.1, they support using multiple GPUs for path tracer performance. Actually it’s from way before that when you can use more than one GPU to perform some of special functions in Unreal Engine; however, it’s only widely known recently by many users. This makes us want to discuss a question which I received from many users of mine: Is Unreal Engine or Twinmotion able to use multiple GPUs for path tracer?
What is path tracer rendering?
Path tracer is progressive rendering mode in Unreal Engine and Twinmotion, which helps you generate high-quality images, using accurate lighting and Global Illumination (GI). It shares the same ray-tracing architecture and features, but different code, mitigating the drawbacks of real time feature and produce photo-realistic and production renders.
How to enable support for multiple GPUs in path tracer in Unreal Engine and Twinmotion?
To enable support for multiple GPUs in path tracer in Unreal Engine and Twinmotion, you should guarantee that you have:
-
-
-
- Windows 10 version 2004 or newer
- Identical graphics cards (2 or more) which support NVLink
- NVLink bridge
-
-
The number of graphics cards and the series will determine the NVLink bridge. You should know that some graphics card support NVLink, some don’t. Some graphics cards series can be connected by one NVLink maximum (mostly consumer cards like RTX 2000, RTX 3000; workstation cards like RTX A5000, RTX A6000), some can work with more NVLink bridges (mostly enterprise cards).
With the majority users of Unreal Engine and Twinmotion, it’s the best to stick with consumer cards and workstation cards which allow two cards be connected by one NVLink bridge.
Please note that two different graphics cards will not help in path tracer or any rendering mode in UE or Twinmotion. And the new architecture Ada Lovelace graphics cards like RTX 4000 series or RTX 6000 Ada don’t support NVLink anymore.
Enable multiple GPUs in Unreal Engine
To enable support for multi-GPUs in UE, you should follow this instruction:
-
-
-
- Connecting GPUs with NVLink bridges and enabling SLI in the NVIDIA Control Panel.
- Pass the command line argument -MaxGPUCount=N, where N is the number of GPUs available. For example, -MaxGPUCount=2.
- With the editor open, use the console variable r.PathTracing.MultiGPU 1 to enable multi-GPU support. You can also add this console variable to your DefaultEngine.ini file located in [Unreal Engine Root]/Engine/Config under the [/Script/Engine.RendererSettings].
-
-
Check the Output Log once the editor opens to ensure that multi-GPU mode is active. Look for LogD3D12RHI: Enabling multi-GPU with 2 nodes.
Enable multiple GPUs in Twinmotion
First, you set up the NVIDIA SLI technology for the GPUs in your computer. After that, you need to enable multi GPUs in Twinmotion as follows:
-
-
-
- In the menu, go to Edit > Preferences to open the Preferences
- In the Settings tab, under Path tracer, select the Multi-GPU
-
-
Is Unreal Engine or Twinmotion able to use multiple GPUs for path tracer?
Now we come to the question stated at the beginning of the article: Is Unreal Engine or Twinmotion able to use multiple GPUs for path tracer?
Many users come to us and ask this question. It’s hard to tell that the multi-GPUs system really help to accelerate the rendering speed in UE or Twinmotion, because how the software behaves is still strange to us.
One of my UE 5.1 clients has shared his experience with RTX A6000 and our single RTX 4090 and dual RTX 3090 with NVLink. It’s a big project in path tracing, with too many 8k textures, so it needs as big VRAM as 48GB.
However, his RTX A6000 somehow could not render the project properly, as it used 50GB VRAM for the scene. It resulted to crashing. That’s why he sought help from iRender because we offer NVLink on the server dual RTX 3090s.
His first attempt with dual RTX 3090s was not successful. The project can render on one GPU well, but the second GPU, although was connected by NVLink, seemed to be idle. While the first GPU used 24GB fully, the second one just use one gig and appeared doing nothing at all. If he rendered with a less complicated scene, it did render faster.
He then tried to contact Unreal Engine technician for help, and it appeared to have been a command line he missed. After fixing it, he could fully use the second GPU. Both GPUs were utilized and used their own VRAM. However, it didn’t go smooth like expected. He then encountered a GPU Driver crash, for which he adjusted the TdrDelay and TdrDdiDelay registry keys, which hasn’t resolved the issue. The crash only happens during warmup frame rendering, and only if he used the multi-GPU support. It didn’t crash with a single GPU at all. Seem like NVLink and the software cannot work properly for many reasons.
Because using one RTX 3090 is not enough, he tried using our single RTX 4090. On a single RTX 4090, it rendered faster than A6000 and RTX 3090. And it did not crash when it runs out of dedicated memory. In the end, he used single RTX 4090 for most of his scene.
On the paper, it’s said that using multiple GPUs can improve the path tracer’s rendering performance anywhere from 50% to 200%. It doesn’t happen like that on our client’s case. For a small scene, it is faster, but do you need NVLink for a small scene? No.
For a big scene where it exceeds the dedicated VRAM of one GPU, the software starts to act weird. While UE crashes on my client’s local 48GB VRAM of A6000, it actually can run on 30GB of dual RTX3090s’ shared VRAM via NVLink. However, it’s not stable. It will keep crashing, either the software or the driver. It happens if his scene uses more than 24GB of one GPU. It seems like NVLink in this case doesn’t help double the available VRAM, but it makes both GPUs render the same scene by themselves. That seems too much for the engine to handle properly, maybe it wasn’t optimized.
I wonder if it’s the reason why Nvidia is not doing NVLink anymore with their new generation of graphics cards like RTX 4090 or 6000 Ada. To conclude, I still don’t think multi-GPUs with NVLink or SLI will help 100% in the case of path tracer. If your scene can be optimized and used within 24GB VRAM of RTX 4090, it’s the best. If you want to use dual RTX 3090s with NVLink, we still offer it, but do not expect much from it.
Wrapped up
Right now, it’s still far from the context that real-time rendering software like UE, Twinmotion or any application like Lumion, D5 Render, Enscape can utilize multiple GPUs. Some features of them can do that, but it’s very limited and show many instability. To ensure you have a smooth and as few problems as possible, please consider using one GPU and optimize your scene.
Source: docs.unrealengine.com, twinmotion.com
Related Posts
The latest creative news from Unreal Engine Cloud Rendering, Twinmotion Cloud Rendering