Nanite mesh materials go wonky on 'Play'

Hey all!

Loving working in UE5 (for the most part).

One big issue I’m having is when I import a mesh from Megascans, quite often the material goes wonky, and even sometimes just steals the material from another mesh.

This mostly happens after hitting the ‘play’ button, but also sometimes happens within the viewport. The way to fix it in the viewport is to select all objects, and once an object is selected, it corrects the material. After ‘play’, however, the material is still borked. I’ve tried rebuilding lighting to no avail.

Viewport High Rez Screenshot (correct material)

In-game (borked material)

In-game (borked after follow up play). Showing that it changes all the time.

GPU: 2070

Hey, i found a way that fixed that for me, at least in the free archviz scene,
i deleted my Skylight (doesnt work if you just hide it) then hit Play and that fixed it, then saved my scene.
And if you need the Skylight component i found that you can just add a new one after deleting the last one.
I dont know why this happens, i think it´s a bug.

1 Like

I have the same issue, but I found that when adding another Skylight component, it just starts the issue up again. Luckily, I don’t really need Nanite on my meshes so I disabled it on all the meshes in the scene and everything works as intended.

One other thing I found was interesting: the issue only occurs when there are more than like 15 materials assigned in the level. With all meshes set to the same material (or a low amount like 5), no matter how high-res or complicated in material graph, the issue does not persist. I didn’t test extensively on how much I could use because I needed all of them, but I’m sure the underlying problem has something to do with that weird behavior.

Same problem to me, every time I hit play it seems the material are randomly assigned to Nanite meshes, it’s very weird. Is this a known bug? Do we have a fix in the way?

Setting Skylight to “Static” or “movable” solved the problem.

2 Likes

Thanks so much, mate! Thank you all for the help. I see this as a simple bug, but painfully anoying! Cheers!

Thanks!