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
The 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:
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:
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.
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.
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:
Tweaks 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:
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:
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