Overlaying grime onto glass

So I have here a stained glass window from a door I have modeled (I'ts black and white for a reason :) ) 

but it needs to look old , worn and dirty. Firstly , I want to overlay a grime texture as if the window hasn't been washed in years , and also exaggerate that texture into the areas where it would build up the most around the lead piping that seperates each piece of glass. 

Now I have done this many times , but it has been years since I last did it , and I can't for the life of me remember how it's done. I've got some nice black and white grungy textures and ive been playing around with colour ramps and mixing transparent shaders but I'm just not getting it. 

Could somebody be kind enough to show me a node setup that will add a general grime over the whole window , and also one that will concentrate it into the crevices (I vaguely remember baking a dirty vertex map to achieve this back in v2.78 but I have no idea where to start in 2.8)  

  • Shawn Blanch(blanchsb) replied

    Sorry frikkr  I’m not a shader guru yet. I wanna say something in shader forge mentioned a little about that topic though in one of the videos.

  • Shawn Blanch(blanchsb) replied

    Super cool effect though!

    Did you model that stained glas fine detail or is it all shader driven?

  • spikeyxxx replied

    Hi Matthew, for plain glass you could use the B&W grime texture to influence the Roughness.

    This can also be done here, but the effect is more subtle, like:

    with:

    You could also mix the Glass with a Diffuse Shader with a grime color:

    with:

    And you can of course combine the two. There are other ways to do this depending on the exact result you want and this is of course just a basic set up and I'd probably spend hours tweaking, but maybe it can help you get started...

    Note that I have set the glossy method of the Glass (in this case the Principled Shader) to Multiscatter GGX. Makes more sense to me with a 'bubbly' surface. But that's just a preference.

  • Matthew Fricker(frikkr) replied

    blanchsb thanks man :) , it's actually just a noise texture plugged into a bump map. And the lead was made with curves over a quickly drawn photoshop image. 

  • Matthew Fricker(frikkr) replied

    Brillant thanks , I'll give it a try :) 

    appreciate the help Spikey

  • Shawn Blanch(blanchsb) replied

    When you are done please post the render and your node setup if you don’t mind. My interest is now peak’d and I wanna see the end result.

  • Matthew Fricker(frikkr) replied

    will do :)