need Shader: Reflective/Bumped + AmbientOcclusion + 2 UV sets

Maybe this has been asked a hundred times but within Unity I miss a reflective shader with the possibility to add a Ambient Occlusion texture on a 2nd UVset along with diffuse, bump and reflection cube maps. I rendered the AO pass in Maya and want to use it for multiple objects with different tilable diffuse textures.

whats not working:
Reflective/VertexLit
Reflective/Bumped VertexLit
and all shaders from Selfillumination since there´s no chance to plug in a cubemap for reflection.

is there any possibility to bypass SBAO and make use of my own ambient occlusion maps on a 2nd UVset but with reflection?

ideally the shader I am interested in now has following channels which can be mapped:

diffuse
specular
bump/normal
bump/height (not that necessary)
reflection cubemap
ambient occlusion

  • possibility to assign textures to 2 different UVsets

does anyone know a shader out there which can provide that?
a hint in the right direction (I´m all but no programmer! so I can write my own shader…) would be great!

many thanks in advance

All built-in shaders support light maps using a secondary UV set, so it sounds like “Reflective/Parallax Specular” is what you want.

To use your own AO texture instead of something produced by Unity’s light mapper, you’ll have to set up the texture the same way. The best thing to do is generate a light map for your object using Unity anyway, just so you can see how the references work. Then replace the Unity-generated texture with your own.

this is what I ended up with before I created this thread. unfortunately this shader is quite inefficient when it comes to using your maps, because the lightMap needs to be integrated in the alpha channel of the texture file. this means as soon as I have a tilable map for the diffuse channel and diffuse comes as RGBA with lightMap - it gets tiled too. this is not what´s needed. it might be, that due to the fact that I´m new to Unity, I don´t see the obvious.

but there is another issue with light maps in this shader (again - unless I have a better understanding of the shading process) the lightmap gets blended in a weird way to the whole object. I have to raise reflectivity to the max to get a sense of the lightmap. the lightmap doesn´t quite enlight my object from a diffuse color point of view but rather acts as mapping the intensity of reflectivity. this was very odd and results in this shader being more or less useless for me.

on the other hand lightmaps on a simpler shader like self-illumin/bumped specular blend much nicer to the diffuse color and you really get a sense of the thing being “ambient occluded”.

but the most essential thing is to have as much control over the shader as possible. and an overall lightmap integrated in a tilable diffuse map simply doesn´t work. there are sliders like for maincolor which doesn´t make too much sense for me, since those values should be controlled by the texture if mapped. on the other hand there is no slider for bump strength or selfillumination intensity or a facing ratio curve for cubemap reflections.

again - I am just starting to learn Unity and soon might find out what I can really do with the shaders. but right now I am not sure how efficient it is to combine lightmaps with other textures in the alpha channel.

nevertheless, thanks for your valuable contribution!
kind regards

I think you might have misunderstood where the light map goes. The alpha channel of the main texture is for a gloss map, not a light map. The gloss map affects specularity across the surface, and uses the same UV mapping as the main texture.

The light map is not referenced directly by the object, and not even mentioned in the material inspector. Instead, it is referenced by index in the Renderer. Try using a Unity-generated light map to see how this works, and then do the same for your light map. Note that Unity uses an RGBM format, meaning that the colour channels are multiplied by the alpha channel and then by 8. If you’re just using ambient occlusion, you probably want 0.125 or less in your light map’s alpha channel.