We are trying to disable a specific material slot in the LOD Sections. When we do this, all shadows for the mesh are disabled.
We are using ray traced shadows, and that appears to be the culprit. If we disable ray traced shadows, the shadows appear properly. But with them enabled, the only way to get shadows to appear is to enable all material sections.
Setting to a different LOD (which has that material enabled) causes shadows to reappear, but the material is rendered again.
[Attachment Removed]
Steps to Reproduce
Enable ray tracing and ray traced shadows in DefaultEngine.ini
[/Script/Engine.RendererSettings]
; ... other stuff
r.raytracing=True
r.raytracing.shadows=True
In the project, drag a skeletal mesh into the scene and observe it casting shadows.
Open the skeletal mesh, and in the LOD Material Sections, disable one of the materials.
Observe that shadows stop being cast.
Disable ray traced shadows via the console (r.raytracing.shadows 0).
Observe that shadows appear (minus the material section you just disabled, which makes sense because it’s invisible)
In the attached test project, I duplicated the mesh. One has arms, the other has the arms material disabled in the LOD section, so you can see one casts shadows and one doesn’t.
[Attachment Removed]
[Image Removed]Hi there, when I open the sample project provided, this is what I see with r.raytracing.shadows 1.
This is the result I would expect, but I might be unclear on the problem you are reporting. (Using UE 5.6.1)
If you are seeing something different then the above, I would try clearing your shader cache and checking if you are on the latest driver version for your GPU.
Could you provide a screenshot of what you are seeing on your side?
Can you confirm how you are disabling the material in the LOD section, right-clicking enable and disable on the sections?
Kind Regards
Keegan Gibson
[Attachment Removed]
So I was running on 5.6.0 and saw these results:
[Image Removed]Because it was LOD based, zooming out would yield different results:
[Image Removed]And yes, I am disabling via the LOD section:
[Image Removed]
However, since updating to 5.6.1, I DO see the shadows as expected when at rest on a static object. However, if I put this on any object that moves (or walk behind it), the shadows flicker.
[Image Removed]We notice this behavior in 5.7 as well.
[Attachment Removed]
Hi There,
I was also able to reproduce this issue on 5.7.
I’ll submit a bug report and reply with the public tracking link oince this is live.
However this is likely a non standard workflow, specially as its labeled a work around, It would be worth reconsidering if this is functionality you require, or could the mesh section be removed in a content tool (Maya max etc) or within unreals own mesh editor tooling (Skeletal Editor Usage Guide | Tutorial) etc
[Attachment Removed]
I see in Perforce that CL#44391072 addressing UE-296130 says:
[HWRT] Workaround for ray tracing geometry of skeletal meshes not being created when any segment is disabled.
- use static vertex buffer/factory when section is disabled since skin cache didn’t generate valid data for the section.
So it appears that something between 5.6.0 and 5.6.1 was checked in to address this. However, the flickering on moving objects remains an issue.
[Attachment Removed]
Hi there,
Here is the public bug tracking link: Unreal Engine Issues and Bug Tracker (UE\-357937)
I’ll close off this support request, but If theres anything else we can help with feel free to open a new support request.
[Attachment Removed]