This is the first entry of an ongoing series of posts that I'm going to be making about my learning journey.
There isn't going to be one strict theme, but I will try to post consistently about what I'm studying at the moment.
Unreal Materials / Master Material, Material Instances, Material Functions.
My goal on this study session was to get myself familiar with some of the basic tool we can use inside Unreal to create materials, I did work with materials before inside UE, and have done a lot of stuff with node based materials inside Maya, so I wasn't exactly starting from scratch... that being said I still felt that it was better to watch some tutorials and figure out how other people would try to solve the idea I had.
Before doing anything inside the material editor, I planned what I wanted to do and what I needed, just pen and paper at the moment.
Here is what I came up with:
Master Material
- Basic Normal Folds (baked, but as for this study I used a tile with big folds)
- Normal Flatness (intensity)
- Crumple Tile (a tileable normal map for memory folds)
- Tile size
- Normal Flatness
- Base Color
- Tint
- Metallic
- Roughness
Fabric Tiler
- Normal Flatness
- Tile Size
- Diffuse Weight (to multiply on top of the base color)
- Roughness Weight (also multiply on top of the base color)
This wasn't on the initial plan but it was something I wanted to try and it was pretty much the same thing as the Fabric tiler
Fuzz Tiler
- Normal Flatness
- Tile Size
- Diffuse Weight (to multiply on top of the base color)
- Roughness Weight (also multiply on top of the base color)
After I wrote that down, I started getting the maps I needed to make that work.
Ok, so now I was ready to start building the material inside UE.
I started by working on the master material, it was a super straight forward setup, for the tilling I just used a TextureCoordinate connected to a Multiply and a float parameter to adjust the amount.
For the Normal Map control, I used the FlattenNormal node, and to combine all the normal maps I used the BlendAngleCorrectedNormals
One thing I really wanted to try was to make the Detail Tilers outside the Master Material, to mimic what I think it would be best for a production environment, and the way I ended up doing was with Material Functions, I still need to do more digging to see if this is actually the best way, but it did work as intended.
Material Functions are super powerful as we can make a set of actions reusable in a easy way, and if we need to improve or change something inside that function it updates on all the other instances.
This is how the Cloth Detail Material Function ended up looking. Same setup for the tilling size, flatten normal for the intensity, I ended up using the Add node for the Cavity Intensity, because I used a multiply on the master material, and making it 100% white will just act as opacity.
I added an extra input for Masks, but it was needed for this study, but it's something important for more complex models.
For the Fuzz Detail, the Material Function is a bit more complex but it's just because I wanted a roughness and color control.
Adding it all together this is how the final Master Material node looked like:
and the result:
All the exposed parameters
The idea wasn't to get a perfect visual result, but to understand the workflow and learn the process, that being said I would say that it's a pretty decent result without doing anything super complex.
I assigned the material on a super simple shirt to see how it would look and I was impressed, even though the model is pretty bad, all the fine details and small folds gave the model a cool look. I might try to use it on a proper model later to see if holds up.
A little disclaimer, this series is not really intended to be used as a "tutorial" as I'm on the process of learning myself, so I might be making a lot of mistakes along the way, which is all good and part of the fun, but feel free to use it as inspiration to go and try stuff yourself.
References and tutorials I've used:
Master Material Basics! Unreal 5 (Must KNOW workflow!)
Detail Normal Mapping - Shader Graph Basics - Episode 13