Download

Converting meshes to Nanite generates shadows artifacts

Hello!

I’m having some issues converting static meshes to Nanite. This is a capture after converting showing some shadow artifacts.

I’ve got the exact same issue with some pillars from Megascans.

I could solve the issue by deactivating the “Ray Tracing Shadows” options in the “Rendering” section of the project settings.

1 Like

Yeah, that works. Thanks!

I’ve noticed that not all SM are compatible with how Nanite manages light and shadows. Some Megascans create this overexposed like effect when hit with direct light. I can see Nanite is working as intended but the shading goes nuts.

Same issue here and yep the raytracing was the cause… reading the documentation I think it is because the rays are hitting and drawing shadows from the proxy mesh and not the nanite mesh.

Unreal documentation note:
Ray Tracing features are supported but rays intersect the coarse representation (called a proxy mesh) instead of the fully detailed Nanite mes

ah, that makes sense. And yet we still need those proxies for collisions. Def Nanite needs a bit of preparation before jumping on it.

Alrighty, so I have tracked down the issue. This is not actually caused by the proxy mesh as previously thought but instead, it is to do with the raytracing normal bias being too low for the scene.

So basically all you need to do to solve this is to type this into the console

r.RayTracing.NormalBias 5

The number at the end dictates the bias and it is normally set at 0.1 and is what is creating the incorrect shadows.

So to solve this for your own scene enter the r.RayTracing.NormalBias and then increase the number until the shadow looks correct.

i.e.

r.RayTracing.NormalBias 0.5
r.RayTracing.NormalBias 0.8
r.RayTracing.NormalBias 1
r.RayTracing.NormalBias 5
r.RayTracing.NormalBias etc…

hope this helps you guys

1 Like

caveat…the above removes the raytraced shadows and can disconnect the shadows from the caster… so don’t push the number too high… don’t think this is the correct solution and will keep digging.

Ok so I have found that adding RTX raytracing is the cause of the issues… so I have just switched it off. Doesn’t seem to want to play nicely with Lumen and lumens lighting is pretty solid without the RTX raytrace