Apparently the engine update has brought new bugs, Disabling raytracing in shadows solves the problem. But it’s better to stay on 5.1 I thought at first it was only in viewport, but in the renderer with shadows is a nightmare
I cannot identify the certain steps. I will continue trying it tomorrow, but I have recreated this 5.0 scene just copying the cubes and the lights in the already provided 5.2 scene:
You will be able to open it normally in 5.0 and 5.1, but it will show destroyed lighting in 5.2. (Notice in the World Outliner an InstancedFoliageActor when opening with 5.2, which was not added in the 5.0 scene).
I noticed this same lighting issues when I opened some of my older projects, that’s why I tried to isolate the problem and report it, and provide a proof-ready-project.
Nothing special done, but also not sure when or why it happens.
I have continued doing tests and I have noticed a certain scenario (may be more, as there are tons of combinations).
For a 100% success scenario, it seems related with any project created with a different version than 5.1 (As I couldn’t reproduce it creating the project with 5.1 version). I have recorded this with a 5.0 project, but if I noticed this error before, it’s because I also tested older projects, made with UE4.27 for example:
(If created with 5.0, but opened later with 5.1 and saving the changes, to ‘convert’ the project to 5.1, the error will persist anyway. This is also shown in the recorded video)
Steps summary:
Create a 5.0 project
Open a default map (it may work with other maps too, not tested)
Delete all except the Floor mesh (it may work without deleting anything, not tested)
Add a Directional Light (it probably happens with any other lighting, not tested)
Add tons of cubes (something like 250)
Enable Ray tracing hardware and shadows in project settings
Close & Save, & open with UE5.2
Bonus bug: before destroying the lighting, go away with the camera. RT shadows will dissapear with the distance. Ok, go close again.
Duplicate some of the cubes, to reach something like 280 cubes or more (this seems to be near the critical number of actors, or of static meshes, not sure)
Lighting will be destroyed
Perhaps it may be related with other raytracing shadows bugs, if something is broken from ‘the base’. Despite of the tittle of the post, these are bugs 100%. The question was rhetoric:
Thank you for the detailed steps! Our team was able to reproduce the issue and logged the issue for our dev team. It’s been added to the tracker here: Unreal Engine Issues and Bug Tracker (UE-185922)
EDIT: Oh! I have found a much more easier way to reproduce the issue, and native in 5.2! Hope it helps:
Please! If you could slightly look at those other ray-tracing-shadows related bugs, I would be very happy. Super easy to reproduce the steps, if you have interest. 5-10 minutes testing.
And please, (please!) moving assets (in the correct way, of course) inside Unreal is broken since many versions ago. How’s possible? A so elemental and must-have feature . Super Easy to reproduce too, just following the video provided and the provided project too. 1 minute testing:
For the original issue here, it’ll be fixed in the next release.
In the meantime, you can switch to SM6 to solve the problem—go to Project Settings → Platforms → Windows → D3D12 Targeted Shader Format → SM6) or run with -sm6 on your commandline.