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

Maxwell’s architecture does not support Ray Tracing therefore it is impossible to be able to ray trace with any Nvidia GTX 900 series, even if the software is glitching and it shows that Ray Tracing is enabled, your FPS rate proves you are not using Ray Tracing. Using a 1080Ti with Raytracing enabled will barely get you to 20 FPS.

Ray Tracing says deprecated because Lumen has ray tracing built-in capabilities

For those who can’t enable Ray Tracing, make sure you update your scene. (Before you do so make sure you backup your scene) Once updated you can Enable Lumen’s Ray Tracing.

you actually just need to make sure lumen is turned on for both global illumination and reflections

then scroll down to hardware ray tracing, enable that, and then you can enable the other hardware ray tracing button.

unfortunately ue5 source code does not include “r.D3D12.DXR.AllowEmulatedRayTracing” Code !
this is very bad news
i hope epic developers fix this

I got path tracing to work on my 1080 ti with UE5 early access by adding “r.D3D12.DXR.AllowEmulatedRayTracing=1” into my DefaultEngine.ini. Unfortunately, Epic removed this console variable in UE5 Preview which deprecates ray tracing (and therefore path tracing) for all GTX 10 series cards. I found a very hacky workaround which is very annoying to setup, but works well enough until Epic addresses this issue.

  1. This method involves building UE5 from source, so follow the steps needed to gain access to UE5’s source code. (Downloading Unreal Engine Source Code | Unreal Engine Documentation)
  2. After installing the source code on your comp, navigate to this file from the root directory of the source code: Engine/Source/Runtime/D3D12RHI/Private/Windows/WindowsD3D12Device.cpp
  3. Open the file, and change the line that says:
    #define DXR_ALLOW_EMULATED_RAYTRACING 0
    to
    #define DXR_ALLOW_EMULATED_RAYTRACING 1
    This will allow you to access this cvar from withing UE5 Preview.
  4. Compile the source code, and you’re done! You should be able to set this cvar from within the custom built UE5
7 Likes

Raytracing is mostly a fraud lol… too expensive performance even for rtx cards…

I want to combine lumen GI + Raytracing Reflection
Raytracing Reflection is not expensive
Only Raytracing GI is expensive

Most of the people in this thread who want to use it aren’t using it for realtime rendering, they want to enable it so that they can use the path tracer and GPU lightmass.

2 Likes

thank you man
its working
my problem solved

Hi farshid . did you download the zip code from githup ?!

yes
Github 5.0 version
change
#define DXR_ALLOW_EMULATED_RAYTRACING 0
to
#define DXR_ALLOW_EMULATED_RAYTRACING 1
in
Engine/Source/Runtime/D3D12RHI/Private/Windows/WindowsD3D12Device.cpp

then compile
working for me now I Have raytracing Back !

2 Likes

Good for you …
did you can download the zip file from GitHub? I cant download it …it will stop downloading after 300mg
… I tried with commends (Windows Power Shell and Gitbush ) and it turns me to error:1408F119:SSL .

what was your approach to have the source ?

  1. Go to the main menu and use the Edit menu to open the Project Settings.
  2. Under Platforms > Windows, use the Default RHI dropdown to select DX12.
  3. Under Engine > Rendering, enable Ray Tracing. …
  4. Restart the engine to launch the Editor with DX12 and to enable Ray Tracing for your project.

Oh man… for a single line of code we can bring back raytracing to all our GTX cards.

Please Epic games, bring this feature back to the command line and let us (users) decide if we want to use it or not, it is not harming anyone!

Framerate is not an issue for some of us, since we tend to do offline rendering or experimental projects.

It was working perfectly on the early access build until someone decided to remove it from code.

Newer graphic cards are still hard to come by, and if a line of code fixes it, then why would you prevent us from using it?

We do not want to compile code for every single upcoming build :frowning:

I hope a Dev listens to our simple demand and bring it back…

Thank you!

11 Likes

Nvidia Supports GTX for RayTracing Plugin
but Epic Not !
Shame on you Epic :smiley:

2 Likes

I successfully compiled the Engine with the modified WindowsD3D12Device.cpp!

Do you know which files would I need to replace on my original UE5 installation? Is it the whole Editor exe, or is it enough to replace D3D12Core.dll in the D3D12 folder?
EDIT: the file that needs replacing is UnrealEditor-D3D11RHI.dll.

EDIT: I opened my project, but I cant change r.D3D12.DXR.AllowEmulatedRayTracing. It’s saying it’s read only, any tips?

EDIT again: fixed it by putting “r.D3D12.DXR.AllowEmulatedRayTracing=1” into the Engine ConsoleVariables.ini

Is there any way to only compile that dll whenever there’s the next update?

I hope we can have this back pretty soon, I’m stuck, I put months into this software, by the way, not an easy one to dive in, but I believe in real-time render tech and what Unreal is doing. At the moment I’m still with my GTX1080ti and is so frustrating and sad to see how well looks everything with Lumen in UE5, and not being able to use RayTracing combined with Lumen.

I hope we can hear from epic soon regarding this, cos we are more than a few in this situation and is something that already was working in the early version.

1 Like

Thanks for sharing this!

Do you know any guide to follow, cos I don’t have any idea of how to go through this process, happy to give it a go, but I don’t know where to start with this compile etc.

Thanks, Farshid!

Hi, can you share the dll here since most of us don’t fiddle with source code? That’d be great to have.

will not work
you must compile
I replaced it before but it didn’t work

That is a shame. Did you check kotn3l edits on what he done to get it working by dll replacement?