EDIT 07.06: Added an animated gif to show the effect.
WIP
Hey guys,
i'm working on a wear shader for painted metal objects. It's a part of a pipeline desing that allows making props using realtime smart materials. I'm aiming to reduce the production time and memory footprint by not having to make dedicated UVs/textures. All effects are done at runtime. Modelled in Max and rendered in UE4.

Handpainted in UE4 realtime.

The set uses 2 main textures:

Additionally You can use:
- Stencil textures
- Paint Color Palette
The damage is driven by vertex color information. All layers are done proceduraly.
Alltogether there are 5 effects:
- paint
- rust
- metal
- dirt/AO
- stencils
They affect all buffers meaning diffuse, normal, metalic and roughness. So for example rust has proper PBR values and shades differently than metal or paint.
Meshes are really simple shapes, nothing fancy. UVs are done automatically by box/cylinder projection, so they are messy in some places.



Here is a screenshot from Max.

Currently I'm adding stencils functionality.
Hope You guys like it. 
Replies
I've updated my original post with an animated gif to show the effect.
It looks like paint is the base effect, with controls for overall color/metalness/roughness of the paint?. And you're using RGB vertex colors to control the 3 other effects (rust, metal, dirt)? How are you controlling how/where the stencils appear/disappear... vertex alpha?
Curious how UE4 handles batching with differing vertex colors. There is some funkiness in Unity when you try to do this... edit vertex color on batched meshes.
Eventually i want this to be a multimaterial shader. This will allow rendering meshes using multiple textures in one draw call. Also most if not all metal objects in the scene could use the same material.
Yea i'd be really surprised if it would. I think that it just creates another mesh and a separate draw call.
d1ver said: Originally this was created as a painted wood materal. So yea it should work on things other than metal. The general idea was that when most simple materials get worn out they change the color, smoothness or surface detail. I wanted to find how far can You get by just modifying existing textures in the shader. Changing diffuse brightness, saturation, tint, offseting roughness and amplifying a normal map. Something that could have been easily done on existing textures. At first I've used a roughness as a mask which worked most of the time but the blending was prone to change if the roughness changed and also roughness is quite flat in tiling textures. I've added the paint layer to override diffuse If You would want to have multiple colors or some patterns. And surprisingly the results were better than expected.
This was not meant to replace meshes with beautiful dedicated textures. But games, especially open world ones, are mostly filled with content that 99% players don't pay much attention to. There is so much things going on on the screen that you'll never stop to admire that trash can, crate or metal floor. They should give You that cool realistic feel but don't draw Your attention. Seriously who ever looks at fire hydrants in a game that is not about fire hydrants? I just love The Division because they use so many simple materials that just do the job.
Anyways what I like to take from all that is that they should be cheap on memory and easy to make.
Here's an update:
You can find more at:
https://www.artstation.com/artwork/yNnwK
i'm writing a Maya plugin that calculates mesh convexity/concavity into vertex color. Right now it's a simple fire-forget python script but i'm putting it in a deformer so You can adjust the parameters live.
nice results on those smart materials