r/GraphicsProgramming • u/[deleted] • Dec 26 '18
Logic behind Ambient Occulsion
I'm looking for information on the logic behind Ambient Occulsion, unless Ambient Occulsion is Horizon Based Ambient Occulsion ? If anyone has any links I would appreciate it.
3
u/Meristic Dec 26 '18
Ambient occlusion is a technique that approximates occlusion caused by nearby geometry. This is approximated by casting a number of rays into the local area from a surface point. The ratio of rays hit vs total rays cast provides insight into the surface point's visibility. The choice of sampled rays, ray traversal technique, and occlusion factor calculation are the main differences between AO techniques. Horizon-Based AO is one such variant.
1
Dec 26 '18
Is there a paper on this or explanation on how it works, or am I on the right track with what I read on Horizon-Based AO. From my understanding and this may just be mimicking what you said; each point emits rays that when hitting another point tell the point how little or how much light should be included ?
1
u/Meristic Dec 26 '18
I mean there is a plethora of papers on ambient occlusion. Screen-space ambient occlusion is the canonical technique (don't know the canonical paper.) Just googling ambient occlusion techniques will probably garner an article with a nice tour through the progression of AO.
A second point, I saw on a previous comment you said you were interested in it for offline rendering? Are you meaning ray tracing? Ray tracing doesn't require ambient occlusion since it naturally accounts for surface occlusion - less light will end up at a point whose hemisphere is more occluded since a higher percentage of the raycasts don't have line of sight to a light source.
1
2
u/rasteraki Dec 27 '18
You can find some good information about ambient occlusion here: https://www.gamedevs.org/uploads/comparative-study-of-ssao-methods.pdf
1
1
u/jtsiomb Dec 26 '18
Ambient occlusion approximates how much light would be received by any point on a surface, if there was a spherical emitter surrounding the whole scene. So basically how much of the ambient light reaches any point on the surface.
You can think of it, especially if there is a "floor" of some sort cutting off any light from the bottom, as looking through any point on the surface and trying to figure out how much of the sky it can "see". Where there are creases, or a lot of objects clustered together the result goes toward 0, while for flat surfaces with an unobstructed view of the sky, the result is 1.
4
u/goal2004 Dec 26 '18
Which approach are you looking to understand specifically? Real time or offline?