• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

PC Custom Materials can't be built in-game

Marco

Grizzled Veteran
May 23, 2009
644
230
Finland
Category: Code/2d art

Reproducibility: Always

Summary: Creating own custom materials will be replaced by default textures in-game unless you have editor to compile the material first (for custom mods).

Description: If you create a custom material that you use for your mod, you must always load the package once in editor first before you use it, or else the game wont compile the needed shader for it in-game. This is problematic for on-line games where clients who downloaded the mod from server wont have it compiled.

However this does not effect custom MaterialInstanceConstant/TimeVarying (not in every case for these works either), because most of the time they need no compiling.

Also does not effect if the material is used in the map (seams game compiles materials during map load then again).

It is very easy to reproduce, make a mod (such as a new weapon or zed) where you use a custom material in. Then delete your LocalShaderCache-PC-D3D-SM4.upk and LocalShaderCache-PC-D3D-SM5.upk from UnpublishedPC folder and launch the game and summon the object that is using the custom material and you'll see it renders as default texture now.

Log relevant to this error:
[0069.70] Log: Trying to compile CHR_Specimen_Master_PM at run-time, which is not supported on NOEDITOR builds!
[0069.70] Warning: Warning, Failed to compile Material Instance <SkinName> with Base CHR_Specimen_Master_PM for platform PC-D3D-SM5, Default Material will be used in game.

Online/Offline: Both.
 
Last edited:
  • Like
Reactions: duk6046