Path Tracer Broken in UE5 Shipping Build?

Hi, I am getting a crash when trying to use Path Tracing at runtime in UE5 in a Shipping Build. This can be accomplished with executing the console command “Show PathTracing” which will cause the crash. It can also be reproduced by trying to render Path Tracing output from the Movie Render Queue (in the shipping build at runtime) . I’m wondering if this is a known limitation of Path Tracing or a known bug or if others are able to perform the actions above without a crash. Here is the error Call Stack,


.

Thanks!

Is there any answer for this? It would be really helpful if this could be fixed. Using path tracing at runtime is essential to our project. Would love to know when it will be fixed.

I found this bug a few days ago,you can modify the script like this:


then you can use pathtracing in shipping build. good luck with you.

I’m bound to the official Unreal Engine via Launcher, so I guess I won’t be able to change that script, but is there any chance this bug fix will be considered for the next patch? :slight_smile:

Couldn’t get it to work with this change. Is there anything I may be missing?

We’re also experiencing this problem. Has anybody been able to find a fix for this?

EDIT:
Seems to be fixed in 5.1 Preview 2; using the “Show PathTracing” method atleast.

Hi, the crash mentioned should be fixed in 5.1, including the previews. However in order to use the path tracer at runtime in a Shipping build, you will need to use a source code version of the engine and set ALLOW_CONSOLE_IN_SHIPPING to 1 in Build.h. Unfortunately there is no way to do it right now with a launcher version of Unreal. (You could use the Test build configuration to get the closest performance to Shipping.) You should override the hotkey so that the console can not be brought up, and you could further restrict the console with changes in C++, but be aware that there are security risks to having the console compiled at all in a shipped application. We do not recommend doing this for games or any other sensitive application. We hope to provide a method in a future engine version to trigger the path tracer without going through a console command.

Does this mean that using the “Execute Console Command” blueprint node does not trigger the pathtracer in a launcher version of unreal in shipping build?

Correct, unless you rebuild the engine with ALLOW_CONSOLE_IN_SHIPPING enabled.

I have downloaded a source version of 5.1 and set allow_console_in_shipping to enabled and rebuilt the engine. I can bring up the console now in a shipping build, but pathtracing does not work in a shipping build still. Note that in editor, it does work. What may be the issue?

We experience the same problem and the runtime use of the path tracer in a shipping build is extremely important for our app. It worked perfect in UE4, why did this break?

We fixed it! We had hardware raytracing enabled in the project settings, but our app disables that at runtime trough a console command in our default lighting setup. Enabling that made it work for us.

FYI, in UE5/Main (which will become 5.2) there is now a blueprint command called “Enable Path Tracing” which can be triggered at runtime and doesn’t require enabling the console or rebuilding anything. Hopefully this will address all needs once 5.2 is out.

Thank you for that information. Really looking forward to 5.2!