SSAO vs. HBAO vs. HDAO - What's the real difference?

H*AO offers better quality but with an increased performance hit.

SSAO is less accurate but improves image quality with a much smaller performance penalty.

If you're going to use H*AO, from what I understand you should select HDAO if you have an ATI card or HBAO if you have an nVIDIA card.

HBAO and HDAO are essentially the same thing but different vendor specific implementations.

Here are some BF3 screenshots that may help: http://www.reddit.com/r/gaming/comments/kwjtw/my_battlefield_3_screenshot_comparison_ssao_vs/

I recommend using the link they provide here: http://www.flickr.com/photos/bmorlok/6197863052/in/set-72157627662461565/lightbox/ and using the cursor keys to quickly flip back and forth between the 3 screenshots.

You should quickly be able to identify where the shadowing is taking place between none, SSAO, and HBAO.

Look at the areas where objects intersect. For example, where the floor meets the wall, where a pillar meets the ceiling, the bushes, the pieces of debris on the ground.

I took the liberty of snatching one of the photos and highlighting the areas you should be looking at while flipping back and forth.

You'll notice that SSAO shades in these same areas, but it's MUCH less pronounced.

ssao vs hbao


First off, screen space ambient occlusion is not a physically based effect at all, so there is no realism argument. Theory of the effect basically states that

any surface that is not covered (optionally within a certain distance) is lit

Even if raytraced it's just a quick and dirty way to bring out small details on models.

Second, all of the techniques in question are just iterations of the SSAO; all of them work as a post process, after the scene has been rendered. This means that shaders have to do something magical to produce anything accurate from little information that remains after rasterization.

SSAO

This is the oldest technique. It assumes that any pixel within a given screen space radius is a possible occluder. This is roughly approximated by calculating difference of blurred and original Z (depth) buffer and darkening result if blurry version has a greater value.

The pitfall of this approach is that it both falsely darkens and fails to detect certain features. You'll have to take a really good look at this pillar but you'll notice that while the ceiling is falsely shadowed on the sides it is not affected at the junction.

Ceiling meets pillar. A SSAO demonstration

This paper has some more graphic examples.

HBAO

This algorithm attempts to solve problems of SSAO. It does so by using more information, namely the normal map. Instead of searching for occluders around a pixel in screen space it tries to restore small bits of the scene and make a more informed approximation of brightness that should be there.

You can notice that ceiling much clearly faces down, also, the pillar is darker at the top.

Pillar holds up the ceiling. HBAO

A paper by NVIDIA has some more details on it.

Conclusion

HBAO is a more recent algorithm, it produces much closer approximations of... an approximation.


Images are snippets of these screenshots.


k1DBLITZ's answer implies that:

  • HBAO and HDAO look the same
  • They have a similar impact on the framerate

This may be true for Battlefield 3, but it isn't the case in Far Cry 3.

My answer is based on what I've experienced in-game, as well as on this article from HardOCP.

What are the differences between SSAO, HBAO and HDAO in Far Cry 3?

There are differences in how they work, how they look, and how they impact the framerate. I'm not going to detail how they work.

SSAO

SSAO creates shadows around the edges of objects, sometimes incorrectly (i.e. around edges of objects that aren't close to each other).

HBAO

HBAO results in less incorrect shadowing than SSAO, but it's sometimes too pronounced (it's even darker than SSAO in some areas), especially around grass, leaves and flowers.

As for the impact on the framerate, it's virtually identical to SSAO on AMD cards, and even very slightly faster than SSAO on Nvidia cards.

HDAO

HDAO is more subtle than SSAO and HBAO. It's probably the most accurate, because there's much less incorrect darkening.

Choosing HDAO over SSAO or HBAO results in a small framerate drop on AMD cards, and a significant one on Nvidia cards.

Which one looks the best?

The answer to this question is subjective. HDAO is probably the most realistic-looking option in Far Cry 3. However, some people may prefer SSAO, as it results in a more contrasted image, which may be more flattering to the eye.

Tags:

Far Cry 3