Contributors

Materials & Textures

Materials control how surfaces look and respond to lighting in Unreal Engine. This guide creates a basic surface material and a material instance, which lets you change the material’s textures and settings without rebuilding its node graph.

With the custom editor, you can create new materials and textures for use in PAYDAY 3 as long as the assets and features used by the material can be successfully cooked for the game.

The same Material Editor can also create materials for decals, UI, and post-processing effects.

Before You Start

Create your own master material, the base material that holds the node graph. PAYDAY 3’s cooked materials have had their editor data removed, so they offer limited use as editable starting points.

If you plan to share your materials, avoid Static Switch Parameter nodes. They can cause problems or crashes for users working without the custom editor.

Creating a Master Material

To create a master material, go to the area of the Content Browser where you want to create it, right-click, and select Material under the Create Basic Asset section.

For this guide, name it MM_YourMatName. We will be working with both master materials and material instances, so using prefixes such as MM_ and MI_ helps keep them organized.

When the material opens, the available inputs depend on its current settings and Material Domain. A normal Surface material can expose inputs such as Base Color, Metallic, Specular, Roughness, Normal, and Ambient Occlusion.

The material settings are also where you configure properties such as Blend Mode, Two Sided rendering, and Material Domain.

This guide uses the default Surface domain and builds a simple Base Color/ORM/Normal material.

How material domains change the editor

The Material Domain determines what the material is used for. Depending on its domain and settings, a material can be used for:

  • Mesh and surface materials

  • Decals

  • User interface elements

  • Post-processing effects

For example, choosing Deferred Decal, User Interface, or Post Process changes the node graph and available outputs to match that purpose. These use the same Material Editor as a Surface material, but need different setups.

For other material setups and more detailed explanations, see:

Adding Nodes

To add your own new node, right click anywhere on the grid and a popup of nodes will appear. You can use the search bar to find nodes that you need, and there are also a few hotkeys that you could use.

To start off with our basic Base Color, search for a TextureSampleParameter2D and connect the RGB pin to Base Color, this will allow for you to change the texture in a material instance, which will be brought up later. You can name the Parameter to anything you like, "BC" or "Base Color" would fit.

An ORM texture stores Occlusion, Roughness, and Metallic data in its red, green, and blue channels. Packing these three masks into one texture is common in Unreal Engine games and helps reduce file size and texture use.

Copy and paste your texture, rename the parameter to ORM, and use the "DefaultDiffuse_TC_Masks" texture.

For this texture, the sampler type of this texture would need to be "Masks" for it to visually display correctly, not being able to do so would result in issues in displaying the texture.

Take the R channel and put it in the Ambient Occlusion node

Take the G channel and put it in the Roughness node

Take the B channel and put it in the Metallic node

Lastly, for your normal map, you can paste another texture node and call this new texture parameter NM, and replace the texture being used with a normal map from the engine editor resources. Then take the RGB output and put it in the Normal Input

Your final result of the material should look like this if you have followed all steps properly.

Material graph connecting Base Color and ORM and Normal texture parameters to the material inputs

Emissive (Glowing) Textures

Emissive textures or vectors control if you want parts of your model to glow. This can be handy if your material makes use of an emissive texture to add extra detail. If you want to control the brightness of your emissive texture, you can add a scalar node and a multiply node, plug your texture or vector into the A slot of your multiply and your scalar into the B slot. Call your Scalar Node "Emissive Brightness" or something to refer to easily.

Material graph multiplying an emissive color by a brightness parameter

Emissive textures on some heists are displayed correctly, but could sometimes appear to be too dim or too bright in some other heists due to post processing of the heist or light exposure.

To fix this issue from happening, take the output of either your texture or multiply node and add a Divide node and plug it into the A slot. Get an EyeAdapation node and plug it into the B slot of the divide, then plug the output of the divide into Emissive Color, and this will resolve your issue of inconsistent emissive brightness on certain maps.

Material graph dividing emissive color by EyeAdaptation before the Emissive Color input

Opacity Masking Textures

Opacity textures are commonly used on textures that require opacity, like hair or glass. To properly use a opacity texture, set your blend mode of your material to "Masked" or "Translucent" but I do no recommended using a translucent blend unless you know how to use one properly. It is also good practice to have your opacity be combined with either your Base Color or ORM texture packed in the alpha channel to avoid calling extra textures.

Material Editor showing Masked blend mode and the Opacity Mask input

