Home Technical Talk

Ambient occlusion in diffuse/color map or a separate texture?

I've never really though about this. Why have a separate texture for ambient occlusion? I've seen a few models that have baked the ambient occlusion into the diffuse/color map. What are the pros and cons for combining the AO and diffuse map?

Replies

  • Joshua Stubbles
    Options
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    Depends on the pipeline and situation. Combining them means one less texture call, which is great. But if the engine is using a physical materials system for instance, a separate AO map is often applied after the gloss pass, so that it affects gloss intensity along with the gloss mask and f0 values. Couldn't do that if it were mixed with the diffuse.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Many reasons, much better control on how you mix it on your diffuse in PS, shader and if they use falloff for a second texture.

    Generally, you should never bake your AO on your diffuse directly with your renderer, you simple don't have the control you need to make it look good.
  • Demian Wright
    Options
    Offline / Send Message
    Good points. I've never used game engines so I've made the AO a separate texture because everyone else does it too. Now I know why.
  • Neox
    Options
    Online / Send Message
    Neox godlike master sticky
    Good points. I've never used game engines so I've made the AO a separate texture because everyone else does it too. Now I know why.

    everyone else? i highly doubt that - we are still far from super advanced shaders for most productions, besides some really high specs games - but even in titles such as crysis 3 the ao was part of the diffuse and not a seperate map. Not sure about the ingame cinematic models - but the normal in game models just have blended in AO maps. The only project i worked on so far with a seperate AO maps was Halo4, but the textures there have been really different from all productions i ever worked on.
  • marks
    Options
    Offline / Send Message
    marks greentooth
    Hmmmm baking AO into albedo texture is pretty wrong from physical point of view. AO should really only be used to mask indirect lighting and increase saturation via inter-reflectance I guess. Moving forward with games starting to be more conscious of physical correctness and PB systems, probably going to see more "AO" moving out of diffuse and into separate passes (or in lighting/screenspace render passes).
  • WarrenM
    Options
    Offline / Send Message
    It might be wrong physically but it's pretty standard these days from what I know. Eating a whole separate texture lookup for every asset is not really going to fly on console games.
  • Neox
    Options
    Online / Send Message
    Neox godlike master sticky
    marks wrote: »
    Hmmmm baking AO into albedo texture is pretty wrong from physical point of view. AO should really only be used to mask indirect lighting and increase saturation via inter-reflectance I guess. .

    yeah sure because what we've been doing since - forever - is creating physically accurate assets because the renderers we use are all physically accurate ;)
    Moving forward with games starting to be more conscious of physical correctness and PB systems, probably going to see more "AO" moving out of diffuse and into separate passes (or in lighting/screenspace render passes)
    definitely but not for all games and not for a while, i doubt with the next generation everything will be physically based, artistically its just very limiting. But when it comes to recreating any sort of realism, yeah sure no doubt materials will be more physically based. Still to run these in relatime, stuff will need to be faked A LOT still.
  • marks
    Options
    Offline / Send Message
    marks greentooth
    Neox wrote: »
    yeah sure because what we've been doing since - forever - is creating physically accurate assets because the renderers we use are all physically accurate ;)

    Cool, let's all go back to painting our lighting into diffuse textures...
    Neox wrote: »
    definitely but not for all games and not for a while, i doubt with the next generation everything will be physically based, artistically its just very limiting. But when it comes to recreating any sort of realism, yeah sure no doubt materials will be more physically based. Still to run these in relatime, stuff will need to be faked A LOT still.

    Physically based isn't as limiting as you make out. Pixar made Wreck-it-Ralph using a physically based rendering system and that is definitely not a 'realistic' visual result: http://www.ictv.org.uk/wp-content/uploads/2013/02/Wreck-it-Ralph.jpg

    From what I hear a large amount of 'next-gen' games are using physically based renderers, mor ethan you may think perhaps...?
  • Neox
    Options
    Online / Send Message
    Neox godlike master sticky
    marks wrote: »
    Cool, let's all go back to painting our lighting into diffuse textures...



    Physically based isn't as limiting as you make out. Pixar made Wreck-it-Ralph using a physically based rendering system and that is definitely not a 'realistic' visual result: http://www.ictv.org.uk/wp-content/uploads/2013/02/Wreck-it-Ralph.jpg

    From what I hear a large amount of 'next-gen' games are using physically based renderers, mor ethan you may think perhaps...?

    pixar has all the time in the world to render a frame, i do not doubt that a lot of the next generation engines are physically based, but it doesn't mean that nothing is still going to be faked.
    As for the lighting in diffuse, if it looks better ingame in 90% of the cases do it. Its all a matter of the game, the usual camera etc. i am totally not agains pjysically based rendering, but don't be so sure that everyone is going to use it.
  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    marks wrote: »
    Cool, let's all go back to painting our lighting into diffuse textures...

    YES, that's what I do! oh wait, you're being sarcastic....
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    Its unlikely that anyone is going to make a render pipeline that is going to take advantage of separated per object AO, at least for a deferred renderer. It would require an additional channel in the gbuffer, more memory, and more artist work and wouldnt really help very much. SSAO is usually scaled by direct lighting intensity though.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    The next gen consoles have more then enough memory, it isn't any more work, scenes look at lot better with properly applied AO.
  • VeeJayZee
    Options
    Offline / Send Message
    Don't know much about what will be the next-gen PS4/XBoxOne will be. But currently, AO overlayed in Diffuse Maps is cheaper on engines. On my workflow I use it to make the look of the model pop out a bit. And physical based AO on more advanced engines tends to spread AO a lot all over the place and really doesn't cover the little nooks and crannies of a model's detail. However I have to be conscious about it because of the Specular maps and gloss. But its rarely causing any problems overall since videogames is generally about hyperealism over photorealism.
  • marks
    Options
    Offline / Send Message
    marks greentooth
    Neox wrote: »
    ...i do not doubt that a lot of the next generation engines are physically based, but it doesn't mean that nothing is still going to be faked.

    Of course you're right, a lot of stuff still will be faked because "this ain't CG" which I hear all too often these days :|
    Neox wrote: »
    As for the lighting in diffuse, if it looks better ingame in 90% of the cases do it. Its all a matter of the game, the usual camera etc. i am totally not agains pjysically based rendering, but don't be so sure that everyone is going to use it.

    Of course it isn't going to be used by everyone, but it's really good! :P I think it will be adopted more as time goes on, even by "non-realism" art style games. It offers advantages over current approaches even for these.

    Really I was trying to answer the OPs question though - why would you separate your AO from your albedo texture? Because that's how real life works!
  • ExcessiveZero
    Options
    Offline / Send Message
    ExcessiveZero polycounter lvl 6
    marks wrote: »
    Of course you're right, a lot of stuff still will be faked because "this ain't CG" which I hear all too often these days :|



    Of course it isn't going to be used by everyone, but it's really good! :P I think it will be adopted more as time goes on, even by "non-realism" art style games. It offers advantages over current approaches even for these.

    Really I was trying to answer the OPs question though - why would you separate your AO from your albedo texture? Because that's how real life works!
    There is more then one way to skin a cat.....or so im told.

    Real life is about getting the result, Baking AO has been a pretty standard texturing process not to say it will remain this way, but I would always keep it separate then you can experiment and work out what suits your project best and bake it in photoshop.
  • Minato
    Options
    Offline / Send Message
    Minato polycounter lvl 5
    Ok then, more texture lookup is bad, but what if you have one or two packed textures for your masks, and one of them has a free channel, to me it seems ok to use that channel for AO, at least that's what I do when I have to use masks, that way you have a better control over the look of the material since you can control the contrast of the AO separately and you haven't created another texture lookup(though that'd usually cost you a few extra instructions), so I guess it really depends on your budget and how much of a hero piece the model is in the end...
Sign In or Register to comment.