# Why do I get a blank material in Unreal Engine 4?

When I'm adding a material to a box in UE4, the material loses its textures.

I want to add this material

To this

After I'm trying to drag & drop the material into the scene above (like in UDK) the material loses its textures and does not apply:

When opening the material in Material-builder, the same thing happens: the material loses its textures and I've got these two errors on "Stats":

[SM5] (Node TextureSampleParameter2D) Param2d> Requires Texutre2D

[SM5] (Node TextureSample) TextureSample> Missing input texture

I've searched and found a thread where they say I need to save the material again to get things right. When I click the save button, I have this error:

The current material has compilation errors, so it will not render correctly in feature level SM5.

NOTE: Using DepthFade node + Lerp and changing the blend to translucent didn't resolved my issue.

Any idea?

• What do the errors say? Does the compiler error give any clues? – Steven Jan 7 '15 at 3:01
• @Steven The error says nothing, just it has errors and it won't render correctly in SM5. Everything is in the question I could say about this. – balintpekker Jan 7 '15 at 3:04
• I found out that not all of the materials lose their textures. Haven't found out the difference yet. – balintpekker Jan 9 '15 at 9:51
• Is there any way to force UE4 to Compile Shaders? – balintpekker Jan 9 '15 at 18:35

Make sure your textures exists on the correct path. If you delete or move a texture the materials may throw errors.

• It seems like everything is OK. The textures are on the correct path, I found out I need to hit Ctrl+Shift+. to compile shaders manually, it compiles, and then boom, the same error. – balintpekker Jan 11 '15 at 2:37

Your texture samples in material have no textures inside him. Try to link textures to the material again.

• This is a sample material comes along with UE4. In general, they have textures inside the material, but if I open them up or apply them they lose textures. – balintpekker Jan 16 '15 at 6:58
• Sorry, misunderstood your answer the first time. Trying to link textures again doesn't help either. – balintpekker Jan 16 '15 at 20:34

If you want to add the material to an Actor, just select it in the editor, select the StaticMeshComponent of any other Mesh and then you can select a material in the Properties Panel, just type it into the search box. If the Actor is a StaticMesh itself, you can select the Material in the Properties Panel directly.

I guess you have a folder with a bunch of materials that you downloaded and not a complete project.

The thing is that you cannot use them just by copy-pasting them directly into your project.

Do the following to be able to use them:

1. Copy the whole folder and paste it on the directory where your VaultCache is located. ( Program Files x86 > Epic Games > Launcher > VaultCache).

2. After that, open your Epic Games Launcher and go to Unreal Engine > Library.

3. If you look at the bottom there's a Vault tab. And under that should be the Asset Folder you just pasted in your VaultCache.

4. Press "Add to Project" and select the project you want to use it on.

There's a chance that you'll have to select an earlier version than the one you're using.