Solved : Cant Enable RayTracing in UE5 (gtx 1060)(Nvidia Pascal)

Anyone know if the latest 5.1.1 Hotfix will require a new D3D12RHI.dll to be compiled?

This had been working great until i updated to 5.1.1 and it wrote over my working .dll i had downloaded from a post above. So I decided to learn how to compile my own so i wouldn’t have to wait on the kindness of others to get it working in the future.

Following the video linked at the end of this post, I was able to compile the editor.
side note: i was not expecting to have to download 30gb+ and use 200gb+ of disk space for all this. And 4+ hours to compile the first time. Yikes.

I knew the first change was to add the ability to use the variable DXR_ALLOW_EMULATED_RAYTRACING in the WindowsD3D12Device.cpp file.
I’m not making games and just using the path tracer to make images, so i set this to be on by default so i wouldn’t have to edit anything in the ConsoleVariables.ini file. After compiling it (thankfully it took only a few seconds to compile) Unreal ran, but i wasn’t getting any ray tracing. Checking the Output Log, and searching for ‘D3d12’ i saw :

Ray tracing is disabled because D3D12 ray tracing tier 1.1 is required but only tier 1.0 is supported

I found that string in D3D12Adapter.cpp, then i looked through the git history of that file on github and found this edit: https://github.com/EpicGames/UnrealEngine/commit/124abac668bde6f0c0ad356cff2b516a8740f909
Which seems to have moved the tier 1.0 cards to the ‘do not enable’ side of the logic.
Undoing this change got me up and running with ray tracing.

This worked for me and my 1080. Hope it will help others.

Here are the files with their changes:
…\UnrealEngine\Engine\Source\Runtime\D3D12RHI\Private\Windows\WindowsD3D12Device.cpp

change

#define DXR_ALLOW_EMULATED_RAYTRACING 0

#if DXR_ALLOW_EMULATED_RAYTRACING
int32 GAllowEmulatedRayTracing = 0;

to

#define DXR_ALLOW_EMULATED_RAYTRACING 1

#if DXR_ALLOW_EMULATED_RAYTRACING
int32 GAllowEmulatedRayTracing = 1;

and

…\UnrealEngine\Engine\Source\Runtime\D3D12RHI\Private\D3D12Adapter.cpp

change

UE_LOG(LogD3D12RHI, Log, TEXT("Ray tracing is disabled because D3D12 ray tracing tier 1.1 is required but only tier 1.0 is supported."));

to

UE_LOG(LogD3D12RHI, Log, TEXT("Ray tracing emulation is now enabled. Use at own risk. D3D12 tier 1.1 check ignored. Tra-La-La!"));
GRHISupportsRayTracing = RHISupportsRayTracing(GMaxRHIShaderPlatform);
GRHISupportsRayTracingShaders = GRHISupportsRayTracing && RHISupportsRayTracingShaders(GMaxRHIShaderPlatform);

Video I followed to figure out how to compile UE

3 Likes

If you complied files that can be used by others - you should upload them here :wink:

1 Like

@eco_bach2 just updated to 5.1.1 and the ‘old’ dll (the one we used for 5.1) works just fine.

2 Likes

Epic Games has released Unreal Engine 5.2 Preview 1 and now, in order for the path tracer to work, we need new ‘proper’ UnrealEditor-D3D12RHI.dll because the old one is not working correctly.

If anyone has complied it, please share…

PS.

Unreal Engine 5.2 Preview 1 was updated to Preview 2, but we still don’t have a proper UnrealEditor-D3D12RHI.dll :disappointed: This problem (enabling PT for GTX or compiling proper dll) could’ve been solved by EG, but unfortunately they DGAF about it.

PS. I can’t compile it myself because I don’t have enough free space for the process.

2 Likes

Hi. The file isn’t there. I am using GTX1650 and the Path Tracing is not working for me in UE5.1.

can you share with us the working code for the unreal engine 5.2 Branch?

unreal engine 5.2 Preview 2 : only support path tracing (old Shader Framework)
UnrealEditor-D3D12RHI.dll (2.1 MB)

unreal engine 5.1.1 : working
UnrealEditor-D3D12RHI.dll (2.2 MB)

5 Likes

Thank you a lot!!! I was getting really bad rendering but this solved my problem. Thanks! :slight_smile:

Tried it on UE5.1.1 with GTX1080 and everything works. Thank you :smiling_face: :star_struck:, now I am trying PathTracing for the first time :hugs: it is really very SLOOOOW :sweat_smile: :sweat_smile: :rofl:

Everything is relative. In my case, path tracing in UE works 2-3 times faster than path tracing in Blender :yum:

2 Likes

change your viewport resolution to 50% or 33% , if you are using 4k(3840x2160p) monitor,
For me in Ray Tracing mode (Reflection 3 bounces & GI Brute Force 2 Bounces) it’s working, I am getting 20-40fps constant, and my viewport resolution in pixels(2833x1379)


.

In Path Tracing mode it to less than 3 seconds to converge the image viewport resolution in pixels (2833x1379) on the default setting in post-process volume

My Optimized setting (
MAX BOUNCE - 8
SAMPLE PER PIXEL - 64
REFERENCE ATMOSPHERE - ON (TICKED)
DENOISING - OFF (UNTICKED)
)

,
But I have one issue(Final Gather), if any of you have this please let me know,

POST PROCESS VOLUME
Global Illumination:
Standalone Ray tracing (Deprecated) 
Ray Tracing Global Illumination 
Type:- Final Gather

RESULT:- Bloom

I hope anyone Had Resolved this problem in the past.

1 Like

Working Fine On 5.2…I Don’t know How to Thank U…But U saved us

Hello everyone, i tried everything what you said. I replaced the .dll file winx64 directory and add console command to consolevariables.ini file. But still i don’t have ray tracing. I did all settings about ray tracing and path tracing either but still there is no path tracing mode on viewport settings. Help me please

Hi everyone,
I’ve managed to recompile the source so it can work for UE v5.2 and got path tracing working in the level editor with my GTX 1080 Ti. Below is the file to replace under the main directory of where you installed the engine by default. I.e.
C:\Program Files\Epic Games\UE_5.2\Engine\Binaries\Win64\

UnrealEditor-D3D12RHI.dll (2.1 MB)

I also updated the ConsoleVariables.ini file with the pathtracing enabling lines too:
; pathtracing enabling
;r.D3D12.DXR.AllowEmulatedRayTracing=1

and overwrote it under
C:\Program Files\Epic Games\UE_5.2\Engine\Config\

ConsoleVariables.ini (9.9 KB)

4 Likes

Hello aTERvEyn
I did all this and still can’t find pathtracing in my options, Please I need Help. Been struggling for Weeks.

Have you enabled path tracing in the project settings? Replacing dll is not enough. You have to jump through all the hoops enabling raytracing as if you had a proper RTX card.

Guyz i did everything. I replaced dll, i used aTERvEyn’s console variables and made all project settings but still there is no path tracing. I’m using Rx 5700 XT please help me

Epic Games has released Unreal Engine 5.3 Preview 1 and in order for the path tracer to work, we need new ‘proper’ (recompiled) UnrealEditor-D3D12RHI.dll because the old one doesn’t work.

If anyone has complied it, please share :wink:

3 Likes

does anyone has UnrealEditor-D3D12RHI.dll for Unreal Engine 5.2.1 ? :smiling_face_with_tear: