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

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

\$\endgroup\$
  • \$\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\$ – balintpekker Jan 11 '15 at 2:37
1
\$\begingroup\$

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.