NO Ambient Occlusion WHY?

It seems to be a pain in the *** for me to get the AO to work. I have the editor maxed out and have read all the docs about it but I can’t get it to show In my pawn camera.

Here I composed in photoshop how I would like it to look (using Buffer visualization ) and how it actually looks like ( the object has baked AOmap of its own )

AO.gif

so my question is how to enable AO for my pawn’s camera without volumes.

Hi Midnight640,

To enable AO you’ll have to use a post process volume. You can adjust it’s settings in there. You look at these setting changes within the editor by changing the visualization options. If you go to the drop down menu in the editor that says “Lit” you’ll go down to “buffer visualization” then select “Ambient Occlusion.”

Alternatively you could use the baked AO you have in your material.

Thanks!

Tim

OK I just tried that I managed to get a lot of cool effects in PP volume BUT even in PPV when I set the mode to LIT there is no AO , when I play the game there is no AO , I am running 4.1.1

PS : I haven’t played with it enough but bokeh DOF seems to be working in inverse mode the things that are far away are in focus and the things that are closer are blurred.

PS 2 : when i open other projects there is AO even without a post process volume.

Have you checked visualization options as Tim suggested?

And you need to tweak a couple of values in DoF post process settings order to get what you like. Check out the documentation for more information.

If by checked visualization options you mean this

then YES but as you can see there is still NO AO when I am in LIT or I am playing.

<-the AO of the frame

I checked the BP communications and realistic rendering demos and there is AO in The viewport when LIT and when playing .

I don’t know whats the problem I started from empty project.

I’ve tried to compile some images that may help better explain this and get you what you’re looking for.

With AO I can tell you that without adjusting the settings in the post process you’re not going to get what you are looking for. With the post process and the AO intensity checked it will generate AO. The problem you’re having is you want to be able to see it more clearly. This doesn’t happen in this way because the directional light in your scene is doing what it does and provides light. AO is meant for corners and things where shadow would reflect between two points coming together. With the directional light in the scene it doesn’t really allow this.

To better illustrate, there are three images to show the difference.

The first is no post process or AO. We have a room where ambient occlusion would happen with the shadowing in the corners and a single point light to generate our light.
The second image is the post process with AO checked. No other check boxes have been adjusted. You will see that AO is being generated.
The third image is to show how much Directional lights will affect AO just like in real life. There is some ambient occlusion but not to the effect that it was when it was a sealed room

In the final image. I highlighted the areas that will most effectively give you a darker ambient occlusion. The ones checked are the ones working in the image. The mip blend/scale will further accentuate the shadowing.

I hope this helps explain what you were seeing a little bit better. If you need further help just reply and I’ll do what I can to assist you.

Thanks!

Tim

1 Like

OK , the AO works fine in my project , the problem I had (still have ) is that if I don’t bake the lights my shadows are so dark that I can’t see the AO in them .

When baked the GI bounces make the surface that is shadowed not black and I can see the AO. In my project I cant use Baked lights. I use only movable lights. In UE3 I simulated GI with a point light that had no shadow.
UE4 is emulating natural light so when you light a surface there are no shadows also no AO - OK.

BUT when I am Lighting the surface to simulate GI I need the AO back. I tried to almost every option for point light (without light function maybe a 50% dimming will trigger AO , have to try it ) and I can’t get the result you have with your, by the looks of it, static point light. The problem can be solved by:
A changing the opacity of the shadows
B making a “Affect AO” bool exposed in editor

Thanks Tim
I will post if I have any luck ! Also I tried all of your AO settings :slight_smile: but no luck for now

Hey man,

so just to clear some things up…How do you light your scene and how is the scene built? (Do you need indoor outdoor transitions or not, do you use the movable directional light?)

Because the thing is this: AO in UE4 gets only applied to indirect lighting. So if you fake GI with point lights, its again direct light so the AO gets masked off in those areas = its not visible. UE3 did not have that functionality, so faking GI with point lights was easy.

What you need to do (and that is why I asked how your lighting setup is) is to fake it with image based lighting. The thing important to know here is: are you using the flag “force no precomputed lighting”? If yes, you can only use the ambient cubemap in the post volume and this one doesnt have lower hemisphere shadowing nor sky occlusion (which means interiors inside of buildings, caves etc. will receive the full indirect light amount from the cubemap)

If you dont use it, you can still use the skylight in a semi dynamic mode (place it but dont bake it) and you will get at least the lower hemisphere shadowing, which makes it look better that the AC from the post volume, but you will still not get nice sky occlusion.

If you only do outdoorscenes right now…it doenst matter. However, as soon as you have interiors, the lighting there gets pretty much destroyed by the IBL, becaus most of the time you will use something bluish, because of the sky and so on^^…and then your interiors will be filled with blue bounce light from the sky, which looks very ugly^^

So yeah…if you go fully dynamic, just use the Ambient Cubemap/skylight to brighten the shadows with fake bounce light from an image (just import one of the many free HDRi images from the web) and you will have full AO that you will definitely see^^

Ah and BTW…try out the LPVs. There is still alot of stuff missing right now (no sky lighting, no reflection support and a lot of other things) but its a good start to test out and it makes fully dynamic GI from the Directional Light (point and spot will be added later)

Hope that helps and cheers! :slight_smile:

YESSSSSSSS progress.

Ok I will know what to say for next time. My scene is indoor with no directional lights, only point and spot lights. I had forced no precomputed lighting. aaaaaaaaamd ambient cubemap did wonders to fake GI for me .

Thanks!

I have the same problem…

This is the AO:

This is the scene in unlit:

And this is the scene in lit with one directional light (sun):

Why is there not simple bool to tick so that the AO does not get removed if light from a directional light is received? It would look a lot better with AO there… :frowning:

It’s more realistic and better looking to not have AO in direct light. UE4 is designed to be physically accurate by default. Here’s a great example of why AO isn’t applied on top of everything.

Thanks, your picture is a really nice explanation.
But I would like to have it not so physically accurate because it just does not look good, or would you say the transition between wall and ground looks good in the lit screenshot? With no AO at all the “connection” between an object and the ground is just missing. It looks like the object is floating.

A better fix would be some GI, trim pieces, vertex painting, or some decals and set dressing. Some people try to use AO as a substitute for grime and dirt, but your much better off just putting that into the textures. The AO version of that wall does not look any better than the lack of AO version.

The AO version is unlit, and nothing looks good unlit.
I am already using dirt decals on my buildings, but they wont work for the walls.
How does GI help me here? I have already used DFGI and Heightfield GI in the scene (not in the screenshot) but of course it has no big effect in areas which are fully receiving light directly from a light source, and GI does not change anything regarding the transition between object and ground.
Just changing the material of the wall wont help because I need something to affect wall and ground at the same time. AO works really well in the shadowed side of the wall which only receives light from DFGI and Heightfield GI.

Light being bounced off one object to another gets rid of that disconnected floating mesh look, it doesn’t affect the transition point much, but the important part is the surfaces being grounded.

What looks better?

Skylight. You need one for AO to work properly. Especially if you’re using DFAO.

Another option is to add some more topology to your wall mesh and paint the dirt manually with mesh paint tools.

The left one looks better, because it looks as if the wall would be inside of the ground a bit. So I could add dirt on the wall, but then I would have to check for ground every time and select which material I have to add to the wall because I not only have dirt in my game but a lot of other grounds. So this might work, but it would be a lot of work.

I have a skylight, without a skylight there is no AO at all as far as I know.

I add all the walls etc while the game runs and I don’t think I can access mesh paint tools then, right? What do you mean with topology?