How do you make a cloth shader in Unreal Engine 5.7?

Creating believable fabric materials is an important part of building realistic characters, clothing, furniture, and environmental props in Unreal Engine 5.

In this tutorial, you’ll learn how to:

  • Build a basic cloth material
  • Add a woven fabric normal map
  • Tile the texture for extra detail
  • Remove the plastic appearance
  • Use the Cloth shading model

Add realistic fabric fuzz lighting

Step 1: New Material

1. You will need a normal map for the cloth you want to make

A normal map is a texture mapping technique in 3D computer graphics that simulates the illusion of surface depth, bumps, and dents without altering the actual geometry of a 3D model.

2. In the content browser, right-click and make a new folder for your material

3. In the folder, drag-and-drop your normal map for the cloth (and mesh if you have one)

4. Right-click and choose “material” – naming it appropriately

5. Double-click on the material to open it


Step 2: Base Color

1. Hold down the 3-key and left-click to add a constant 3 vector

In Unreal Engine 5, the Constant3Vector is a material expression that outputs a three-channel vector value, consisting of three constant numbers. It is primarily used to define a solid RGB color, where each channel corresponds to Red, Green, and Blue.

2. Connect the constant 3 vector to the base color

Shading Models in Unreal Engine 5 define how a material interacts with incoming light, determining the specific lighting calculations and visual properties applied to a surface.

3. In the details panel, choose the color you want to make the cloth

4. Right-click on the constant 3 vector and convert it to a parameter – renaming it “cloth color”

In Unreal Engine 5, a parameter is a customizable variable within a material or system that allows for dynamic changes without altering the base asset.

Step 3: Roughness

1. In general, real cloth is not highly reflective

2. Hold down the 1-key to add a constant vector

In Unreal Engine 5, Constant Vector nodes are material expressions that output fixed, multi-channel values (scalars or vectors) which do not change once set in the editor.

3. Change the value to around 0.3

4. Connect the constant vector to the roughness input

5. This reduces excessive shine while still allowing some light response

6. Right-click on the constant vector and convert it to a parameter – renaming it “roughness”


Step 4: Normal Map

1. To create the illusion of woven fibers, you’ll use a normal map

2. Drag-and-drop your downloaded normal map into the material editor

3. Connect the normal map to the normal input

4. To add more density, right-click and search for “texture coordinate”

In Unreal Engine 5, the Texture Coordinate node is a material expression that outputs UV texture coordinates as a two-channel vector, allowing materials to operate on the mesh’s UVs.

5. Hold down the M-key to add a multiply node and increase the value [5]

In Unreal Engine 5, the Multiply node is a mathematical function that takes two inputs and outputs their product.

6. Connect the texture coordinate to the A-input of the multiply node

7. Connect the multiply node to the UVs input of the normal map

8. This tiles the normal map multiple times across the surface, creating a finer cloth pattern

9. Right-click on the texture sample and convert it to a parameter – renaming it “cloth normal” [FROM B]

10. Apply and Save the material


Step 5: Shading Model

1. Drag the material onto your mesh to preview it

2. The cloth will look shiny and like plastic

3. This is due to the lighting being set to the default shading model

4. Back on the material graph, in the detail panel, look for the “shading model”

5. Change the shading model from “default lit” to “cloth”

The Cloth Shading Model in Unreal Engine 5 is a specialized material property designed to accurately mimic the physical properties of fabric by simulating light scattering through a thin “fuzz” layer on the surface.

6. The cloth will lose its plastic look and looks more like realistic cloth

7. Two new inputs now appear – “cloth” and “fuzz color”

8. The cloth input acts like a mask

In Unreal Engine 5, the Cloth input within the Cloth Shading Model serves as a mask that controls the strength of the Fuzz Color.

9. Hold down the 1-key and left-click to add a constant vector

10. Set the value to 1

11. Connect the constant vector to the cloth input

12. A value of zero means “not cloth” and a value of 1 means “full cloth shading”

13. Right-click on the constant vector and convert it to a parameter – renaming it “cloth control”

14. Real cloth will contain tiny fibers (fuzz) that catches and scatters light

15. Hold down the 1-key and add a constant vector

16. Change the value to around 0.1

17. Connect the constant vector to the fuzz color input

The Fuzz Color input in the Unreal Engine Cloth Shading Model is used to simulate shifts in color when light passes through or grazes the surface of a material, effectively adding a thin layer of fuzz to mimic fibrous fabrics like velvet or wool.

18. Right-click on the constant vector and convert it to a parameter – renaming it “fuzz color”


Step 6: Material Instance

1. Right-click on the material and make a material instance – naming it appropriately

A Material Instance in Unreal Engine 5 is a reusable, lightweight child asset that inherits the compiled shader logic of a parent Master Material, allowing artists to tweak specific parameters without recompiling the underlying shader code.

2. Double-click on the material instance to open it

3. All of those parameters that we made are now available for you to tweak your shader without needing to change the master material


Conclusion

Using the Cloth shading model in Unreal Engine 5 is one of the easiest ways to dramatically improve the realism of fabric materials. By combining tiled normal maps, controlled roughness, cloth masking, and subtle fuzz lighting, you can create convincing textiles that react naturally to light instead of appearing glossy or plastic-like.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.