[ Unreal 5 ] Fabric Shader Using Layered Material




Overview

For the character's main clothing shader - when considering a future engine upgrade, it may be a good idea to consider a new feature called 'Panel-Based Cloth Editor (POM)' (currently experimental). However, in order to use POM, additional editor customization settings and plug-in functions such as 'Chaos Cloth Asset (Editor)' and 'Panel-based DCCs' are required.


Meanwhile, instead of using POM, I configured the shader with layered materials by enabling the 'Use Material Properties' option on a Unreal Enging 5.4.2 editor.

This shader was created for a variety of cloths. I designed a shader structure with a lot of scalability to suit the characters and environments. And it was expanded by adding details to express weathering.

When applying a shader to a character or asset, I use the 'Material Expression' group to group each element, so I believe this may cause some shader properties to be randomly applied to the MPC.



Break Down

Material root node is as follows,



I checked the box to enable the ‘Use Material Attributes’ option.  This concept allows blending of multiple layers.  Also enabled ‘Two Sided’ option because as shown in the sample example is to represent the front and back sides of cloth, curtains, etc. hanging on a clothesline.




























I divided the main input part into a separate ‘Pack’ and ‘Main texture’ part.

This may vary depending on the cloth fabric's design. Also easy to manage the structures’ complexity that would be added to each attribute separately later.
I organized the wrinkled part of the fabric into a separate layer and then loaded it into the main shader and blended it. This allowed us to further simplify the main shader and separate it from other modules to reduce complexity. Additionally, I did not provide input values ​​to the Wrinkles layer. If the order changes depending on art direction in the future, I can easily change the blending order with the main by adding input settings.


Plain

add Wrinkle



Before


After


and blended detail, mask textures into the main texture.




added Wrinkle and Grunge

The same method can be applied to other fabric materials by adding details according to the art direction. This applies to so-called fabrics, which are a mixture of different materials: sequin, rubber, leather, etc.