Material Mixup? Blender confusing materials for other materials?

I have made a prop and have assigned some different coloured materials as well as some image textures to certain parts of the mesh. These show fine in the viewport in textured,material and rendered view but when I play the game it shows the wrong materials assigned to the different areas. An example is below, first image is viewport, second is in the game:

If I assign a different material to an area and then play the game a different material is shown. Example below:

I have never had this issue before, any help would be very much appreciated. I am using some PBR materials as well as textures and plain materials. Not sure if that means anything


Is each material assigned to at least one face? Any interesting output in the system console? Sounds like a bug in Armory exporter.

No not all materials are assigned a face as I want to assign a face to a different material depending on a button press. However, after opening the console i found that there was some "Armory warning"s such as:

Armory Warning: Object Radio - unable to bind materials to vertex data, please separate object by material (select object - edit mode - P - By Material) or enable Deinterleaved Buffers in Armory Player

I then enabled Deinterleaved buffers which removed any errors in the console but failed to fix the material mix up issue

Hey, just something else I found. It doesn’t seem to be contained to objects with multiple materials as even those with just one material suffer from this.

I have however found that only objects which use a PBR material suffer from this. I have a few objects which are just image textures and they seem to work fine. Not sure of course what the issue is but my guess would be something related to correctly loading the PBR textures and use of PBR node?

Not sure if that helps or not

1 Like

Pushed a patch on git which should resolve this, but I only tested on a simple cube so far. If you still get material mix-up on your model please put the blend file somewhere and I will investigate.

Sadly it didn’t seem to fix it. Here is the blend file for you to look at:

Just because im cautious that I may be doing something wrong, to update you just need to press the “Update SDK” button dont you and then restart armory, nothing else?

Hey that’s a cool scene! Yup, updating like that should be correct. Oddly enough I think it looks ok here now. Armory should do this automatically after updating, but can try doing Armory Player - Clean to make sure? If that does not work then looking at the console when hitting “Update SDK” button might reveal some more info.

Still looking weird but I decided just to use a plain image material rather than any PBR and so far its working ok. I might try and get the PBR version to work when I have time