What is Ambient Occlusion?

Last Updated on by Nicholas Frost

During the early days of video games, where all we had were indiscernible two-dimensional pixel or sprite graphics, a lot was left to the imagination. Back then, computer graphics were composed of barely recognizable shapes, made to pass off as their real world (or in many cases, movie world) counterparts. They would do the best they could and then focus on fun, repetitive gameplay that is a great way to pass the time every Saturday afternoon. This went on for a very long time, with the Atari 2600 being the main home console that did the job.

After the videogame crash of the 80s, Nintendo and Sega rose from the ashes and made new consoles: the Nintendo Entertainment System and the Sega Genesis respectively. These consoles featured much better graphics where you could really recognize what each individual element is. Sure, there is still some left for the imagination, but you definitely wouldn’t need to work as hard as you did before. During this 8-bit and subsequent 16-bit eras, sprite graphics were taken to the absolute limit the technology at the time could give. But it was still the realm of 2D or two-dimensions. Most games would be side-scrolling, or top-down, and whatever “3D” game would come out would still utilize sprite graphics. It was a great way to create games, and many classic games still considered to be some of the best in their genres used. However, when the Sony Playstation came around, the gaming industry would never be the same. It would enter the realm of three dimensions, or 3d.

With the arrival of 3d graphics came a new frontier in video gaming. Suddenly, two-dimensional sprites were a thing of the past, and game developers quickly pushed the envelope to create better and better 3d graphics that would make the immersion of gaming as best as technologically possible. If during the 8 and 16-bit eras very little was left to the imagination, with the dawn of 3d graphics, nearly nothing was left. Game developers could create virtually anything they could model and use in the game. And as time went even further, the quality of these 3d graphics just got better.

Today, the quality of 3d graphics in video games, especially in triple A video games are so high quality that it is blurring the lines of reality. This is because over the years many features were developed to greatly enhance the realism 3d graphics can bring. From hardware acceleration to software tweaking, the 3d games of today are lightyears beyond what the game makers in the 60s and 70s could ever dream of.

There are many elements in 3d graphics that all contribute to producing one fantastic image. Lighting is, of course, one of the most important. Being able to take into account the effects of lights in an area and the shading it will cause could be the difference between high quality imaging. And this is where ambient occlusion comes in.

What is Ambient Occlusion?

At first glance, the term looks and sounds very technical. And if you define it by finding out what the words “ambient” and “occlusion” mean separately, you’ll get a vague idea of what it is. Online dictionaries define “ambient” as “relating to the immediate surroundings of something.” Sounds simple enough. However, “occlusion” means a couple of slightly different things, which all have three things in common: a blockage, a momentary closure, and positioning.

Combined, you’ll get something along the lines of “things around that block paths.” Still sounds confusing? Don’t worry, it’s not actually far off. You see, ambient occlusion is the shading and rendering method to figure out how much of a specific point in a rendered scene gets ambient lighting. It is the method to see how “accessible” each point in the scene is to ambient light, in order to produce an effect that is so much closer to how real world lighting works. It is different from shadow casting (we will get to this later on) but produces a shading effect. Enclosed or hard to reach areas are darkened, and exposed areas are lightened, increasing the realism of a scene.

Still confused? Think of it this way. Take a toilet paper cardboard tube, and place it on a regularly lit table. Take a peek inside the tube, and then take a look outside. Because the inside of the tube isn’t easily reached by ambient lighting, it appears darker than the outside of the tube. That is what ambient occlusion does. Now if the real world had graphics settings, and we turn off ambient occlusion, it won’t be so easy to distinguish what is the inside of the tube from what is outside. Unless the textures (we’ll get to this later as well) of the cardboard tube already have shadows painted on.

Ambient occlusion when done correctly, results in a scene that looks so much more realistic than when rendered without ambient occlusion. But there was a time when ambient occlusion wasn’t used in video games. In 2001, the movie Pearl Harbor which starred Ben Affleck and Kate Beckinsale used ambient occlusion. In 2007 though, Crytek’s game “Crysis” unveiled the Screen Space Ambient Occlusion, the first time ambient occlusion was used in a video game. The results were stunning, and at the time, Crysis was hailed as a beautifully made sci-fi epic. Not only because of the story and gameplay, but because of the cutting edge graphics of the time. But such a cutting edge technology meant that on release, Crysis had one of the highest hardware requirements of any game. Nevertheless, it set the bar in which other triple A titles that wish to achieve immersive and realistic graphics must reach or pass.

