Comment by esperent
4 years ago
> Game developers are in love with screenspace ambient occlusion (SSAO).
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 article may have been about SSAO, but it applies equally well to "real ambient occlusion", because raytracing voxels assume that corners "absorb" light like a black hole.
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.
What people generally mean by Ray traced AO is just an approximation for path traced global illumination. It doesn't just work on the basis of corner=dark, and can be set up to be realistic.
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.
https://i.natgeofe.com/n/874df281-d3e0-489a-98c0-6b840023b82...
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.
1 reply →
I can confirm that when the article was written, bad SSAO was everywhere :-)
In games where I've worked as a graphics programmer we have mainly used SSAO solutions such as HBAO and GTAO.
I wasn't really a fan of AO during the original craze but I really like these modern screen space versions.
For anyone else who was not born with the ability to instantly know what an acronym stands for, it appears that HBAO is horizon-based ambient occlusion while GTAO is ground-truth ambient occlusion.
5 replies →
AO is only half of what's needed, you need full GI for realistic corners. One phenomenon that the article didn't point out, but you can simulate trivially easy in Blender, is that corners that are perfectly lit are actually lighter, due to more reflected light reaching them. To observe, just set two grey planes at 90 degrees to each other and add a point light at medium distance. Render with Cycles. Pay attention to corners in well lit places with plain smooth diffuse walls like conference rooms and you will be able to spot it in real life too!
You don't really need full GI. RTAO in Unity for example does take into account direct light and treats it differently to get the described effects, as well as some degree of indirect lighting so some corners do look comparatively brighter in some places.
At the time that the article was written, SSAO was usually way overdone in games. It's an effect used because it's cheap, okay, but then it should be toned down, not turned up to 11 and drawing attention. I do remember the ridiculous fuzzy black bars in corners.
Same as it ever was. Remember when lens flares were The Cool New Thing and ridiculously overblown in every game that came out? Or when it was reflections, or shadows, or bloom, or...
Lens flares in games were always stupid, because they imply that you're looking at the scene through a camera, which breaks the immersion. I mean, they might as well also have a boom mike occasionally pop in from the top of the screen while they're at it.
2 replies →