Before jumping into the tutorials, familiarize yourself with Essential Materials Concepts, the Material Editor User Guide, and the Material Editor UI. These pages provide the background knowledge about creating a material instance and the Material Editor.
Base Color, Metallic, Specular, and Roughness are the foundation of how materials work in UEFN.To better understand how you want materials to look and behave, refer to Physically Based Materials. This page explains how the different inputs of the Main Material Node (or the Material root node) work and interact with one another.
To understand how to use input pins on the Main Material node, refer to Material Inputs. The page describes how different pins help create specific types of surfaces.
Material Properties
A material defines the properties of a surface, and a shading model defines how the surface interacts with light.
For the most part, the material properties in the Material Editor Details panel won’t change when you're making materials for meshes. Change the Material Domain setting when creating a material that interacts with players through user interfaces (UI), post processing, or lighting. Below are the default settings to use when starting out.
| Property | Setting | Description |
|---|---|---|
Material Domain | Surface | Defines how the material will be used. Surface defines how the material on the surface of the mesh. |
Blend Mode | Masked | Defines how the output of the material will blend with pixels behind it. Masked creates a mask over the mesh. |
Shading Model | Default Lit | Defines how the surface material makes the final color by setting how the material interacts with light. Default Lit shading is good for any solid mesh. |
When you become more comfortable with material creation, play with these properties to change how the material interacts and sits on the mesh.
If you are creating a material for a hollow mesh or one that is two-sided, check the option for Two Sided to create a secondary color for the backside of the mesh, which is perfect for creating a material for something thin, like the leaves of a plant.
Nodes
UEFN uses Material nodes to create Materials and textures, or to turn into Material Instances so parameters you set in the material can be refered to in devices, post processing, lighting, UI, and more. The Material Editor opens with a Main Material node which takes additional Material nodes into its input pins. By assigning values to the Material nodes, you define the color of an asset, how the color looks on the asset, and how the texture acts on the asset.
Depending on the material nodes you choose, you can use textures and UVs in your material to create interesting effects like blinking lights, or wind blowing through your foliage.
Use the Base Color input of the Main Material node to see what the different nodes do. The Main Material node can even take Float, 3Vector, or 4Vector values from a Default Color node.
Drag and drop a material instance onto your mesh in the viewport. Reduce the size of the Material Editor window and you can edit your mesh material nodes live without having to compile.
The table below lists the most commonly used nodes. Edit the node values and plug them into the Main Material node to see what they do.
| Image | Node Name | Description | |
|---|---|---|---|
Constant 3Vector expression | Add a color to your Main Material node. You can assign individual values to the R, G, B, and A inputs with a Value node. The RGB inputs translate into directions:
Learn more about the constant values by referring to Material Data Types. Hold 3 and left-click to add a Default Color node to the Material Editor. You can right click on the Default Color node when you have it in the Material Editor and change it into a Color Parameter node. | ||
Constant node | Adds a defining value to a material node or material attribute. Plug this node into another node to define its value, or plug it directly into the Main Material node to define the value for an attribute. Hold 1 and left-click to add a Value node to the Material Editor. | ||
Scalar Parameter node | Adds a parameter value for the attribute the material node is plugged into. Search for the Scalar Parameter node in the Palette panel. | ||
Interpolate node | Adds an individual value to the A, B, and Alpha inputs and interpolates between the sources of information. Add color nodes to the Lerp node A, B, and Alpha inputs, then plug the Lerp node into the Main Material node to create color blends between the RGB values and the attribute. The Lerp node can even be plugged into another node type to create an effect on one of the Material attributes. Search for the Lerp node in the Palette panel. | ||
Coordinate node | Adds a color value to a coordinate. Add the color coordinate to one attribute or to two different attributes. Hold 2 and left-click to add a Coordinate node to the Material Editor. | ||
Material Expression Constant 4Vector node | Adds a constant color across four color inputs that can be plugged into one attribute, or spread across multiple attributes using the RGB and Alpha inputs. Add the Constant node to one attribute or across multiple attributes. Hold 4 and left-click to add the Constant node to the Material Editor. | ||
BumpOffset node | Adds values to the coordinates on a heightmap to create depth texturing on a material by distorting UVs. The BumpOffset node uses height information on each pixel to add depth to the texture. Use this node with a Texture Sample node to play with the texture values and appearance. Search for the BumpOffset node and the Texture Sample node in the Palette panel. | ||
Time node | Asks the editor questions about time, counts in-game time, and provides a value for the attribute it is plugged into. Plug the Time node into other material nodes to define a time limitation for the material node’s effect on an attribute. Search for the Time node in the Pallete panel. | ||
Hue Shift node | Shifts between color values when plugged into an attribute. Use the Hue Shift node with a Value node to define the value for the Hue Shift Percentage, and add a texture by plugging in a texture node. Search for the Hue Shift node in the Palette panel. | ||
Panner node | Changes the speed and the direction UVs travel (pan) in a Material instance. Choose a value for the Coordinate and Speed. Additional Value nodes can be plugged into the Panner to further define singular attributes. Search for the Panner node in the Palette panel. | ||
VertexNormal World Position Offset node | Moves vertices in random directions. Plug a value node into the VertexNormalWS node to assign a value to the amount of movement the vertices will travel. Search for the Vertex Normal World Position Offset node in the Palette panel. | ||
Noise node | Adds a texture (noise) to the material attribute it is plugged into. Can be used with a specific texture to add a "pattern" to the noise or to produce a desired texture. Plug other Material nodes into the Noise node to distort certain aspects of the Material. Search for the Noise node in the Palette panel. | ||
Multiply node | Provides a way to multiply the effect of a node on a specific attribute. Plug other Material nodes into the Multiply node to create a desired effect on one of the Material attributes. For example, plug a Default Color node into the Multiply node, then add a value to the Multiply node and plug the Multiply node into the Emissive input to create a light effect with the Material. | ||
Mask node | Adds a masking effect to the R(X) or G (Y) input of an attribute. | ||
AppendVector | Combines data channels together to create a vector with more channels than the original. An AppendVector works in order of input, the A input is always | appended before the B input. | |
Step node | A step node is a shader function that compares two values to specify the edges of one value against another creating a step from one value to the next by defining the values' edges. This can be used to define gradients by determining how much of one color value to show against the second color value. | ||
TextureCoordinate node | The node outputs UV texture coordinates as a two-channel vector value providing a way for materials to use different UV channels, specify tiling, and operate on teh UVs of a mesh. | ||
Clamp node | A Clamp node takes in values and constrains the values to a specific range defined by minimum an dmaximum values. | ||
LinearGradient node | Uses the UV channel 0 to generate a linear gradient in either the U or V direction, depending on which output is used. | ||
ConstantBiasScale node | Takes an input value and adds a bias value to it, and then multiplies it by a scaling factor outputting the result. | ||
Ceil node | Ceil is an expression that takes in values, rounds the value(s) up to the next integer and outputs the result. So if a value of 0.2 is input into a Ceil, it rounds the value up to 1.0. | ||
Named ReRoute node | Provides a way to name the node and reroute material nodes. Rerouting Material nodes allows you to create complex textures and UVs by stringing multiple Material nodes together, then plugging the end value of the string into the Material node used to create the Base Color. |
To learn how to organize a Material Graph, refer to Organizing a Material Graph in Unreal Engine documentation.
Use these shortcuts to open the following material nodes.
Constant
Hold down 1 key on keyboard and click.
Constant 3 Vector
Hold down 3 button on keyboard and click.
Multiply
Hold down M key and click.
Linear Interpolate
Hold down L key and click.
The more you experiment with the nodes, their values, and which attributes you want to affect, the better you will become at creating custom Materials and textures. Understanding how to use values is key for creating Materials. Use the Material you create on meshes you import, or on meshes you made using Modeling Mode.
Materials and textures can even be used with the Cinematic Sequence device to create custom effects on meshes as well.
Learn the basics of Material creation by referring to Creating Shiny Material, Using the Emissive Material Input, and Using Transparency in Materials. These tutorials cover basic Materials that are shiny, metallic, light infused, and working with less opaque Materials.