How Does Ambient Occlusion Work?

We now know what ambient occlusion is. But how does it do its job by adding depth in the video game scene in the form of shading?

The method developed by Crytek, specifically by Vladimir Kajalin, works as an algorithm of a pixel shader. Pixel shaders are, in essence, compute different attributes and settings of an area of a scene or object in a scene, and produce a result based on those computations. It can be a simple result like a plain color, or, in this case, an amount of light. It does this for every pixel that is present on the screen.

This sounds like a lot of work, and it is. Arguably this is precisely why it took so long to implement it in video games. Because prior to this, it was very difficult to execute ambient occlusion via real-time rendering. But the solution that was produced by Crytek, which uses sampling of a set number of pixels instead of every pixel, greatly reduced the amount of time and processing required. And with other technology developed alongside, it allowed for producing a high-quality image that is acceptable for advancing video game graphics.

These days, there are many kinds of ambient occlusion or AO as the industry calls it, and they function slightly differently from one another.

Kinds of Ambient Occlusion

The different kinds of ambient occlusion have similar but slightly different results depending on how a game developer has used each. Here are some of the most common ones, and their pros and cons.

SSAO or Screen-Space Ambient Occlusion – the granddaddy of the ambient occlusion technology for video games. Developed by Crytek in 2007, SSAO set the standard when it comes to ambient occlusion and to this day is the default option for most video games released.

Key features:

    1. Little to no CPU resources – because of the algorithm used, there’s virtually no need to use the CPU. SSAO can be done by the graphics processing unit or the GPU.
    2. Fast and resource friendly – because there is no need for pre-processing, SSAO has virtually zero loading time and memory allocations. SSAO can be done specifically in the GPU
    3. Consistent and reliable – the algorithm is applied the same every time.
    4. Adaptable – can be applied in a variety of ways by video game developers and GPU makers.

SSDO or Screen Space Directional Occlusion – can be considered a step-up from SSAO in terms of technological advancement. SSDO doesn’t just use the pixels of a scene or an object. It also utilizes the direction of the light which is hitting the object, and any lights bouncing off of objects behind it. This gives the player the ability to distinguish objects by seeing the difference in the amount of shadow and light between them.

This gives more depth and realism above what SSAO already brings and brings video games closer and closer to the ever elusive photorealism setting.

Key features:

    1. More realistic lighting – by taking into account the direction of light from light sources, the depth of the lighting becomes much more enhanced.
    2. Not so far off from SSAO resource requirements – even if SSDO is the successor to SSAO and has more features, the resource requirements remain very similar to it and this isn’t that big of a burden to modern GPUs.

HBAO/HDAO or Horizon-Based Ambient Occlusion and High-Definition Ambient Occlusion – these are variants of SSAO that belong to two GPU developers. Nvidia owns HBAO, and AMD owns HDAO. They aren’t that different from SSAO, but produce better ambient occlusion, especially if used with their respective video cards. This, however, comes at the cost of a higher resource requirement and performance drop, unless the GPU used is very up-to-date.

VXAO or Voxel Ambient Occlusion – this is the next step for HBAO and was also developed by Nvidia. It provides a higher quality of ambient occlusion than HBAO, but at the cost of being more resource heavy, even taking into account today’s average GPUs. To fully utilize this kind of ambient occlusion, you need the most top-of-the-line GPUs available. When enabled, however, you’ll definitely see the difference.

GI or Global Illumination – this kind of AO hasn’t been used in video games yet. But knowing how technology progresses, we will definitely see this within our lifetime. This is how photorealistic illumination is done. GI takes into account all of the light sources present in the scene, and how each affects the many objects present there. Because of this, the illumination is near, if not already, exactly the same as in the real world. Realistic lights and shadows that will make anything in the scene look exactly like their real-world counterparts. Unless of course they are modeled or made in a clearly unrealistic way.

Does Ambient Occlusion Really Make A Difference In Video Games?

With the way ambient occlusion is described, it seems like AO is the key ingredient in making video games very realistic. And in many cases, it does. However, if you’ve been playing a lot of video games the past few years, you’ll notice that not many games except for triple A titles include AO or its variants. Why you might ask?

