Home Technical Talk

Quick question about ambient occlusion maps

polycounter lvl 12
Offline / Send Message
Fomori polycounter lvl 12
Is it the case that in the majority of games the AO map is combined with the diffuse?

It seems to create a similar effects when combined with the diffuse and it of course uses a lot of resource to dedicate the AO to it's own texture. I seem to be seeing a lot of other artists texture work that indicates it's combined with the diffuse.

Replies

  • cholden
    Options
    Offline / Send Message
    cholden polycounter lvl 18
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    A lot of people combine it with the diffuse.

    When it is used as it's own texture, the difference you'll notice is that there will be no occlusion when light is directly hitting the surface (as really it is supposed to occlude ambient light, not direct light).
  • Snader
    Options
    Offline / Send Message
    Snader polycounter lvl 15
    It's often combined with the diffuse, though it can have advantages to keep the AO as a separate file.

    Modular%20Texture%20Optimization.jpg

    In this example, I used tiling textures without any shading in combination with a lowres map to get nice shading and detailed materials. And I could also use the AO to blend some grime in the crevices.
  • PredatorGSR
    Options
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    It varies based on the game and company you are working at. There are 3 main ways to get AO that I am aware of.
    - Baking it into the diffuse
    - SSAO - Realtime AO that is calculated based on what is visible on the screen
    - Lightmaps - Either manually or procedurally generated lightmaps for all the static pieces in a level.

    For our current project, we are using a combination of all 3. We bake/paint in some AO information for fine detail and cracks. The SSAO creates realtime AO in the game and creates AO for all intersecting geometry so that it feels grounded, and so we can use tiling textures and still have it look good. There is also a final lightmap pass where lightmaps are baked for the level.

    It might seem redundant, but the lightmaps create all the big shadows and AO but the maps are low res, so the SSAO does all the medium detail AO, and the AO in the diffuse gives some definition to all the fine detail. The final result is very nice looking.
  • Fomori
    Options
    Offline / Send Message
    Fomori polycounter lvl 12
    Great guys! Thanks. Clarifies it for me.
  • Vrav
    Options
    Offline / Send Message
    Vrav polycounter lvl 11
    Technically, baked AO into your diffuse is not going to be completely realistic if you're using an engine with dynamic lighting everywhere. For example, if you bake some AO into the mouth of a monster, you can then never shine your flashlight into that monster's mouth and see all the internal details.

    Though I'm not sure if it's been done or where, having your AO as a separate map (or just a single channel in an optimized normalmap, for example) would allow you to blend in your baked texture AO based on how directly lit a surface is. I guess Marmoset can do this, probably most modern engines.

    But either way you still want to use some baked AO, since I don't think SSAO reads normal map data. Can it?
  • PredatorGSR
    Options
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    Our implementation of SSAO does read the normal map. It isn't as sharp as if it was baked in the texture, but if you had something like a brick wall, the SSAO does darken the cracks in the normal map.
Sign In or Register to comment.