Implement baked AO-maps

Started by
3 comments, last by 0r0d 7 years, 9 months ago

Just a quick question, What is the standard equation for implementing baked AO-maps (from maya, 3DS max etc.)? Becuase of the fact that it is how much light a specific point is exposed to, would it not just be diffuse * ao?

Here is the result after I tested that:

[attachment=32543:ao_no-ao.png]

Advertisement

Not sure what you are asking. In a shader you can implement AO a few different ways. Add all the lighting in your shader from all lights and then multiply that value by the AO texture. Or you can simply take the scenes ambient lighting and multiply it by the AO map. What you have right there is wrong. Those bricks should have no AO. They are so low in height displacement that they aren't blocking any light rays from hitting the crevices. Not sure how you calculated that AO.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

As I wrote I just multiplied the AO with the diffuse color. It was the first thing that came to mind.

EDIT:

I now take the sampled color from the ao-map multiplied by the ambient light, then ambient result + diffuse color (the resulting color after normal calcuation etc)

"saturate((ambientCol * ao) + diffuse)"

Personally I think it looks alot better:

[attachment=32544:No-AO_AO.png]

Add all the lighting in your shader from all lights and then multiply that value by the AO texture. Or you can simply take the scenes ambient lighting and multiply it by the AO map.

The second option is the only correct option when it comes to AO. Contrary to what you sometimes see in games, AO should only be applied to your ambient/indirect lighting term as it is a form of shadowing generated by ambient lighting, not direct lighting. Applying it to your direct lighting term will result in those overly dark ugly halos around objects, which you often see with SSAO-like implementations.

I now take the sampled color from the ao-map multiplied by the ambient light, then ambient result + diffuse color (the resulting color after normal calcuation etc)

This is correct :)

I gets all your texture budgets!

I'm also not clear on why those bricks have AO or how it was calculated. As dpadam450 said above, there shouldnt be that much height difference there.

This topic is closed to new replies.

Advertisement