Hacker News new | past | comments | ask | show | jobs | submit login
Corners Don't Look Like That: Regarding Screenspace Ambient Occlusion (2012) (nothings.org)
134 points by vanderZwan on Nov 30, 2018 | hide | past | favorite | 36 comments



This is an interesting read, but I wonder if we're going to see SSAO/HBAO becoming less relevant in the near future with the prevalence hardware which can handle ray-tracing and other real-time global illumination techniques like voxel-cone tracing.

SSAO has been a valuable technique in terms of adding a lot of depth to real-time renders with a relatively low cost/quality ratio, but at the end of the day it's more or less a neat trick which is not physically based. I suspect we will see it go the way of using billboards to approximate auras around string light sources. It added a lot of atmosphere in the late 90s/early 2000s, but the feasibility of real-time bloom (and more recently volumetric lighting techniques) have relegated it to the history books.


AO is still a raytracing technique to create non-physical based depth. Ex: I'm pretty sure Voxel-cone tracing will still "unnaturally" darken corners, as pointed out in the discussion.

Just because it "isn't real" doesn't dismiss the use of AO. AO improves contrast and likely improves the time it takes for humans to see the edges of objects.

I don't think AO is used in movies that try to emulate reality. (ex: Iron Man's suit, Spiderman's suit, or other 3d effects). But cheaply increasing the contrast and edges of characters may remain important in video games, at the cost of being less realistic.

Then again, video games don't usually look hyper-realistic anyway. There's just not enough space in the budget for that yet. Video Games can likely benefit from better sub-surface scattering for example...

------------

The only "fully real" technique is to use a 16k+ HDRI environment map for lighting. The technique doesn't seem to work for enclosed spaces though.


Maybe, but the question is why you would do a less accurate approximation when you can easily do a better one?

For example, before true HDR lighting in games was a reality, Half Life 2 faked iris adaptation by placing a brightly colored quad at the end of an exit from a dark tunnel into an outdoor space, and fading it out as you walk toward it, as if the player's vision is adapting to the brightness.

Now the same effect is achieved by rendering to a floating point buffer which has much more dynamic range that can be displayed, and compressing that range in post-processing with parameters based on the light levels of the area the camera was focused on in the previous frames. It's much more faithful to real life, and it's less work than the faked solution from Half Life 2.

You might be right that AO adds value beyond enhanced "realism", but it could also easily add to a long list of graphics techniques which look jarringly bad when compared to the more refined technique which replaces them.


Ambient occlusion was originally invented as a computationally lightweight way to add depth cues based on the assumption of uniformly diffuse illumination of the whole scene. This works quite well in animated movies where we perceive this as part of the stylized look. But this is not physically correct.


>video games don't usually look hyper-realistic anyway Eh, they don't have to, but there are certainly many games already where a slightly blurred screenshot could be mistaken for real.


It would depend on what the screenshot contained, but in all but the best-case scenarios, I think you'd have to use a lot more blur than what I'd consider "slight".


Agreed, ray tracing will make SSAO less necessary. One of the goals of ray tracing is to be able to unify all the ad-hoc techniques like SSAO into one easier to use framework.

Ray traced games might still have over-darkening though, at least initially. A lot of ray tracing code I’m seeing is using very short max distances for AO rays. This helps with both tracing performance and with noise. But I think looking at too small of a local neighborhood is a big part of what’s responsible for the over-darkening the author is pointing out. To get realistic corner darkening, you really need path tracing or some other global illumination rendering.


> Ray traced games might still have over-darkening though, at least initially.

Couldn't we get around that similar to how we used to get around draw-distance back in the day with fake "fog" by assuming distant rays are more scattered, and hence can be modeled by less rays somehow?


Yeah, I think we could. There are definitely a bunch of ways to somewhat mitigate over-darkening. We can never completely get around it, though, unless we just go for global illumination. And still in that case, we definitely want to assume & leverage your idea that distant rays are more scattered. Aside from that, separating AO from material will always cause some kind of problem.


