Home Technical Talk

Baked ambient occlusion map in PBR pipeline

polycounter lvl 14
Offline / Send Message
Axcel polycounter lvl 14
Not so sophisticated question but I still want to ask about it. I am adapting to PBR pipeline and I'm not sure what to do with ambient occlusion of metal parts. Until now we multiplied ao with diffusse texture, but with PBR approach we have almost black albedo on metals so there is almost no effect of baked AO.
I have my solution but obviously want to know others' approach to this matter.

Thanks in advance for sharing your experience with me.

Replies

  • gloriousczar
    Offline / Send Message
    gloriousczar polycounter lvl 6
    Physically based renderers like Marmoset and Unreal have an ambient occlusion slot to put your map into, so when light shines on that part of the mesh, the AO map won't show up. You shouldn't have any lighting information in your albedo/diffuse texture. Making the albedo of your metal dark depends on which PBR texturing workflow you are using, if you are using spec/gloss you would darken your albedo. If you are using metalness/gloss though you would colour your albedo and use a metalness map mask what parts of your mesh are metal. The parts that are more metal will be darkened automatically.

    Check out these for more info:
    http://www.marmoset.co/toolbag/learn/pbr-theory
    http://www.marmoset.co/toolbag/learn/pbr-practice
  • ZacD
    Offline / Send Message
    ZacD ngon master
    You still can use AO as a mask for dirt and dust, but don't overlay it on top of the albedo/spec/gloss/reflect/ for no reason. From what I've heard, the AO slot in UE4 for example works better when used with cavity maps.

    With PBR, no lighting information (shadows or highlights) in the your textures.
  • EarthQuake
    AO should not be baked into your diffuse, when you bake AO directly into the diffuse, it affects direct lighting too, which is totally incorrect. Say you have a fridge, under that fridge is totally dark because the light is occluded, right? Now, what happens when you shine a flashlight there? Does it stay occluded? No, of course not, it lights up. When you bake AO directly onto your textures, you're saying the texture will never get brighter than this, even if direct light hits it.

    Large scale should only really affect diffuse ambient (IBL) light.

    Baking AO into specular doesn't make sense either. Surfaces do not get less reflective when they are occluded, specular sets how reflective the base material is. So the same sort of thing happens, when you bake AO into spec you're saying that bit of the material will never be as reflective as the next, which doesn't make any sense (reflectivity tends to remain constant for a given material type). Additionally, specular doesn't get "occluded" in real life. Specular reflections simply reflect the world around the object, if its a dark or occluded scene, the reflected content will be darker. These days, engines like UE4 or renders like Marmoset TB2 have screen space reflections to account for this.

    It's typically ok to multiply cavity it detail (fine scale ao), but not large scale baked ao (again, unless it only affects ambient diffuse), as generally the engine handles the large scale ao anyway, so you'll get double occlusion if you're baking that down.
  • Axcel
    Offline / Send Message
    Axcel polycounter lvl 14
    Thank you for provided informations, now I need to digest them. ;) I should precise that my current project I am making on Unity 5 and I have no experience with that engine.
Sign In or Register to comment.