Corners Don't Look Like That: Regarding Screenspace Ambient Occlusion (2012)
nothings.org
nothings.org
I work in 3d and I think I can say with confidence that developers are not in love with SSAO. It's just that real ambient occlusion for moving models is both really hard to set up and would totally blow the performance budget for most games, while in most 3d engines you can add SSAO in couple of minutes and it costs ~1ms per frame.
That will hopefully change as graphics cards that support raytracing become more common. But in the meantime, we know SSAO is a hack. We know it doesn't look physically correct, we only use it because (if done well) it looks better than the alternative, which is no ambient occlusion, or ambient occlusion only on static models.
I wasn't really a fan of AO during the original craze but I really like these modern screen space versions.
For anyone interested the original GTAO article[0] is very well written and gives a really good insight into how these techniques work
[0]: http://iryoku.com/downloads/Practical-Realtime-Strategies-fo...
Now, yes, unlike video games, movies are in fact (usually) filmed with cameras. However, lens flares are still an artifact—they don't exist in human vision, and we know how to get rid of them. We just choose not to.
Also, speaking as someone who wears glasses and has a bit of astigmatism, flares/haloes around lights aren't necessarily stupid or unrealistic (although the classic TV camera lens flare, admittedly not so defensible).
The photographs prove however, that corners in the real world do NOT absorb light, meaning that even "voxel ambient occlusion" and other "realer-models" are fake.
It doesn't really have much to do with voxels, either. RTAO operates directly on the scene geometry (through an acceleration structure), or an approximation of it.
The true holy grail we are approaching and what game developers always wanted is ray traced global illumination, which is basically the perfect solution.
Here is a photograph of New York City.
Here is a CGI of a bunch of boxes with "Ambient Occlusion": https://upload.wikimedia.org/wikipedia/commons/9/91/AmbientO...
You can see that "Ambient Occlusion" ultimately comes down to "corners are darker" heuristic. It doesn't matter if you're doing "Ray Tracing based Ambient Occlusion" (see https://docs.unity3d.com/Packages/com.unity.render-pipelines...), or "Screenspace", or whatever. The heuristic is: "corners probably have less light", and the design of the algorithm works backwards from that.
-------
Now look at New York city again: a collection of boxes in the realistic sun. Carefully look at the corners.
Its actually kind of rare for corners to be darker in the real world. Every shadow must be calculated. Some corners are darker, while others are touched directly by the sun and have no darkening effect at all.
IMO, Ambient Occlusion "looks good" for the same reason that cartoons / anime "looks good", it instantly provides contrast in a slightly unrealistic fashion, which is more important for high-speed video games. The human eye can see the contrasts and better understand geometry with the "fake shadows" helping out.
Which is exactly what you see in your picture of New York. If the corner is in direct light, then there is no difference from any other surface - or it is even more illuminated from radiance. If the corner is in indirect light, then yes, corners are less luminous.
It's not rare at all for corners to be darker in the real world. Compare a wide open, but shaded street, to a narrow alley. The alley will be much darker.
This is exactly the idea of modern AO with ray tracing. By raytracing AO, you can actually see how "open" each pixel is to the indirect light source. If the pixel is under direct light from some source, do not affect this component of illumination. If it is under indirect light from another source, be it the sky, or the walls, or some very large area light, reduce this indirect illumination.
So if the corner is directly lit by the sun, there is no darkening at all using RTAO and a PBR renderer.
It is indeed in the name. Occlude the ambient light component.
It's not a questions of "every shadow must be calculated". It's a question of approximating global illumination, or radiosity.
Honestly SSAO is just a performance hack.
But that's ok! Game engines and the like are filled with performance hacks where things can be "wrong" but sufficiently close to what's expected that we don't (generally) notice it. Sometimes it's approximations (fast inverse sqrt for example), movement (strafe + forward having faster movement), or lighting (artificial glow, halos, SSAO, etc).
That said it wouldn't hurt for shader writers to read something like this, because maybe these issues can be handled better even though the AO is still just being approximated.
SSAO is subjective if it looks good, but it often does communicate corners and edges clearly which may be what they are going for.
SSAO is just cheap.
If you have to real-time light everything, then there's not a lot of other viable options to make your scene look a bit more solid and objects look more grounded for the cost of just a couple of milliseconds of GPU time.
https://en.wikipedia.org/wiki/Screen_space_ambient_occlusion
This article does explain a part of why I find 3D games jarring and peculiar, though; I could never get past how odd corners in games can look (e.g. when they are right behind a lamp that somehow doesn't reach them).
Just didn't know this is what it was called.
Frankly I prefer the era where games didn't try to do this.
19 comments in 2015: https://news.ycombinator.com/item?id=10105437
When a biped walks, there's a fast movement period as the leg swings forward, and then a slow period (from the camera POV) where the leg rocks slowly while the body swings around and the other leg to plant it, followed by a faster pickup to swing the leg again.
But in movies they always show the single leg complete its entire motion at a single (unrealistic) speed, usually with the leg just rocking along the ground like it was made of wood instead of actually planting the foot.
It would have been much more interesting to see a comparison between the photos of the corners in his room and a ray-traced version of a 3D model of the room with full bidir metropolis and a long render time.
Looking for a book of principals.
The reality is there are no principals with lighting; only opportunities to get different results.