Getting Ambient Occlusion into Skyshop shaders

Hi!

I am using your the great Skyshop shaders in a huge ancient city visualization. So far I am very pleased with the results and the performance. But there is one thing for which I can’t seem to find a solution for:

I really need to get Ambient Occlusion into my textures so that it nicely augments the HDR Lighting in the Skyhop shaders. Lightmapping is really the last resort, because I want to keep things as dynamic as possible (even if the city is mostly static).

I initially planned to bake an AO pass in 3ds Max with the “Render to Texture” feature. However I would have to create a second UV set for that, because my first UV set has many overlapping UVs. As the color textures and the AO texture use different UV sets I can’t just overlay the AO in Photoshop and blend it with the diffuse texture. So this doesn’t work either… :frowning:

I have no idea how I can get this AO pass into Unity and combine it with the Skyshop shaders. Can you help me here?
I know I could use the old Legacy Lightmapping shaders in order to combine a Lightmap (in this case the AO pass) with a diffuse texture, but this is obviously not what I want because I want to use the Skyshop Shaders.

Do you have any idea how I can achieve my goal?

Is it maybe possible to let Beast only generate an AO map?

SSAO is no option either, because I totally dislike the look of it and the flickering.

Thanks a lot!

Sean

A gentle “bump” :slight_smile:

Sean, have you figured out a solution to your problem? Im looking into the same thing ( but I also want to have lights in my bake, not just ao.)

Hi Autarkis,

it turns out that since one of the newer releases one of the Skyshop shaders has a dedicated AO channel! :slight_smile: It uses the 2nd UV channel, so you have to provide a UV Layout for that channel.
You can have all the lights you want if you use Lightmapping with Unity’s internal Beast render engine. Generally you would bake the direct+ indirect light that is contributed from direct light sources by setting the Skyshop Sky object to black. After the bake, assign a sky again and then the Skyshop shaders work on top of the previously lightmapped objects providing diffuse and specular IBL sky lighting in addition to the baked light of the direct light sources. In order to avoid that surfaces get to bright you have a couple of global multipliers in your Sky object which allow you to adjust the intensity of the dynamic IBL lighting. The AO map in the dedicated channel will still work, too. But if you reduce the intensity of the dynamic IBL lighting, the AO will be reduced along with it.

If you plan to lightmap your scene in an external 3D program like 3ds Max and Maya, then unfortunately you won’t be able to transfer the baked maps over to Skyshop :frowning: Maybe this will be added in future releases.