Why are my materials not rendering after updating to 4.25? Any help is greatly appreciated.

Hi Everyone,

Can anyone help me? After updating to 4.25, any materials located in separately mounted pak files are not rendering properly. I am only seeing the default material. Materials found in Content\Paks[myproject]-WindowsNoEditor.pak work no problem, but not those found in separately mounted pak files. Everything worked fine in 4.23.4 and all versions prior. Any help is great appreciated.

Here is the mount function I am using:

if (FCoreDelegates::OnMountPak.IsBound())
{
	// Mount pak
	FPakFileVisitor Visitor;
	if (FCoreDelegates::OnMountPak.Execute(PakPath, 4, &Visitor)) //0-4; specifies search order
	{
		UE_LOG(MyLog, Log, TEXT("Pak Mounted Correctly"));
	}
}

As a test, I mounted a pak file with 1 unique material named M_TestMaterial. This works fine in 4.24.3 but I am guessing something changed in 4.25. Here is the error it generated:

LogShaders: Error: Missing shader resource for hash ā€˜CC82171EE3D12616F2284E1AE3F5E5B6373A9F22ā€™ for shader platform 0 in the shader library

LogMaterial: Error: Tried to access an uncooked shader map ID in a cooked application

LogMaterial: Warning: Invalid shader map ID caching shaders for ā€˜M_TestMaterialā€™, will use default material.

LogMaterial: Canā€™t compile M_TestMaterial with cooked content, will use default material instead

LogMaterial: Warning: /Game/MyMaterials/M_TestMaterial.M_TestMaterial: Failed to compile Material for platform PCD3D_SM5, Default Material will be used in game.

Thank you for your help

Hi SPF,

We were having the same issue and upgrading to version 4.25.1 resolved the issue for us.

Kind regards,
Stijn

Check textures are shared wrap

probably cant find the texture files anymore as link to file path probably gets broken in the upgrade? just my guessā€¦ i noticed with blueprints a different node needs to be used in different versions and changes need to be made to allow the same result from a previous version of the editorā€¦ in C++ maybe you need to switch a couple of lines to different wording to accomidate the changes made to the engine over the years.

Hey, SPF.

Sorry to revive an old post with another question instead of an answer.

Iā€™m currently having this exact issue with 4.25.4 - did you ever find a solution, or, if not, any further information that might help us both out?

ā€“
LHC

For anyone facing this problem, after a fortnight of searching I finally found the problem.
If you are building an application and DLC pakā€™s that the base application will download, make sure that you DESELECT ā€œShare Material Shader Codeā€ in the packaging section of the project settings.

4 Likes

Many thanks has worked for me with 4.27!

Me too! Thanks @maffew , I needed this a lot a few hours before my bachelor thesis is due)

1 Like