Materials not loading when switching in game

Hi,

I have a problem with some of my materials not loading. I’m doing arch-viz and I need to be able to change materials while in game. I’ve set up a system to do this where I have an array of materials (created in the editor) which the user can choose from, and the material is then updated on an object using the ‘Set Material’ blueprint node. Usually this works perfectly, but sometimes it loads up the default material (grey checkerbox) instead. I’m using the Substance plugin and at first I thought it was only happening with Substance materials, but I realised today that it’s also happening with other ones.

Here is an example of what I mean: Imgur: The magic of the Internet

The first screenshot shows the material that I set in the editor on the benchtops. The second shot shows the benchtops with a material that I have chosen in-game, which worked. The third screenshot shows another material that I selected in-game, which hasn’t worked.

The material that hasn’t worked is a very simple material (not Substance). It just has a texture sample plugged in to Base Color with a TexCoord node to scale the UV’s, and two constants plugged in to Specular and Roughness. The one that has worked (second screenshot) is a Substance material. Usually the Substance ones are the ones to not work, but this time it was the other way around.

The materials all work fine if I apply them in the editor and then run the game - it is only when I change them while in-game that they sometimes break. I have noticed that if I change the mobility of an object and then change it back (e.g. static > stationary > static) it actually fixes it for a while and the textures will all work properly when switched in-game, but it breaks again after a while.

I’m still doing more tests to narrow down where the problem is coming from but does anyone have any suggestions on what may be causing this?

Can we see your blueprint setup and material setup?