Methods like Adaptive Raytracing [1] should allow raytracers to mix large and small max distances and use machine learning to spot the differences and estimate it for all the rays even though a tiny percentage of rays were actually to a large distance.

[1]: https://2018gputechconf.smarteventscloud.com/connect/session...


It would be pretty interesting to use a neural network for AO! It's a good coincidence you linked to SSIM based adaptive sampling, I'm actually using the research you linked to: I implemented the OptiX API for SSIM prediction. So far, we've used it for choosing where to send more rays, but I'm not aware of anyone using it to adapt the max distance for AO rays. That might be fun & fruitful to try!

I'm not certain, but I think in theory that capping the max distance will always bias the AO (to the extent that AO even makes physical sense). You can reduce the bias by mixing lengths, but I'm not sure if you can ever fully compensate for it. More importantly, it's always (theoretically) biasing to separate AO shading from the normal surface shading & lighting calculation. AO is a beautiful simple hack, but I'm not sure it will survive the future, especially as ray and compute budgets increase.

I know I've seen other AI attempts to learn AO & global illumination, just googling a bit:

http://theorangeduck.com/page/neural-network-ambient-occlusi...

https://www.youtube.com/watch?v=z_zmRWxU-PY


> adding a lot of depth with a relatively low cost/quality ratio

I guess that's subjective. To me AO feels like "a relatively large performance hit [at 4K] for darkening corners that I absolutely do not want to be dark". I always turn any AO off.

Am I the only one who wants just more detailed meshes and textures and LESS shader effects? I prefer plainer flatter looking things :P


Yeah 4k is a different ball game. Most graphics processes will scale with polynomial complexity with respect to screen resolution, so even if something is relatively cheap at 1080p or 1440p, at 4k you still need a lot of raw power.


Just noticed this was submitted a few times before (not surprisingly), apologies if this makes it superfluous. Only one of those times it actually got any traction and discussion:

https://news.ycombinator.com/item?id=10105437


Definitely not superfluous. On HN the coast is clear after about a year: https://news.ycombinator.com/newsfaq.html.


I actually think it is okay to repost if previous posts happened 'long' ago.

There will always be new users discovering it, or old ones who missed it or don't remember it.

I surely won't look at posts made a few years before I joined.

Most importantly, it was an interesting read ;)


I wish that the ceiling and walls were painted the same color. I feel like it would've been more valuable with contrived models instead of a real apartment.


It would be interesting to revisit this comparing reality vs “Groung Truth Ambient Occlusion”. http://iryoku.com/downloads/Practical-Realtime-Strategies-fo...

Also, it's not entirely surprising that AO wall corners don't match his living room. AO models an environment with light coming in from all directions uniformly --as if you were inside of a giant, glowing white sphere. His living room walls may be lit indirectly. But, there is still a lot of directionality to the bounced light.


How commonly used is GTAO? Is it as practical to implement and performant as SSAO? I couldn't get much from reading the abstract.


I don't think it's common. It is used at Activision. It has good performance. But, that's largely dependent on a temporal scheme that amortizes the cost across frames.

https://research.activision.com/t5/Publications/Practical-Re...


> The tiny peak at the edge is probably because the edge between the two walls sometimes has white paint showing through, so it's not a lighting effect.

I vaguely remember an old graphics professor mentioning that this peak would exist because of reflected light from the other wall, though I can't find any literature after some light googling. Is this a real thing, or am I crazy?


I think corners are probably more dark in games and movies than in real life, due to dramatic lighting. It's often an artistic choice.

That doesn't address the cases where there are weird artifacts as he mentioned. Those can be a pain to avoid in game engines since you're often using lighting "hacks" (like SSAO and others) for performance reasons.


This is what programming does to you. It makes you take tons of pictures of corners to prove a point.


Well, it certainly bring new meaning to "corner case".


