For a few days, some meshes in my project look like this in the viewport and I don’t know what’s the problem. Can anyone help me with this please ?
This is an issue with raytraced shadows on Nanite geometry. Hardware raytracing uses the proxy geometry by default, not the full nanite geometry that is on screen, and this can cause self-shadowing artifacts with raytraced shadows. It can be resolved many ways:
- Switch to Virtual Shadowmaps instead of using Raytraced Shadows
- Adjust the fallback triangle percentage in the Nanite options of your static mesh
- Enable HW raytracing against the full Nanite mesh (steep performance cost) using cvar:
r.RayTracing.Nanite.Mode 1
- Set a self-intersection distance for raytraced shadows. I don’t recommend this, as I feel it completely defeats the primary benefit of RT shadows (which is that they are essentially pixel perfect), but if you prefer it you can use it:
r.RayTracing.Shadows.AvoidSelfIntersectionTraceDistance 4
(distance is in centimeters, a value of 4 = 4cm)