Thing is, even if AO doesn’t take any CPU processing power, and is resource friendly, ambient occlusion is very taxing on the GPU. Now you might be thinking, “my PC can handle anything, surely everyone else’s PC can?” But not everyone will have the same GPUs, will have the most cutting-edge tech, and the latest software. And video game companies are going to think about the bottom line, also known as selling their games to as many people as possible.

If a game is too heavy for the hardware, it might not sell as well. And this is actually one of the main complaints that critics and players alike made about Crysis. At the time of its release, the average PC player couldn’t even run it without framerate loss or a drop in quality or something to that effect.

Now, let’s assume you are able to turn on ambient occlusion without any negative side-effects. Is the impact really noticeable? Well, the short answer is, it depends.

This is because it also depends on how the game developer implemented ambient occlusion in their game. Done correctly, the effect is almost immediate once you turn the settings on. You will especially notice this when objects are placed close to one another, such as grass and vegetation elements, or when objects are close to walls, ceilings, or floors. If you’re a very visual gamer, then this is something that you’ll greatly appreciate.

Done incorrectly, however, you’ll barely notice the visual difference. But you will definitely feel the performance drop in the form of lower fps or lag. And if that is the case, then what is the point of leaving it on, right?

In some cases, it’s a middle ground between the two. Sure you can see -some- difference, but it might not be significant enough in the long run to warrant the possible performance drop. When that happens then it’s just a case between visual quality versus performance. And if you’re a serious gamer, chances are you’ll opt for performance.

But there is another reason why ambient occlusion isn’t as widely used or included in many games. And that is because there are alternatives to it that produce very similar results without the performance side-effects.

Alternative to Ambient Occlusion

One of the most popular alternatives to ambient occlusion is bloom lighting, used by popular games like Skyrim. To put it simply, bloom lighting is an artificially created reproduction of a visual artifact that real-world cameras producing when receiving light. It’s like a soft glow (hence a “bloom”) that bright areas of a scene produce. This takes over the camera and is evident in movies, television shows, and even home-recorded videos using video cameras or mobile phone cameras. It gained traction in video games back in 2004 and has been present in many video games since.

The bloom lighting effect causes the light of a bright portion of a scene to “bleed” into other visible elements in the scene from the camera point of view. The human eye recognizes this as a realistic effect that we have seen and experienced before, and processes it as realistic lighting in our brains. So even if the shading produced by ambient occlusion doesn’t exist in a scene, the bloom effect compensates to give the “immersive” realistic effect.

The best part? Bloom lighting takes up very little GPU processing power, or at most, it is not close to what ambient occlusion will demand from a graphics card. This is why it became a popular visual effect for many games since 2004, including triple A titles like Elder Scrolls IV: Oblivion and Elder Scrolls V: Skyrim, as well as the Fallout series, and more.

If ambient occlusion isn’t worth the trouble or does very little, should you even consider turning it on when playing games?

Should You Turn On Ambient Occlusion In My Game?

After talking about it further, it seems like there are more cons than pros when it comes to ambient occlusion in video games, right? So if that’s the case, should you even turn on ambient occlusion at all? If all you’ll get is a minimal visual enhancement for a lot of resources, then it’s not worth it, correct?

The short answer is, once again, it depends. If your GPU can handle it with minimal or zero performance drop, then turning ambient occlusion on is definitely an option, especially if you want to enhance your visual quality. It also depends if the game does it well or not. If it does, then it’s worth possibly losing a bit of performance for visual quality. And if it doesn’t do it well, then it’s best to just leave it turned off. The only way to find out is to turn on the feature and check for yourself.

It is the general consensus that ambient occlusion is just a gimmick special effect that adds little to the video gaming experience that other effects can’t give without the side-effects. However, some games do this very well, so if you play those games that do this effectively, then it’s worth keeping the feature turned on.

0 Shares:
You May Also Like
Read More

Best Hard Drives For Gaming

Having back up troubles? External storage devices are the best solution for your ideal back up needs. Whether…
Read More

Best PC VR Games

Virtual reality has arrived on the PC. This technology takes you inside the game world itself, not just…
Read More

Best CPU Coolers

Let’s talk the Best CPU Coolers. While all CPUs will come with a stock cooler, they are not…
Read More

Best Gaming Mouse

So, you’re building the ultimate gaming computer set up. You’ll likely consider high-spec graphics cards, monitors and sound…
Read More

Cadence of Hyrule Review

In the video game industry, some of the most successful games have established themselves as an entire franchise.…