Suppose this is the original meaning, not strictly in the context of ambient occlusion though in general. Compare "edge case".

Ironically though, with division by zero for example, it's more of a center case.

Not to ruin a joke, but I wonder how far back this figure of speach goes. "extremum" is rooted in Lt. "exter", superfixially "ex-" + "-ter", with "ex-" derived from (reconstructed) PIE h1eǵhs or eḱs (out) [1] and "-ter" comparable to "inter". The derivation of "-ter" is uncertain and the whole reconstruction effort is a bit like reading tea leaves (oracles may follow strikt rules, too, you know). I'm going to go all out on a limp and suppose eks is related to h₂eḱ- (sharp), whence "edge" and Ger. "Ecke" (corner); And to h₂eḱs- (axis, axle), proabably related to h₂eǵ- (to drive) [to go out?]. IMHO it's most likely sound immitative of cutting, hence sec, ex, hack, axe, adze and so on. Suppose initially the problem was really a corner where it shouldn't be. Then what are you supposed to be doing? Cutting corners!

[1] https://en.m.wiktionary.org/wiki/Reconstruction:Proto-Indo-E...


​h1eǵhs can't be related to h2eǵ-, since the laryngeals and plosive phonations are different. The plosive phonation distinction isn't as relevant here as the laryngeals - for one thing, the reconstruction ​h1eǵhs isn't certain, even by the Greek evidence - but the numbered laryngeals were entirely different consonants, which only form a class insofar as they all disappear in non-Anatolian IE. (Well, probably. Word-initial h1 may have been preserved in some cases in Albanian, and word-initial h2 may have been preserved in some cases in Iranian. ​HC- -CHC- can be reconstructed by the Greek and Armenian triple reflex (e.g. *​h2ster on the evidence of Greek ἀστήρ and Armenian astł), but laryngeal loss probably occurred in the late IE period, after the beginning of the development of dialectal innovations like that and, if you buy it, Cowgill's Law in Germanic.)

If it helps, you can use Kortlandt's values for the laryngeals: ​ʔeǵhs, χeǵ.

The -ter suffix in "inter" and "exter" (of which "extra" is an ablative form) could be from the comparative suffix -teros. Wiktionary thinks this is true of "exter" but not "inter", I guess because cognates of "inter" are more widespread (although it could be a loan in Albanian, but probably not Indo-Iranian) - so it could've spread from there to "exter" by analogy, or influenced the comparative form.

(Is there a good way to escape asterisks on HN?)


There are competing laryngeal theories but the truth is, currently, the symbols are just placeholders. -ter is interesting, but doesn't matter much.

> can't be related to h2eǵ-, since the laryngeals and plosive phonations are different.

I didn't wanna mention it, because there's no end to it, and leaning on the alternative reconstruction, I chose to ignore the difference. But you are welcome to tell me more about it--Running down the list of confirmed sound laws for PIE should be real quick. There are none, as far as I know. You can't deduce from this alone that the language was stable. So I wonder on what you base your assumption.

Well, there are rules concerning composition, and no Consonant the same in CVC except perhaps in one rare exception (ses - sleep). But that's far from exhaustive.

There's really too little known to say anything definite. Semantic speculation could help a huge deal, but of course linguists are biased towards phonetics, to the degree that comparing axe and ex could be humoured to sound nothing alike. Often times they are right. That makes them narrow minded. Of course I would need to know that better to argue with it.

> If it helps, you can use Kortlandt's values

There are competing theories. Although I used to ignore laryngeals, German dialects know so many different realisations of "ch", that I think I'm good, thank you (ach echt, kiek ma, ick dachte du brochst noch en Beispiel: woher kommt "auf dem Spiel stehen"? Vielleicht von Spiegel [Notenspiegel, Tagesspiegel, etc.] > Spieyel, Spie'l; Spiggel, spick, spec- peck pickel picture). It's very similar, ch after a, o, au or u it's rough, after e, ei, eu or i it's soft, but this varies with dialect (it's all rather rough in swiss, ch or not); g can be velar (geben or yeben, fällig or fällich; some dialect even says elektrich, but elektrisch is standard) etc etc.

