How to make surface dirty and grunge properly

Back in 3DSMAX/vray we have a material node called AO dirt, it could automatically mask AO areas in screen space and add grunge textures to it.

In UE5 and luman, is there an equivlant to this? Like dig into a mesh’s material graph and select its automatic AO area (not using the baked AO map) and put a grunge texture to it?

you’d have to modify the engine to do that. you’d have to compute the ssao after the depth pre pass, and give yourself access to the ao scene texture in the material/lighting pass. only single layer water supports that, cause it’s rendering in a secondary pass in the first place.

personally… i would not use this tho. cause…

up close look

and far away look

would deliver inconsistent “grunging”.

so… this engine mod may not be worth it. unless… you wanna modify the ssao algorithm to compute a smaller kernel, based on scene depth. this is a shader dependency and has a lot of potential for wasted cycles for overlapping kernel grain or slowdowns for branching shader code.

Also the grunge would change depending on the graphics settings, which isn’t ideal.

Could also bake AO into vertex color, LODs will change the look but generally I think it’s more stable than SSAO. But vertex colors are often used for other effects or masks too. But if you’re using nanite, it’s not a bad idea since you want to keep vertex information shared with nanite.

Could use mesh distance fields, but similar graphics settings and distance fading issues.

Personally, just have AO channel packed with a roughness/metalness/AO texture.