Shader Mixer AKA Biting off more than I can chew

Hi All,
I've been experimenting with a custom Iray shader that mixes three shaders together based on a a mask. The mask shares the same texture coordinates as the base shader but the second and third shader use their own texture coordinates so they can be tiled multiple times. I've been doing this to try and get a general purpose shader for large meshes where I can break up repetition. Putting aside the fustration of using the shader mixer I've had some success.
In the above image I have a rock texture (1) tiled ten times with a moss texture (2) tiled about ten times and a sand texture (3) tiled twice. The placement of the moss and the sand are controlled by different masks that I generated in Substance Painter.
The downside of this is approach is that I need to generate the mask to map out where I want the additional shaders to be placed and that requires a UV map laid out in such a way to facilitate this.
In parallel I've been exploring using more of a trim sheet work flow for my texturing which results in a lot of overlapping uvs with the benefit of being fast to do and very small texture sizes. The downside being I would not be able to produce a map that woud be usable.
This has brought into focus what I would want the shader to do.
In simple terms I want to "fake" edge wear and grunge using edge sharpness and AO. This is an example shader in blender that does this (not mine!). I can control the edgewear and ao distances seperately to tweak the effect and plug in different textures into the base, edgewear and grunge depending on the effect I want.
The benefit of this approach is you would be able to create a single texture atlas for the base texture and then have two smaller maps for edge wear and grunge that can be tiled multiple time.
As an aside the edgewear is there to help "decode" the shape of the object for the viewer and the grunge map does as well and also helps hide seams!
To illustrate that, consider the below images, I think the one on the right is easier/quicker to "understand" than the one on the left:
Rendered with edge wear and grunge it starts t tell a story.
So thats alot of words, whats the question?
I've seen posts on this forum discussing similar requirments for toon shaders, for exmaple Edge detection and rendering in 3Delight and Iray - Daz 3D Forums by KFR6 using geoshells. I've not seen anything on AO.
Is this approach feasible in Daz Studio without post processing using Iray?
Is it possible to calculate Edge and AO and feed that into a Layer Weight?
Does anyone fancy collaborating on this?
I really think it would be cool, but I have certainly bitten off more than I can chew!
As an aside, I really struggle with the WYSIWG editor and images in this forum so that's the best I could do...
Thanks
LZY








Comments
Ok so a days tinkering and I have a potential solution for the edge wear. Many thanks to mephoria and the post An Iray Shader Mixer Cookbook - Page 2 - Daz 3D Forums which had a solution for range mapping. Now does anyone know of an equivelant brick to blenders ambient occlusion node?