Using AO map on UV2

Hey guys,

On many of my 3D assets, I like to make use of tile-able repeating textures. I also like to have a baked AO map on the asset as it really helps to provide the look and feel that I am after. The problem is that if I unwrap the UV’s I start to lose some resolution on the textures due to a low texel density. This isn’t an issue for the AO map, but is for the normal and diffuse channels.

What I want to do is have my UV’s unwrapped on UV channel 2 and apply the AO map to this channel. Then on the default channel 1 have something like the box UV map from 3ds max which will allow me to make use of the repeating high texel density textures.

I’m a bit useless with shaders, does anyone know of an existing way to do this? If not, can someone help me with the shader code to achieve this?


Actually I managed to solve this pretty easily using Shader Forge… well worth the investment if you’re considering… If you know shader code then maybe not… Either way here is the basic shader I made to achieve the look I want: