top of page

Creating Custom Masks

In the Modular SciFi Series, masks are used to designate boundaries for colors and pbr values. When developers make changes to their diffuse textures in external packages such as Photoshop, updating the mask may be necessary. In this guide, you will learn how to modify a diffuse and it’s respective mask, and then bring those updates into the engine.

Exporting The Texture

  • Open the Project, and navigate to the Textures folder in the Content Browser.
     

  • Right Click on the Mask you want to export, select Asset Actions and then Export.

 

  • Select .TGA as the file type, and save the texture to your preferred location.

 

Note: Some Diffuse Texture PSDs, generally containing paint or text, are available as extra resources upon request. Those that are not can be extracted via the method described above.

 

Modifying The Texture

  • Open your Diffuse and Mask in Photoshop.

 

 

 

For this example, I used the WallCabinet_B Diffuse and Masks. This particular Diffuse is available through the aforementioned resource files.

You will notice that there are 3 layers named Red, Green and Blue at the top of the layers list. These allow you to keep track of the individually designated mask areas. As you add or subtract coverage you will want to make sure these are up to date. [If no such layers exist, you can easily make your own.]

 

It is also important to note, that you want to avoid overlap between the 3 channels. Space that is occupied in the Red channel should be empty in all others, and vice versa.

  • Create a new layer.

 

  • Add a design that you wish to integrate with the texture. For the purpose of this tutorial, I have added corners to the edges of the First Aid door.

 

  • Click the eye next to the Red layer to make it visible.

 

This will reveal the portions of the texture that are marked for the Red channel. Since we are adding a new piece to the door decal, we will have to add space to the red channel to account for the changes. If you were subtracting space, you would merely delete it from your desired channel.

  • CTRL + Click the layer thumbnail of your new addition to acquire the selection.

  • Select the Red layer. Press the letter D to set white as your background color, and then press CTRL + Backspace to fill in the new space in the Red layer.

 

  • CTRL + Click the Red layer’s thumbnail to ensure that it now encompasses the newly added space.

Updating The Mask

  • Navigate to your Mask texture in Photoshop
     

  • In the Layers Panel, click the Channels tab.

 

  • If you click on the individual channel layer, you will see the isolated areas that the texture comprises of. Select the Red channel layer.

 

  • Press D to set your background and foreground to black/white, and then press X to switch black to background.  Press CTRL + Backspace to fill the entire Red channel layer black.

 

  • Navigate back to your Diffuse texture. With the Red layer selected and visible, CTRL + Click the layer thumbnail, and then press CTRL + C to copy the contents.

 

  • Navigate back to your Mask texture. Make sure you are in the Channels tab of the Layers panel, and that the Red channel is selected.

 

  • Select Edit > Paste > Paste in place

  • Press CTRL + D to deselect, and then select the RGB layer to view the changes.

  • Save both the Diffuse and Mask files as .PNG. Use the same name of the existing files if you intend to overwrite them, or new names if you wish to have variants.

 

  • Import the textures into your Project’s Texture folder in UE4. If new names were created, plug the new Diffuse and Mask into a material instance to view your modifications.

This guide demonstrated how to add new details to your diffuse, and account for the changes through masks. What you’ve learned can be applied to all channels, to subtract or add coverage.

bottom of page