5
\$\begingroup\$

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

I want to add this material

enter image description here

To this

enter image description here

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:

enter image description here

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":

enter image description here enter image description here

[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?

\$\endgroup\$
4
  • \$\begingroup\$ What do the errors say? Does the compiler error give any clues? \$\endgroup\$
    – Steven
    Jan 7, 2015 at 3:01
  • \$\begingroup\$ @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. \$\endgroup\$ Jan 7, 2015 at 3:04
  • \$\begingroup\$ I found out that not all of the materials lose their textures. Haven't found out the difference yet. \$\endgroup\$ Jan 9, 2015 at 9:51
  • \$\begingroup\$ Is there any way to force UE4 to Compile Shaders? \$\endgroup\$ Jan 9, 2015 at 18:35

4 Answers 4

2
\$\begingroup\$

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

\$\endgroup\$
1
  • \$\begingroup\$ 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. \$\endgroup\$ Jan 11, 2015 at 2:37
2
\$\begingroup\$

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

\$\endgroup\$
2
  • \$\begingroup\$ 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. \$\endgroup\$ Jan 16, 2015 at 6:58
  • \$\begingroup\$ Sorry, misunderstood your answer the first time. Trying to link textures again doesn't help either. \$\endgroup\$ Jan 16, 2015 at 20:34
2
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .