How to only bake Ambient Occlusion?

When you bake a lighting scene with mixed, or baked, lighting colour information from the skybox and lights in the scene, as well as indirect bounce lighting, are included in the lightmap.

Is it possible to bake just the ambient occlusion, with all other points on the lightmap being white?
This could then simply be multiplied in shader to add stylised shading to the mesh.


mockup of what would be desired:

I’m not aware of such a setting but maybe you could trick Unity into doing that. If you crank up indirect illumination really high so that everything becomes white and set AO contribution to indirect lighting to 100%, you should theoretically get what you want. Probably sounds easier than it is. You might have to place a billion lights procedurally (just environment lighting is probably not enough) and replace all materials with white before baking.

But maybe somebody knows a better way.

Six directional lights one in each direction set to baked, no shadows, enable AO bake make sure it affects direct too, no bounces.

This seems to work really quite well, much appreciated!

In theory this can now be multiplied in shader to overlay the AO regardless of lighting condition.