Ambient occlusion problem

I’d like to have access to certain ambient occlusion shadow data while still having a directional light source, that casts shadows.

So two things;

  1. I want to keep ambient occlusion dark areas

  2. I want to keep direction lighting, and the shadows it casts.

How do I do this?

Multiply base color by ambient occlusion in your materials.

This does break principles of PBR though.

Exactly, I wanted it to be friendly still with physical based rendering, I was hoping instead of telling light to work in a way it can’t in our day to day universe, I could have the two working side by side, occlusion just being hinted, I.E, gaps between timber.

So, how the post process AO decides where areas will be dark, is where I want my objects to be dark, can’t do that unless I manually bake an AO map for an object in zbrush or something.

You can make a post process material and assign it into blendables section of post processing volume. Post process material itself, should contain two SceneTexture nodes, one is set to PostProcessInput0, and the other one to Ambient Occlusion. You multiply output of these nodes and plug it in Emissive Color slot of your post process material.

1 Like

I did this, but there was crazy flickering all over, couldn’t stand it.

Any updates? I need help!

Screenspace AO is not good enough quality to use for direct lighting.

Guys from “Naughty dog” called this feature Micro Shadows - http://www.advances.realtimerendering.com/other/2016/naughty_dog/NaughtyDog_TechArt_Final.pptx (page 28-40). They’ve revealed some tech info about it, but I’m not sure if it’s usable in UE4.

UE4 has contact shadows that use screenspace depth for direct shadowing. It’s crucial that these shadows are min blended to shadow maps and shatic shadowing. This can’t be done on post process level.

Contact shadows works with geometry and not very useful with shadowing of cracks on single low poly mesh

So where that ambient occlusion data come from? If it’s baked then just multiple albedo and specular with it and done.

Atleast in my opinion, there’s a difference between mesh AO, and material AO. I want something like contact shadows, material AO isn’t at all what I’m looking for.

Material AO blocks baked static indirect light. AO(ssao or dfao) block static(if enabled) and dynamic indirect light. In most case you don’t have any source of dynamic indirect light.(no dynamic GI). In this case there is no difference at all.
What is problem with contact shadows?