Though using a masked blend technique is less resource costly, the output of the opacity could be unsatisfying. Opacity usually in this format works in a 0 or 1 value, where a part of the texture is either visible or invisible. But if you want to mimic the use of using a translucent blend mode without needing to use the extra shader work to use one, you can use a "DitherTemporalAA" node which will act like a psuedo translucent material for your material. Simply plug in your Scalar or opacity texture into the Alpha Threshold (S) input and your Result into the Opacity Mask node. You can add an extra scalar parameter to the Random (S) input, but it is recommended to either keep it alone if you do not want to use it.

Material graph connecting an opacity parameter through DitherTemporalAA to Opacity Mask

Starbreeze Formatted Normal Map Textures

A normal map texture is what mimics fake 3D bumps and lighting on a model to give it extra detail. Many modern models use them, whether it would be for the model as a whole, or overlaying multiple patterns over. But I will explain how you can create your normal map the Starbreeze way.

Starbreeze has formatted their normal in a rather unusual way, instead of going the traditional way of having a XYZ channel, they opted to only use a XY channel and replaced the Z height with a roughness channel, and packed in a metallic in the alpha, this normal map format is seen on the MM_HelicopterInterior that many users have used before custom master materials have become a thing.

If you would like to recreate it in favor of using it instead of a normal XYZ, here are the steps to do so:

  • In your master material, instead of using a normal map texture, you want to use a Linear Color Normal Map. Regular normal maps do not support alpha channels, and are not compatible with having other texture masks in their channels.

  • Add an AppendVector and connect your XY (RG) color masks to the A and B slot.

  • Connect the AppendVector output to a ConstantBiasScale, make the Bias have a value of -0.5, and the Scale 2.0

  • Connect the output of the ConstantBiasScale to a DeriveNormalZ and connect that final node to your Normal slot.

Your final output should look similar to this:

Material graph reconstructing a Starbreeze normal map with AppendVector and ConstantBiasScale and DeriveNormalZ

With the DeriveNormalZ, this will reconstruct the Z height of the normal map using the X and Y channels, so you are not losing much detail if you use this format of normal maps.

This setup is almost the same to the Linear Color formatted normal as it will be explained at the bottom of this document, but with the exception of there being a Roughness and Metallic channel instead of a Z height channel.

Node Shortcuts

These are some of the shortcuts I use frequently, but there are plenty more.

M + Left Click - Multiply Node

A + Left Click - Add Node

I + Left Click - If Node

S + Left Click - Scalar Parameter Node

O + Left Click - Invert (1-x) Node

1 + Left Click - Constant Node

4 + Left Click - Constant 4Vector Node

T + Left Click - Texture Node

C - Comment

Creating a Material Instance

Once you are done tinkering with your Master Material, it is now time to create your Material Instance. A Material Instance is basically your original Master Material, but you are able to freely change scalars and paremeters/textures to what you want it to be.

To create a Material Instance, right click on your Master Material and in the "Material Actions" tab, select "Create Material Instance".

By default, Unreal Engine will call this Material Instance whatever your Master Material was, but ending in "_Inst"

If you want to rename it, name it "MI_YourMatInstName"

In the Material Instance screen, you can drag and drop your textures over the appropriate parameter, and save.

Material Instance Editor showing the texture parameters and material preview

Importing Textures

There are plenty of different textures you can import, ranging from texture sheets to UI textures or stickers.

Base Color textures should be imported with "BC7 (RGBA)"

Masking textures, like an ORM texture for example, it is advised to set the compression to "BC7 (RGBA)" and unticking the "sRGB" box.

For normal maps, set compression to "NormalMap (BC5)" and unticking the "sRGB" box.

"NormalMap (BC5)" can cause channel artifacts, so if you instead want to use BC7 for better quality, set the texture’s sampler type to Linear Color, plug the RGB node into a "ConstantBiasScale" make the Bias value -0.5, and your Scale value 2.0, then plug into a normalize node.

Linear Color normal texture connected through ConstantBiasScale and Normalize to the Normal input

If your Normal Map is also formatted in OpenGL (Y+) you can use the "Flip Green Channel" setting to convert it to a DirectX Normal Map.

UI textures should be imported with "UserInterface2D (RGBA8)" And also in the Mip Gen Details change the setting "FromTextureGroup" to "NoMipMaps" it is generally not advisable to have texture streaming on your UI element texture as it could get lowered with texture quality, which you do not want.

If you’re porting a model or adding a collection of new textures you can select each texture, right click and hover over "Asset Actions" and in the second menu that appears, select "Edit Selection in Property Matrix" this can allow you to mass edit textures instead of needing to do it all one by one, which can be a huge time saver.

Content Browser Asset Actions menu with Edit Selection in Property Matrix highlighted