I am confused as to why Ambient Occlusion maps are used in tandem with Normal Maps. A Normal Map is a dynamically shaded texture. Wouldn't an Ambient Occlusion overlay remove some of the dynamic shading that the Normal Map provides?
I have read the wiki portion on both Normal Maps and Ambient Occlusion maps and searched the forums.
Can someone explain to me the purpose of Ambient Occlusion Maps combined with Normal Maps?
Replies
Normal maps have nothing to do wth AO maps. They just store the shift of the normals on a surface. This is why normal maps cannot hold height data. In the end, the AO maps help the illusion of depth by being in the diffuse texture; Areas far away and in cracks become darker...
also, there a difference between the AO maps used in texturing, and AO used in video games as an independent shader.
You're probably already familiar with this concept when it comes to your color map. You paint something in your texture which isn't "really there" model wise. Normal map is in a way the same thing but for the light component. It won't ever achieve the same results as a more detailed mesh would, but you can get very far with normal maps.
Ambient Occlusion occludes ambient lighting (duh). In other words it tells the ambient lighting where it is allowed to end up on your model and where it's not allowed to end up. Ambient lighting is most commonly your "everyday" and usually subtle lighting. An ambient lighting can be anything from a uniform color to a HDRI probe. So to recap, the AO texture is like your mask for where this lighting will and won't end up on your model. The theory is that as light bounces around it won't end up as much in cracks and corners as on flat and open surfaces.
One example.
http://wiki.polycount.net/Ambient_Occlusion_Map#EQBM
Another example.
http://wiki.polycount.net/Diffusely_Convolved_Cube_Map#ECIP
There are a lot of engines that don't do AO on the fly, I would even say the majority of games don't have it. Even engines like unreal prebake the AO maps for most assets, which isn't any different in theory than baking them yourself, it just automates and streamlines the process.
heres your answer!
Also, where light doesnt reach, is also where dust gathers. So yeah no matter how advanced your shader is, you need the AO pass in order to paint a convincing texture.
This is a lot of information and explains everything.
You guys are awesome.
Totally. plus you cant beat raytraced AO. the Zbuffer/Normal comparison tricks used in realtime never look as good as ray traced AO.
So, theoretically, it is incorrect to bake full AO into the diffuse texture, it should be a dynamic component only. Of course this isn't realistic for games, but nevertheless, it should be used carefully and sparingly. Also, SSAO should only be composited into the indirect lighting pass during rendering; Uncharted 2 is a game I know to do it right.
Obviously this depends hugely on art style, in some styles you might want to avoid AO at all purely for a specific look. And in ultra-real styles you would want to as vargatom said, and only use the AO as a map to occlude the ambient lighting, not the direct lighting.
You'd still need it as Pior said though, since it is very useful for texturing (as AO usually indicates those "hard to reach" places in an object, where dirt/dust and other weathering will accumulate over time.
When a game does AO in real time, it's called Screen Space Ambient Occlusion, and it's not the same effect. It operates as a post processing effect on the entire rendered image.
The thing with AO is that it has no basis in reality. It just darkens certain spots of a model, and makes it more eye pleasing. It has a nice way of really bringing out the details in a model, but it doesn't attempt to model the real properties of light.
The small amount of times like this that it could be seen as a negative is still vastly outweighed by the majority of the time where you simply want to fake AO. As realtime rendering systems get more and more complex, i think we'll get to a point where we no longer need AO baked into textures, however we're pretty far off from that still I think.
Is it realistic when hit with lighting? Not at all. However as a style I think it works well.
Some people will bake gradients into a gun as well. EQ goes into more detail in one of his gun threads from a ways back.
Sure it does?
In reality light bounces around and looses a bit of it's intensity due to the length traveled but also times it has bouned and been partially absorbed by materials. These bounces will pretty much hit all over the place, but not as much in more occluded areas (cracks, folds, corners, etc). That's your basis right there. In real-time it's very performance heavy to do any ray tracing so we pre-calculate this in advance, hence the Ambient Occlusion texture.
FG or Photon Mapping would be more physically accurate. They're much slower to solve though. usually you meet in the middle and solve a relatively rough FG/PM solution and use AO to compliment the effect(adding sharp contact shadows) AO can even transmit colour data in shaders such as Arch & Design
using it 'correctly' is described very nicely by MasterZap (Mental Images Shader Author) on his blog
http://mentalraytips.blogspot.com/search/label/ambient%20occlusion
Could you elaborate. I've read this article before and I read it again but I'm still not following how this is not based on facts from reality?
Rather than saying right i've hit a mirror which is reflecting a large amount of light back at me it says oh i hit a polygon Im now gonna get a little darker.
Iits just a measure of how much potential occlusion could happen at a given point. It takes no notice of what its hitting. it only cares that its hit something
I think most people including me have gotten so used to CG being simplified solutions to fake reality and when you get something new that more closely resembles reality you are easily inclined to go "Ooo, that's so realistic".
Yeah it's not completely physically accurate to real lightning (is actually kinda backwards) but it emulates a real world effect.
A while back i found an indie engine that raytracted Final gather and reflections in realtime. think it was called Aruna. cant find a trace (har har)of it on google.
Conceded, what im trying to get at is its a utility map, not a simulation of accurate light phenomenons.. which in hindsight is pretty off topic on a realtime rendering board.
Out of interest Perna are you talking about masking lighting from a pre calculated cube map or can you actually get scene specific colour bleeding going? wouldnt that require ray tracing.
newho ill stop derailing the topic now