41 comments

[ 2.6 ms ] story [ 29.3 ms ] thread
SSAO really is awful but it’s the best performing AO we could get for a long time afaik. It’s such a hallmark of 00s and 10s rendering that I laugh every time I see it in a modern release. There are some new solutions hitting the space, I believe RTGI/PT inherently handles AO, and there is even a new method called ‘FidelityFX CACAO’ which does look considerably more realistic. Things are improving… slowly.
AO is an approximation of how indirect light behaves. If you have an actual global illumination solution you don't need these tricks.
I find this very interesting. I have implemented AO myself and understood that its physically inaccurate (it should really be radiosity presence, not ambient occlusion), but have believed the results to look realistic. Or rather; better than flatly lit, which makes geometry hard to understand.

Thank you for these photographs! It would be awesome to have a CG benchmark like this (geometry + light properties) that we could compare to. I'm sure this exists already but. Very neat!

Classic SSAO is very similar to performing an "unsharp mask" based on the depth buffer. This has been proposed "a simple and efficient method to enhance the perceptual quality of images that contain depth information" in the paper "Image Enhancement by Unsharp Masking the Depth Buffer" which came out a year after SSAO was published by Crytek.

https://www.uni-konstanz.de/mmsp/pubsys/publishedFiles/LuCoD...

For a benchmark you can just use a "vfx/cinema grade" path-tracing renderer of the same game scene?
Nowadays it’s common for SSAO to actually do local radiosity approximation via ray marching. But back in the day when this article was written, that was too expensive so you approximated it by detecting sharp transitions in the depth buffer.
I agree with his overall point, but I would point out: realism is not usually the point, the point is to look good. The problem with realism is once you get past "wow the computer can do that now", it's not very interesting -- most of reality is pretty dull looking!
I think there’s a value in realism, ARC Raiders is one of my favorite games right now and it reminds of of movies like Stalker or The Shape of Water, movies that show old run down buildings and industrial complexes in their full glory, paint flaking, water in the wrong place, it’s just fantastic. It really sells me on being in a once busy space that’s been abandoned and fallen from its former glory.
I watched a video essay about the nightclub in Hitman 3 and this is basically what they said, too. The place doesn't have to look completely realistic, it has to sell the vibe of the space. Plenty of nightclubs in games that have fine graphics and props but actually don't feel like nightclubs. That was the point of the video actually.
Not only look good, but also to be informative. His photos demonstrate the exact problem: Without the lighting hack you can have a 90° angle with almost no visible line, if the two surfaces are evenly lit. That's important visual information you've just left out.

As a player, I'd rather compromise realistic rendering in order to be able to see the contours of things.

(comment deleted)
I don't think this is true at all. I've been experimenting with a physical sky / atmosphere modeling, and it really seems that the most physically accurate sky is the most beautiful. I think this applies more generally to all light and shadows, and all natural effects which people perceive as beautiful, and at the same time difficult / expensive to recreate on a computer.
Golden hour light shining through leaves is literally the gold standard
Tangential, but sometimes real images can also seem unreal. I remember seeing a photo of Earth and the Moon with the Moon on the foreground that looked like a bad CGI. But it was actually a photograph taken by a space probe. Or, one can think about those photos of the Apollo lunar module that looked "wrong" (and probably helped some conspiracy theories spread), but were obviously correct - just there's no atmosphere to speak of on the Moon, so no light scattering etc. That said often, space images actually use "false colors" [1]

[1] https://www.scientificamerican.com/article/are-the-colors-in...

I don't know, I was very happy when I discovered what Radiance can do with what you give it. I hear people get very good looking rendering with Blender, but my brain doesn't work like that (anymore?). Point being that not everything is about games and looking good, we need reliable tools to render synthetic scenes to assess a lot of non-game related things, like quality of lighting in architecture before erecting a skyscraper or buying a house etc. To that end, every bit of knowledge like the author seems be focused on, helps. I absolutely relate to the problem with "faking" things. Even developers of Unreal engine had acknowledged -- all too late, as it is -- that it's _light_ that most affects our perception of "realism". That and materials, which is why they had some sort of field trip to Iceland taking raw photos of rocks they could add to their materials library.

Another problem with looking good is that it's a) subjective (since it has no real or objective reference point, really) and b) it quickly goes stale once something else looks "better". Just look at Doom. It looked good in 1993, everyone would agree on that. It's not realistic, never was realistic and will certainly never be realistic unless you take a particular cocktail of drugs, I guess.

Oh my! Agree 100%. Tangentially, I love games without motion blur, with perfect and unrealistic graphics, and they happen to need much less intensive graphics. Also, animations with intentionally unrealistic dynamics and appearances that are well thought and go well with their invisible (to my non-artist eyes) contribution to the story. Not a big fan of extreme depiction of emotions in some styles of anime or cartoons though, to be clear.

I was excited when seeing things that are wonderfully realistic, but just as a sign of how far we have gone in computer graphics.

I don't think the author makes a persuasive argument. Most of the photos they're analyzing are obviously lit by various point light sources, e.g.:

https://nothings.org/gamedev/ssao/IMG_0064.JPG

You can see a sharp shadow near the door frame. So yeah, ambient occlusion is not going to simulate that, but it was never supposed to?

It's supposed to make 3D shapes look good without the need to place lights or do more complex ray tracing. It roughly approximates what you could perhaps see inside a photographic lightbox. Light is coming from every direction and every surface is matte.

The reason it's used in computer games is not that it's photorealistic under all lighting conditions. It's that it makes geometries look better than before with less computational overhead than the alternatives. Harsh lights often look nasty and diffuse lighting is expensive.

one, the article is 14 years old. two, the point of ambient occlusion was not about making geometry look good, it was about making lighting look good.

The main issue it solved was normal lighting at odds with the world, it was for fast general approximation of global illumination.

Regardless of how right or wrong this is, I woulda walked around with a vacuum first to get all those cobwebs before trying to make my point.

I'm far from a neatfreak but if those are there can you imagine what the inside of bro's computer looks like? Poor thing is probably so hot

I think part of this is the mach bands illusion. We perceive some darkening at the transition between shades and think we have to replicate it in rendering. But we really don't because the brain creates the effect, so artificially adding it makes it really exaggerated.
From the photos they mostly look a bit like light SSOA. Obviously some devs overdo it, but that's not SSOA's fault. And we know SSAO isn't physically based. Of course it's not going to perfectly match reality.
In 20 years of archviz, I've only encountered ambient occlusion as a shortcut to save on compute; such as real-time viewport effects or to constrain resources on large render jobs. I've never heard anyone argue that it was physically realistic, realism was always the domain of ray tracing.
The thing that’s always bugged me about SSAO is the “jitter” visible when the player character or camera moves, which I would imagine is due to it being calculated in screen space. In some cases it’s so distracting it breaks immersion.

Given that accuracy isn’t the goal anyway I’ve often wondered if it wouldn’t be better in many cases to apply a sort of pre-calculated AO that uses a relatively small atlas of shading textures rendered on flat surfaces as decals (disclaimer: I am not a graphics programmer). It’d apply only to angular surfaces (so for example human faces wouldn’t be included) but I’d say that 80-90% of the benefit of AO lies in things like corners of rooms anyway — it’s really just manmade objects that look bad without AO, organic shapes don’t suffer nearly as badly.

SSAO is cheap, doesn't work that well and looks terrible if overdone, as many games did 10-15 years ago. The simple workaround is to dial down the SSAO so that it's maybe weaker than ambient occlusion in reality, but also not noticeably wrong or overdone. Fortunately, the settings often allow that. Problem mostly solved!

It's a common pattern that newly possible (usually due to hardware) effects are overdone for the wow / up-to-date look effect.

But corners do look better in video games like that.
Some Captain Obvious stuff.

Literally nothing real looks like CG. Shadows and lighting don't look like that. Optical effects don't look like that. People don't move like they do in games and CG animations. Physics IRL doesn't work like it does in games. Real world doesn't look like filtered JPEGs stretched over wireframes with LODs.

Author took his example photos in the backrooms lol
Discussed previously here in 2022: https://news.ycombinator.com/item?id=30595038

I still can’t help but read most of this article as a story of a guy trying to prove his theory that corners aren’t actually dark, taking photos and plotting luminance graphs of corners, repeatedly getting these strong vee-shaped graphs that indicate that the surface darkens linearly towards the corner, and just gathering more and more pictures until eventually he finds some which show flat luminance lines, at which point he declares victory because he’s proven that corners don’t darken.

So what's the best real time alternative to SSAO?
(comment deleted)
I teach 3D modelling and rendering and also drawing and oil painting.

Many time in my traditional media classes I will use the term ambient occlusion (AO) and describe it in exactly the same way as I would to my 3D class. Specifically, I ask them to imagine being surrounded by a sphere of even light. In such a case, where would the shadows be? I follow this by discussing contact shadow (e.g. the dark line between your hands as they are placed together) and core shadow (e.g. the darkness of your nostrils). In 3D rendering, both these classes of shadows are served by the AO pass.

Certainly, I would say that AO is a natural phenomenon, but it is also an effect that can be used to sweeten the naturally flat effect of a raster engine like Eevee.

I enjoy how most of the images, including the one of the Cornell box, do in fact show a sudden and significant drop off in lightness in corners, seemingly in contrast with the point the article is trying to make
Unrelated, but how would one fake splashing raindrops via a shader?
Back in 2012 was the tail of the "make games look realistic" era. Maximum realism was achieved around then, and the industry has either kept that up, made it worse by random drift without reference to reality (I admire this article for taking actual measurements), or has gone in the direction of stylisation instead.

I'm reminded of a lecture I saw yesterday (on YouTube) by an artist with an optimistic view of AI. (I'm not about to talk about AI, it was the rest of the lecture that was more interesting.) He pointed out that the first movies were just recorded theater plays, but didn't attract big audiences because the experience of seeing the play in person was better - you had sound, depth perception, and maybe audience interaction. Only when cinematographers started exploiting the medium's own advantages did it really become a thing.

There was a first person who realized that you could literally cut and paste film together to put more than one location into the same film, there was a first person who realized that you don't need continuity in the real world to make continuity in a film. He used the example of a film that showed people climbing into a cannon, then cut to a different angle, then the cannon was fired, then cut to a shot of the moon getting bigger and bigger. In reality these were three completely separate filming arrangements, probably two different cannons, but when run together consecutively they tell the impossible story of people shooting themselves to the moon with a cannon. And you can't do that in a play. Nobody realised you could do that with cinema until someone did realise. By today's standards it is obvious you can do this, but it wasn't back then!

There was the same thing with the sound recorder. Initially people just taped bands playing and played it back as a substitute for a band. But then you eventually got bands that would play looping samples (literally tape pasted into loops) and use tape machines to speed up and slow down their sound and make weird effects you couldn't do live. And just what the heck is electronic music anyway?

The guy's point was that's going to happen with AI too, but that's not my point.

I think 3D rendering in games is at or slightly past the midpoint of the same cycle. At first the goal was to recreate reality on the screen. Humanity achieved that goal around the time of Crysis. And it's a fine state to be in - it does work well - but there is more that a computer do. Actual reality is better than perfectly simulated reality on a screen, just like a live play is better than a recording of one, so the point is to go beyond reality.

Games have traditionally not really cared about stylizing the graphics so much as stylizing the gameplay, but I can think of some games, like Antichamber, where the graphics are doing completely unrealistic things.

idk what my point is here but just do darkened corners if you think they look good in your game.

As an artist, I was taught that when dark area meets a lighter one, I should add a slight gradient, deepening the dark near light.

Is it realistic?

No. But it looks more realistic. Because as our eyes track across real room, they adjust to the brightness.

So the darker region would look much darker near a light region – not on camera, but to human eye. And we replicate that effect in drawing, to trick the nerve behind the eye into believing that our pupil adjusted.

That's it, I think. We are not cameras, and our realism doesn't look like a photo.