Mastermaterial for building Dirty/Grunge/Aged Enviromnent

Hey Community! :slight_smile:

While we are working our game, we creating assets for us.
This master material is one of them and we decided to release it for you.

Backstory:

We bought many packs from marketplace, but we find many problems with these packs.
First problem was the texture packing. Almost all asset/enviromnent pack using different type of rgb packing. Some packs using Red for roughness while another one using Blue for roughness and so on…
Another problem come from our level/game design… We wanna create a dirty, maybe postapocaliptyc visual for our game…

We dont have resource and power to create new texture for every asset, and we dont want to waste our time with repacking texture channels…

So let me introduce our solution to solve this problems…

Our static mesh master material…

What can this material do:

Basically this master material will solve every texture packaging and rendering pipeline including pbr, nonpbr, specular etc… (Note: we using dynamic lights, so AO map is not implemented)
You can setup the basic material easy and fast as Usain Bolt run… Just choose the right channel in the right place/group (rough,met,spec) including the possibility to choose you using sRGB or Non sRGB texture too.

And thats all?

Definitly not! :slight_smile: Mastermaterial is perfectly can do:

  • Color Tone
  • Masked color tone
  • Simple Bump offset
  • Iterative bump offset
  • Parallax occlusion mapping
  • Detail texturing
  • Dirt overlay with full controll
  • Aging layer with full controll

The magic is in the dirt and aging layer. These two layers is a quite complex, but good enough to achive dirty/grunge effects like this: Imgur: The magic of the Internet (note1: these models was downloaded from here [FREE] Various models - World Creation - Epic Developer Community Forums) (note2: the vending machine was retextured with substance painter)

Our goal was to create a simple, fast master material where we have all of control and we can combine simple instructions to create dirty visual.
With every options enabled we get 220~ instructions and green shader complexity, so the master is not so expensive.

but everything is switched, so pertfectly work as simple master material and work as a “mini” substance designer too :smiley:

We implemented some features in the two overlay (dirt, aging), like

  • runtime mask generator based on a saturated diffuse texture
  • runtime normal map generating on mask “edge”
  • color or texture overlay
  • proper normal blend or mask based normal blend
  • world aligned masks
  • working with multiple mask’s (aging layer can mix two mask and control these separatly)

and much more… as i said designed to our level designers to control everything and save many many textures for our game (because we reuse tiling textures often)

Why this is released?

Because when you love something, set it free :slight_smile: aaannnd…

We used bunch of static switch in this material… I know its good, but generating bunch of shader sets and sometimes working with high compile time… I think this is not a marketplace item, because not fit in every project… Its designed for PC/Desktop mostly.
And also im not sure is everything implemented in right way, but for me seems good.

Nothing left let me show you a little teaser video!

And here is a basic FPS project with a “overview” map.

Some Thanks:
I wanna thanks two people who inspired and teached me new things :slight_smile:

I learned stuffs (Normal map generating, Iterative parallax) from here: http://jadearkadian.blogspot.com/
Our Diffuse based mask was inspirated by: Designer Life: Unreal Engine | VK and his “FastMask” is available as option in our material

Some Screenshot:





Thanks for sharing. Very generous of you.

Why did no one else ever comment on this!? And the drive link still works! I won’t be using this, rather than deconstructing it to further extend the capabilities of my current master materials. So many switches! Seriously, thanks a bunch :slight_smile:

Hi! Thank you for making this :slight_smile:

I think I found a bug in the UV Master Function, where if you make a material with World Align any Bump Offset ( Simple and Iterative, haven’t checked POM) will work the correct way on only 1 side of the mesh, but be inverted completely on the opposite side. Could you please look into this, I would really like to know how to fix this :slight_smile:

Thanks again!

Thanks for sharing this awesome work :slight_smile:

I just came across this and installed it. It’s a great resource for learning. Running in 4.23 without problems - very impressed about shader complexity being green for all material instances. Looks like the compiler does a great job optimizing out the tons of switches. Need to dig in further to understand everything, it looks really very complex.
I’m also surprised about so few comments on that.