Texture only 1 face of a cube

Hi all,

While I think it’s a great idea to check out resources on how to UV map your mesh, there is another method that I can recommend for achieving the desired effect in the engine without the need to redo your UV maps.

In the example provided ThunderChicken asked how to apply a texture to just one side of his mesh (like a scrabble tile) and be able to change this texture dynamically. I think using a deferred decal would be good for this particular scenario.

  • Create a blueprint actor with your mesh
  • add a decal component
  • create a deferred decal material and use that for the decal component (make sure the decal is sized and rotated correctly so that it applies to the mesh)
  • in the decal material you can adjust the texture dynamically at run time and since it is a child component of the Blueprint it will always be oriented correctly relative to the mesh

Here is a very simple example where I used a texture of a target. You can also mask out parts of the texture by using the opacity input in the material. Typically a black and white texture is used (white is fully visible and black is hidden).

I hope that helps,

Ed