Materials & Textures
This article covers Materials in the Unreal Engine
Last updated
This article covers Materials in the Unreal Engine
Last updated
You are reading an old article for Unreal Engine 4 - it should still work for Unreal Engine 5 though!
Materials are an asset that can control the look of a scene and how light interacts with that look. The most common type of material is one that you apply to the surface of an object.
Materials are created through the content browser, by [RMB] > Create Basic Asset: Material.
Like other content in Unreal, the name cannot include spaces. The common naming convention for materials is M_(Material Type/Purpose).
For example, you may have one material for all wooden frame elements in your Level, it may be called M_Frame_Oak.
Materials are formed formed by various inputs that are given data through textures, numbers or mathematical calculations. These are layered together to create a final material. All these layers will interact with each other to produce different results.
When using materials as a visual for a surface object, how it 'maps' itself to the geometry is dependent on the UV Mapping of the object. UV Mapping is the unwrapping of a piece of geometry into a 2D plane, which determines how a Material sits on it.
Refer to this page for further details on application as this article will only cover materials
UV and LightmapsThe Material Editor is based on the Blueprint Scripting system, refer to the Blueprint Scripting and Editor sections in this article of the Unreal Engine Primer to get an idea of the how to navigate the Material Editor:
Interactivity & BlueprintsReference | Panel | Description |
1 | Top Menu | Save, Apply and other previewing utilities are found here. |
2 | Preview | This preview of the material will continuously update as you edit your material. This can be navigated as you would any other 3D viewport, with options for the view type, whether lighting is calculated or not and the preview geometry. |
3 | Details | Details of the currently selected node can be found here. |
4 | Graph Editor | This is where you create your material through connecting nodes that define the inputs of your material |
5 | Palette | This is a list of all functions that you may find through |
6 | Material Node | This comes unique to the Material Editor, material properties are defined through this node, and all inputs will eventually go into this node to compute the overall material. |
As with the Blueprint Editor, nodes can be created in the following ways:
[RMB]
in the graph editor and searching.
[LMB]
on a pin and dragging out a wire.
Nodes can also be created through the Palette panel.
To work with pins and wires:
[LMB]
and drag from a pin, to a pin, to create a wire
[RMB]
over a pin to select from the context menu, or [Alt+LMB]
on a pin to break a connection.
Reference [1] in the above image. With the Material Node selected or with nothing selected, the details pane will show the properties of the material. The first step to creating a material is knowing what material you want to create as these define what kind of material you wish to create as this will change the kind of inputs are allowed by the material. Here is a brief rundown of the more important elements:
Property | Description |
Phys Material | Defines how the material behaves with physics, for example, how energy is distributed and hence how the applied object will bounce. This has no effect on the visual qualities. |
Material Domain | Defines what the material is used for, for example: the most common setting is Surface, which is commonly used as materials defines how an object's surface looks. Other options include Deferred Decal; for decal surfaces and Post Process; for custom view-based aesthetic styles. |
Blend Mode | Defines how the material interacts with the materials behind it when viewed, these are like your Photoshop Layer Modes. The most common setting is Opaque, for solid materials and Translucent for materials with transparency. |
Shading Model | Defines how the material inputs interacts with Lighting in the Level. The most commonly used setting is Default Lit for solid materials that will receive Level Lighting, other settings include Unlit for emissive materials, Clear Coat for translucent coatings and a trio of Subsurface settings for materials similar to human skin. |
For a description of the more obscure and niche settings, refer to the following Unreal Engine documentation:
Reference [2] in the above image, these will change based on the Material type that you have defined through the Material Property.
Property | Usage |
Base Colour | Used as the base colour of the material, takes an input of Vector3 |
Metal | How metal like a material is. Values are between 0 and 1 representing non-metallic and metallic. |
Specular | Only relevant for non-metallic surfaces, specular is how much light is reflected. Values are between 0 and 1 representing fully non-reflective and fully reflective. Defaults to 0.5. |
Roughness | Roughness is how the light is reflected, rough materials scatter light differently to smooth materials, manifesting in how sharp or blurry the reflection is. Values are between 0 and 1 representing smooth and rough. |
Emissive Colour | Controls what parts of the material can glow, it can either be the entire material itself or a masking texture (mostly black except for areas that need to glow,) that gives a numerical value (black = 0 ascending) to determine what emits light. |
Opacity | Used for translucent materials, and is only supported when using the Translucent Blend Mode. Takes a value between 0 and 1 representing completely transparent and opaque. |
Opacity Mask | Only available when using the Masked Blend Mode. Usually used for complex surfaces that have both 100% solid and see-through qualities, like with chain link fences. Sections of the material will either be visible or not visible as determined by a black and white texture. |
Normal | Simulates depth in a material as visual representation by using something called a normal map, avoiding the need to model intricate details such as grout between tiles. |
Subsurface Colour | Only available when using a SubSurface shading model. This allows for the material to simulate changes in colour as light passes through the material, most commonly used for human skin to simulate the underlying blood. |
Ambient Occlusion | Simulates self-shadowing through the use of a texture map. |
For a description of the more obscure and niche inputs, refer to the following Unreal Engine documentation:
Textures are a way to provide for the Material Node Input, usually referred to as Maps, and can take the following forms. When naming texture files, the usual convention is as below, but as long as you are consistent then it will make your projects more legible and easier to navigate:T_(texture description)_(data_type)
When grabbing material packs off the Unreal Engine Marketplace or other corners of the web, they will often come with textures that follow the naming conventions indicated.
Texture Type | Input | Usage |
Diffuse | Base Colour | Example Name: T_Rock_Granite_DIFF Used as the base colour of the material |
Normal | Normal | Example Name: T_Rock_Granite_NORM Usually referred to as Normal Maps, these textures are used to simulate surface details in a material. These are commonly RGB images where the colour corresponds to how that mesh should be displaced in the XYZ respectively. |
Bump | Normal | Example Name: T_Rock_Granite_BUMP An alternative to Normal Maps, these are grayscale images that affect only the height parameter of the surface. This can be converted into a Normal map using a |
Gloss | Roughness | Example Name: T_Brick_GLOSS Grayscale images that affect which parts of the image are reflective. |
Take note of the input values for the input, i.e, RGB value, value between 0-1.
With textures that come in grayscale, blacks have a value of 0 and whites have a value of 1 and everything in between is grey. If the grayscale needs to be inverted, use a [OneMinus]
node to invert it.
Now that you have an understanding of the Material Editor, Material Inputs and Textures, here are some examples of common basic materials. The interaction of layers is as important as the individual layers themselves.
In your designated Materials folder, create your Material through the content browser via [RMB].
If you do not have a Materials folder already, create one for better organisation.
Follow the naming conventions for the Material. e.g. M_BlueMetal
The Material Domain is a Surface, as it will be used on some geometry object.
The Blend Mode is Opaque as it will be a solid object that light will not pass through
Shading Model is set to Default Lit as it will interact with the Level Lighting to properly capture reflections.
Create a [Constant3Vector]
node by [RMB]
and searching for it in the Graph Editor. A [Constant3Vector]
is an array of 3 values, that can also be used as the 3 values for RGB.
[Double Click]
the node to bring up the colour picker. Alternatively, with the node selected, use the Details panel.
Connect the node to the Material Node.
Because it is a Metal material, the Metallic and Roughness inputs will be used.
Both Metallic and Roughness inputs accept a numerical value between 0 and 1. Create separate [Constant]
node by[RMB]
and searching for it. A [Constant]
holds a single value.
This value can be accessed by selecting the node and using the Details panel.
Connect the nodes to the Material Node.
The relationship between Metallic and Roughness will determine the end look of the material. Tweak these in parallel.
The Metallic input determines the glossiness of the material. The material becomes more reflective as the value increases.
The Roughness input determines how sharp the reflections are, as defined by how smooth the material is. The material increases from smooth to rough as the value increases.
In your designated Materials folder, create your Material through the content browser via [RMB].
If you do not have a Materials folder already, create one for better organisation.
Follow the naming conventions for the Material. e.g. M_BluePolymer
The Material Domain is a Surface, as it will be used on some geometry object.
The Blend Mode is Opaque as it will be a solid object that light will not pass through
Shading Model is set to Default Lit as it will interact with the Level Lighting to properly capture reflections.
Material Inputs : Base Colour
Create a [Constant3Vector]
node by [RMB]
and searching for it in the Graph Editor. A [Constant3Vector]
is an array of 3 values, that can also be used as the 3 values for RGB.
[Double Click]
the node to bring up the colour picker. Alternatively, with the node selected, use the Details panel.
Connect the node to the Material Node.
Because it is a Plastic material, the Specular and Roughness inputs will be used.
Both Specular and Roughness inputs accept a numerical value between 0 and 1. Create separate [Constant]
node by[RMB]
and searching for it. A [Constant]
holds a single value.
This value can be accessed by selecting the node and using the Details panel.
Connect the nodes to the Material Node.
This example will be of a Brick material, but the process is the same.
Create a new folder to hold textures for the same material.
Import Textures into your Content Browser, and rename them to match their Input type.
In your designated Materials folder, create your Material through the content browser via [RMB].
If you do not have a Materials folder already, create one for better organisation.
Follow the naming conventions for the Material. e.g. M_Brick
The Material Domain is a Surface, as it will be used on some geometry object.
The Blend Mode is Opaque as it will be a solid object that light will not pass through
Shading Model is set to Default Lit as it will interact with the Level Lighting to properly capture reflections.
Texture Sampler
To use textures for a material, use a [TextureSample]
node. Create it by [RMB]
and searching for it in the Graph Editor.
With the [TextureSample]
node selected, the texture can be applied through the Details panel. The preview will update in the node.
Connect the textures to their corresponding inputs.
The application of a material is dependent on the UV mapping of the material. Read more:
UV and LightmapsTweaks can be made through the Material Editor to change how the material is applied. This is most commonly used with textures.
Use a [TextureCoorodinate]
node to affect how the Material's textures deal with UV mapping. This node consists of the following parameters that can be accessed through its Details panel:
Parameter | Description |
U Tiling | How the texture tiles in the U (commonly horizontal) direction. This number refers to the number of texture tiles per unit of U. The default is 1 texture tile per unit. A value of 0.5 means there will be half a texture tile per unit, effectively doubling the texture size in that direction. While a value of 2.0 means there will be 2 texture tiles per unit, dividing the texture size in half in that direction. |
V Tiling | How the texture tiles in the V (commonly horizontal) direction. This number refers to the number of texture tiles per unit of V. The default is 1 texture tile per unit. Refer to above for changing this value. |
Un Mirror U/V | Unmirrors the texture in the corresponding direction. |
Connect this to all affected textures' UV pin to apply the changes.
Use a [CustomRotator]
node to rotate the Materials' textures. This node has the following pins:
Pin | Description |
UVs | The UV map to rotate. As a base, [TextureCoordinate] node can be used. |
Rotation Centre | The rotation centre accepts a Constant2Vector corresponding to the UV space with values between 0 and 1. With 0 and 1 being the corner extremes, e.g. [0,0] is the one corner and [1,1] is the opposite. The default value is [0.5,0.5] for the centre. |
Rotation Angle | The rotation angle accepts a Constant value between 0 and 1. With 0 being 0 degrees and 1 being 360 degrees. |
Make sure Materials are saved via the top toolbar of the Material Editor.
Live-edits can be made after adjusting your material by clicking Apply in the top toolbar of the Material Editor
Materials can be applied through the following ways:
In the Level Editor:
Select your Material in the Content Browser.
Drag it over to your Geometry in the scene.
In the Level Editor:
Select the object that you wish to apply a material to.
In the Details panel, navigate to the Materials section.
Click the drop-down list and choose or search for the material to apply
This content was created for Master of Architecture Design Studio 40, led by Rochus Hinkel.
Summary of this article's bascis material setup