Download

Material fails to compile during packaging

Hello. Today I have tried a test package for my game and was met with some warnings for material MI_Solid_DarkGray. After looking through them I found one that says “Failed to compile Material Instance with Base M_SolidColor_Base for platform PCD3D_SM5, Default Material will be used in game.”. In game the material seems to be missing from the walls that I’ve put it on. I got this material from this asset pack:

What could be wrong with it?

Read the log, it will tell you the exact error.

Usually, moved files with dead references cause those types of errors.
before packaging you may want to right click the content folder and fix up the references.

Sometimes however projects can get stuck looking for removed files.
When that happens, you usually delete a few folders from the project’s /saved directory to fix it.
You need to look up which are safe to delete. Can’t recall offhand.

btw, I packaged the whole thing inside a project around 3 months ago with no errors, but it was on .25.

Check the references first. Make sure the material has the textures.

Ok so I’ve ran the reference fixed and deleted the saved folder however I still have the same results. Here’s how the material textures are configured:

And in game it’s applied like this:

The only output I’m getting about it in the output log is:
UATHelper: Packaging (Windows (64-bit)): LogMaterial: Warning: [AssetLog] C:\Users\vagab\Documents\Unreal Projects\ProjectGQ Git\ProjectGQ\Content\StarterBundle\ModularSci_Comm\Materials\MI_Solid_DarkGray.uasset: Failed to compile Material Instance with Base M_SolidColor_Base for platform PCD3D_SM5, Default Material will be used in game.

PackagingResults: Warning: [AssetLog] C:\Users\vagab\Documents\Unreal Projects\ProjectGQ Git\ProjectGQ\Content\StarterBundle\ModularSci_Comm\Materials\MI_Solid_DarkGray.uasset: Failed to compile Material Instance with Base M_SolidColor_Base for platform PCD3D_SM5, Default Material will be used in game.

UATHelper: Packaging (Windows (64-bit)): LogInit: Display: LogMaterial: Warning: [AssetLog] C:\Users\vagab\Documents\Unreal Projects\ProjectGQ Git\ProjectGQ\Content\StarterBundle\ModularSci_Comm\Materials\MI_Solid_DarkGray.uasset: Failed to compile Material Instance with Base M_SolidColor_Base for platform PCD3D_SM5, Default Material will be used in game.

The base material doesn’t seem to have any errors indicated.

Well, you are using a custom texture. Maybe that texture is not in the correct format for SM5 and the material?

Usually blend masks are set to Linear Color / grayscale.
The instance of the material would flag any issue of a mismatch in yellow in the top left area.

Open up M_SolidColor_Base and force a re-compile anyway. Move something and click apply. see if that gives you any errors (there aren’t any for me in .25)

Also, there should be a different log, that’s not the Output log you are reading.
I can’t remember what/where it’s at. But maybe check the same directory of the output log for it?

Try a console command showlog - used to work a year ago at least.

Thanks. Clicking apply revealed an error on the instance which was not there before. I had to change the Sampler Type to Linear color here:

The other option would be to change the texture to whatever format the sampler takes in.
Which may be better depending on what else uses the material.