# NVIDIA HBAO white paper explanation

This topic is 2838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So I'm going to implement HBAO. I've found a power point and a short whitepaper here: http://artis.inrialpes.fr/Membres/Olivier.Hoel/ssao/nVidiaHSAO/2317-abstract.pdf
I don't understand this line:
"For ?nding the horizon angle in direction ? , we start by computing
the tangent angle t(? ) and intersect a view ray with the tangent
plane de?ned by P and the surface normal n~"

Looking at diagram B, it appears that the horizon is view dependent because of the way they step in screen space. It my intuition is correct, this means that a flat wall would gather occlusion if you look at them from anything but head on because the plane perpendicular to your view vector is not the same as the surface plane. The way I would imagine it working is by stepping along rays that lie on the tangent plane formed by the points normal, not your view vector. The doesn't require any intersecting of view rays and tangent planes as far I can tell. I've looked at the source for their HBAO demo and it's quite a mess to read and is less understandable than the paper (they have all sorts of different version for quality level). If someone has implemented this exact algorithm and can shed some light on what I don't understand correctly I would greatly appreciate it.

##### Share on other sites
Hi there !
I've been messing around with SSAO a little while ago so I think I know the technique well enough.

First I think you can google HBAO a little deeper. Louis Bavoil has made several improvements to his method, made lots of presentation in conferences so you can easily find a more recent paper than this one (which actually came from my webpage and is quite old).

Second point is that explanation in this whitepaper are not so clear at first read. You're right to say that it is view dependant, because it's computed in screen space, but the main idea is the one you explained after: using depth and normal buffer you can reconstruct each pixel position in 3D, and tangent plane equation (in 3D also). Then you sample this plane (in 3D) and compare samples positions with what you can get from your position buffer, and retain for each direction the maximum visible horizon. Integrating this horizon gives you your AO factor.

So I'm going to implement HBAO. I've found a power point and a short whitepaper here: http://artis.inrialp...17-abstract.pdf
I don't understand this line:
"For ?nding the horizon angle in direction ? , we start by computing
the tangent angle t(? ) and intersect a view ray with the tangent
plane de?ned by P and the surface normal n~"

Looking at diagram B, it appears that the horizon is view dependent because of the way they step in screen space. It my intuition is correct, this means that a flat wall would gather occlusion if you look at them from anything but head on because the plane perpendicular to your view vector is not the same as the surface plane. The way I would imagine it working is by stepping along rays that lie on the tangent plane formed by the points normal, not your view vector. The doesn't require any intersecting of view rays and tangent planes as far I can tell. I've looked at the source for their HBAO demo and it's quite a mess to read and is less understandable than the paper (they have all sorts of different version for quality level). If someone has implemented this exact algorithm and can shed some light on what I don't understand correctly I would greatly appreciate it.

##### Share on other sites
I was able to find a presentation that mentioned a big failure case of "normal occluders" but from the two slides I couldn't understand how the fix worked entirely. So I guess more researching led to more questions. I'll exercise my google-fu some more.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 10
• 11
• 13
• 9
• 11
• ### Forum Statistics

• Total Topics
634090
• Total Posts
3015462
×