It’s a relatively well-known tidbit of information within the gaming world, that the fog in Silent Hill was mostly there to hide the fact that the game couldn’t render much further out than 20 feet or so.
At the time, it was a pretty smart trick to add a ton of suspense and horror, while still working within the console’s hardware limitations. Of course, since then, hardware has gotten insanely more powerful, and the whole fog trick doesn’t really work (or is even needed).
Nowadays when somebody thinks about the birth of modern game graphics, a lot of people think of Cryengine, and more specifically, the good old ‘But does it run Crysis?’ meme. Well, the reason that Crysis was so instrumental in creating modern graphics is not just realism, but how they achieved the realism: Ambient Occlusion. Yep, one singular technology helped an insane amount.
What Does Ambient Occlusion Do?
So if you’ve been trying to suss it out on your own from the name, you’ll know that occlusion basically means when something gets in front of something else and blocks it out. An eclipse is a perfect example of a type of occlusion and it’s also a perfect example of how Ambient Occlusion (AO) works.
You see, what AO does is calculate what objects block light from landing on other objects based on world geometry. For example, does X chair block light from landing on the Y floor? It does? Great! Let’s add some shadows and darkness there then. By doing that, game engines can make the world look more realistic based on how the lighting interacts with the world.
Pretty simple right? Well, the idea is simple, but the actual mathematics behind it is complicated, and as such, AO tends to be quite heavy in resources.
What Are the Different Types of Ambient Occlusion?
Generally speaking, there are a few types of AO out there, with Screen Space Ambient Occlusion being the most popular and most widely used. Even so, each manages to do different things and require different amounts of processing power, similar to Anti-Aliasing.
Screen Space Ambient Occlusion
Screen Space Ambient Occlusion or SSAO is the most common type of AO because it’s the one that requires the least amount of processing power to run, and therefore is available to those who don’t necessarily have high-end PCs.
Truth be told though, SSAO is not true AO, because instead of considering object orientation and their position in the world, it instead focuses on a pixel and the pixels around it. As such, it uses approximation rather than full-on individual calculation and makes the GPU do the work rather than the CPU.
Of course, this technique tends to not have the best effect, mostly because it can introduce things like jagged edges and whatnot. Also, how useful it depends a lot on how game developers have implemented it, so it can be hit and miss in terms of quality. Again though, this allows people with computers that aren’t as powerful to get better graphics, so you gotta take the bad with the good.
Screen Space Directional Occlusion
Screen Space Directional Occlusion or SSDO is essentially the successor to SSAO and doesn’t use fancy tricks to recreate real AO.
Instead, SSDO deals with all types of light and how they physically interact with objects, whether they are being occluded, or if a light is bouncing off of them. By doing that, it can actually give you a much better sense of depth in the world, and make things much easier to differentiate as a whole.
Of course, this has the side-effect of being very processor-heavy, so unless you have a somewhat beefy gaming PC, you might not be able to use it. Similarly, SSDO actually does still suffer from some of the issues of SSAO, such as jagged edges, so it’s not a perfect solution by any means. Still, it’s an incredibly awesome effect that gives you very realistic graphics, so if you’re into that, it’s well worth it.
HDAO/HBAO
Of course, AMD and Nvidia needed to throw their hats into this race, and each one has come up with their own AO. AMD has High-Definition Ambient Occlusion or HDAO and Nvidia has HorizonBased Ambient Occlusion or HBAO.
How useful are they though?
Well, that depends a lot on individual implementation at the game level, but they do offer slightly better AO at a performance hit. Essentially at this point, you’re hitting the laws of diminishing returns, so it’s only worth it if you’ve dropped nearly two grand on a PC. Not to mention that these two aren’t that widely implemented anyway, so you might not even find them on your favorite games.
Global Illumination
Ok, so this one is a bit of a cheat since you won’t find it in any game engine, but it does offer the most photorealistic graphics of all the AO. It does this by taking into account how light interacts with objects and surfaces, even if it isn’t in-frame. So if you have a mirror reflecting a sunbeam behind you, it will still show up, even if the source of the light itself isn’t in the frame.
As you can imagine, this takes a massive amount of graphics processing, so it’s mostly relegated to films. If you’ve ever seen one with insanely good graphics, GI is probably what they’re using.
Are you going to see GI in games? Most probably not, but never say never. Graphics cards are getting increasingly more powerful, so who knows what the future holds. That being said, there is a caveat below.
Which Ambient Occlusion to Use
So here’s the sticky wicket: AO isn’t actually the most useful graphical enhancement for the performance required. Yeah, it looks great and everything, but the cost of GPU resources is really high and it basically prices out a whole bunch of gamers who don’t have the $1000 to drop on an RTX 2080 or some other graphics card that can handle the processing required.
Instead, things like bloom (which is a shader effect), distortions, texture-mapping, and Anti-Aliasing all generally require less processing power and yet can get pretty close to the same result. So if you’re looking for what graphical effects to use, you’re better off increasing these other ones first before trying AO to see how it looks.
That being said, if you do have a computer that can handle it, then SSDO is probably what you should go for, and even if you have a quality budget gaming GPU, you might get away with SSAO.
Final Thoughts
While Ambient Occlusion is pretty cool, and can certainly make your game look amazing, you still have to consider how useful it’s actually going to be. Personally, I love photorealistic looking games, so I don’t mind spending a substantial amount of money on a high-end GPU (while I starve eating noodles), but that’s almost certainly not the case for everybody.
At the end of the day, if you don’t need amazing graphics to enjoy your games, then keeping AO switched off will most likely give you better performance.