Lumen and Ray Traced Ambient Occlusion

Struggling how? Lumen is raytraced global illumination which means it handles both bounced light and ambient occlusion automatically.

1 Like

I feel like what I’ve seen in the forums is concerns over lumen and AO without an understanding of what ambient occlusion actually is. I hope my tone doesn’t come off unpleasantly.

Ambient occlusion is not actual lighting in any physical sense. Essentially, ambient occlusion is answering what parts of an object would be in shadow if it was being lit evenly from all sides. Nooks and crannies that aren’t very visible to the surface are darker than the areas lying flat up on the mesh. The only reason it works is because it’s good enough to fool the human eye.

Lumen is a full light transport solver. It’s not faking the look of lighting, but doing (approximate) calculations to figure out how light would actually propagate around a scene. Lumen considers light sources and emissive surfaces when it calculates, AO doesn’t. Lumen looks at material information, AO (with a few expections) doesn’t.

Unreal engine 5.1 now has a few art direction knobs that let you control the strength of bounced light, and how much the skylight is leaking through geometry, and a few other things. To get a little prescriptive (which means feel free to ignore me if you disagree), effects like darkening corners should generally happen in exposure and color grading passes, as more often than not lumen is giving you the existing information, you just need to tweak how much of it you should see. It also avoids the hassle of unnecessary composition in-post.

1 Like

More simply put, lumen and AO aren’t meant to go together because lumen is based in real-world physics (with art knobs), and AO is not. Ambient occlusion cannot match reality because in the real world, there’s no such thing as an ‘ambient’ scene. Everything must affect everything else, which lumen (approximately) takes into account.

It seems like you don’t understand what AO is and what it is used for. Lumen is what I call a “general purpose solution”. It can resolve the lighting in general, but when it comes to some nuanced cases, high frequency or small details - Lumen sucks. It sucks so hard that Epic Games had to bake AO to textures to make their Matrix city look good. You can download the sample city pack and see it for yourself.

1 Like

They’re using material AO on very thin details, car interiors, and wheels. It’s being used to improve a few problematic areas, not as a large crutch.

It is a huge crutch. Readability of those small details and elements and their tie to the environment is extremely important. Especially in architectural visualization. That’s why we have so many different AO techniques. Even ‘unbiased’ offline renderers have AO pass.

By the way, they backed AO not just for small details but also for bigger ones. You can even see on some buildings the AO cut off ‘stitches’ where elements with different baked AO passes (usually used as masks) connect to each other.

Switch to unlit / base color mode and you’ll see a lot more.

I think you highlight something very important @ZacD. Ambient occlusion as a standalone rendering paradigm is not the same as ambient occlusion as part of a larger suite of techniques. Lumen is designed as a full GI and reflections solver, and in real-time, that means using a different set of techniques for different scales of light transport. The medium and large scale are solved through hardware instance and far-field tracing, but the near-field, fine detail is resolved through a mixture of screen-traces for contact AO, material AO, and/or bent normals.

Material ambient occlusion is a completely legitimate ‘cheat’ because offline renderers can bake that information at a fidelity not-possible in real-time. Because the map only handles self occlusion, it can still work perfectly well with lumen’s other tracing methods if used in an intelligent way. Better quality, and cheaper.

Ok, regarding to all this, there’s is any solution for this?

AFAIK there are three options:

  1. Lumen but without proper AO
  2. Proper AO but without Lumen
  3. Lumen but with baked AO (per-object)

Is there a tutorial for the 3rd option?

I’d argue most of the “AO” seen in the base colors is mostly emulating where grime builds up on building surfaces overtime. If you look at photo references of half power washed city buildings, grime accumulates where AO would darken anyway. The treatment of the base color textures also suggests grime more so than overlayed AO. Although in some places it looks like a lazy AO mask controlling the darkening than hand crafted dirt and grime. Although it’s a valid perspective to think the reason the base textures were treated this way was to add more of an AO look and detail to those areas.


1 Like

There is nothing to argue about. AO is a versatile mask and EG used it to ‘hit multiple targets with one stone’. In this case they used for dirt, which was conveniently placed exactly where the ‘proper’ AO should’ve been.

The first step to solve any problem is to acknowledge that there is a problem.

I’m afraid that might simply be down to whatever you’re using to construct your mesh; to my knowledge UE has no in-engine AO baker.

This is impressive reference, it does provide good insight into how AO can be used as an effective mask for other FX.

Engine support ao baking, check this How to Bake Ambient Occlusion in Unreal Engine 5 - YouTube

1 Like

Another option is force ssao pass with lumen, r.lumen.diffuseindirect.ssao 1 and r.lumen.screenprobegather.screenspacebentnormal 0.

2 Likes

Thank you for making me smarter @jahjah771 , I appreciate it.

1 Like

any tutorial fixing this?

@andresmedia I think this will answer your question if it’s still about baking AO.

Thats awesome @jahjah771 ! Working great on 5.1. Thanks.
But I advice, in 5.3 (github release) its not working.

1 Like