I have Pacht pächter down for *pHter (father), that would be a surviving laryngeal ... Acht, ächten? So yeah, pinch of salt and all.


Are there any probable cases of laryngeal alternation? I'm not aware of any. Radical consonants (which the PIE laryngeals probably were) can be stable under certain conditions and unstable under others - they seem to be less stable in Germanic than in Semitic or Northwest Caucasian, although Germanic /k/ is stable... but Polynesian /k/ isn't. IMO the best guess at this point is that the PIE laryngeals were stable until they disappeared

Confirmation in historical linguistics is probabilistic. Sound laws can't be demonstrated the way "the sun is up" can be, but there's a great deal of evidence for Grimm's and Verner's Laws, less evidence for Cowgill's, and even less for things like the "pibati rule" or h1 preservation in Albanian. (I'm skeptical of the pibati rule - the root is irregular in some branches anyway, and it could be dissimilation or an exception to the loss of b or something.)

The root composition rules are a little more complicated than that - you can have TeT or DheDh, but not TeDh, DheT, or DeD.

Laryngeal preservation in Germanic is a pretty extraordinary claim. Are there other cases of this?


I can't even tell what field of study you are guys are discussing. I don't recognize any of the jargon. Are you guys PhD linguists or something?


The big idea is tracing the roots of language to ancestors.

It's historical, comparative linguistics. At least for me, this is just an intensive hobby.

There's an intersection with CS in computational methods, which, is IMHO severly lacking, or better to say, rather promissing, because semantics was intractable, so far. There's a lot of exiting development in NLP, of course. Categorical Semantics gives it an algeabric underpinning ... so the whole thing ties back in with the featured article.


Most of the computational methods stuff I see in historical linguistics is about trying to put a computational gloss over lexicostatistics, which I don't think is a very promising field. Preliminary surveys of probable family groupings are one thing, but unless sound correspondence identification can be automated, I don't think the later stages of classification can be aided much by computational methods. You still want regular phonological and morphological correspondences and, ideally, shared irregularities (good/better ~ gut/besser, that sort of thing), and I'm not sure what computational methods could do for that.

But there's really a lot to do in the preliminary stage, although it isn't always obvious. I'm still seeing classifications of Papuan languages that go entirely by their pronouns, the historical map of Africa is being redrawn (to clear out the overly enthusiastically lumping Greenberg classifications), and there are probably a few more chunks to be torn off Sino-Tibetan, which could... maybe be identified by throwing computers at word lists?

It's too bad language family proposals don't come with epistemic status markers.


Not even close, but it's an unusually easy field to follow from outside academia.


I'd love to see some in-game screenshots of where the author thinks it doesn't look realistic.


There’s some screenshots linked in a tweet at the start. Based on that tweet, I’d argue the engine used in Far Cry 3/4, as well as the one used for the dead island/dying light games, are some obvious examples of offenders I can think of, but I’d agree with the author that its missuse/overuse is pretty rife.

AO was one of the primary shiny new things in game engine technology this generation, Nvidia also heavily pushed the tech as one of the new rendering features its recent GPUs are good at. Given this, I’m not surprised we saw some pretty questionable artistic direction with this stuff at times. It’s arguably now part of the PS4/Xbox One generation “aesthetic” in much the same way the over use of pixel shading effects can be argued to define the 360/PS3 era.


Thanks for sharing! Maybe I'm missing where you're talking about, but in the OP I only see a link discussing the Halo effect and one discussing artifacts.

I'll definitely keep an eye out for this in games now. It's easy to notice when something isn't photo realistic, but generally very hard for me (as a non-expert here) to pick out precisely why, so I appreciate this type of content.


I agree it's not realistic, but to be honest... I kinda just like the look of ambient occlusion. The depth cues I think just really help.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: