117 points · by graderjs · 4y ago · 43 comments
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.
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.
I wasn't really a fan of AO during the original craze but I really like these modern screen space versions.
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.