Ambient occlusion node in material does nothing

Sticking a b/w texture channel into Ambient Occlusion node in a material shows nothing at all in the scene or the material editor - does it actually work at all? Am I using it wrong?

Hey Aten -

Yes, the AO Channel in the Material Editor is working though unless you have your model in the preview window it will not read very well. Since most AO maps are very subtle, a good test to see is to take your map and increase its contrast through a power node to say 5 or 6 (something were it is noticeable) and watch you asset in the level. Also the Material AO Channel will only impact static indirect lighting, lightmaps and will not affect ambient cubemap, for example. All of these changes were made based on the need to clear some memory in the GBuffer.

As far as the Buffer Visualization, I believe that the Material AO Channel no longer feeds into that visualization and ultimately may be removed in a future release of the engine, but I cannot confirm that as this is all very cutting edge engine work currently.

Thank You

Eric Ketchum

So how do we mask off indirect specular without the AO map in fully dynamic scenes IF we are NOT using DFAO?

Seems like quite a huge issue to me :frowning:

Hey Daedalus51 -

In a fully dynamic scene (meaning all lighting information is set to a mobility of movable), the AO of every object is generated by the lighting ray traces in the level and the indirect specular of objects in that level would be generated by taking the material settings (Metallic, Roughness and Ambient Occlusion) and having them be influenced by the indirect lighting contributions of a given light source. This is one of the main reason completely movable lighting is such a performance hit and why our engineers came up withe the much more performance friendly DFAO methodology. When I mentioned that it was going to be removed I meant the Material AO Buffer Visualization from the Editor not the AO slot contributions to your scene.

Thank You

Eric Ketchum

So if I have a movable directional light and a movable skylight with shadows turned off (so I dont get DFAO), the material AO would still work on the part of the mesh that gets only indirect lighting from the skylight (opposite direction to the directional light)?

From what I understood, material AO is always active on every mesh, but gets masked off were direct light hits the object. But sadly right now, no effect is visible from material AO (verified in 4.4.3) still have to test 4.5

Hey Daedalus51 -

“Masked Off” is strong words, but mostly accurate. The Direct Light will always favor the calculated AO over the Material AO slot for performance reasons. There is a work around though. Simply take you AO map and multiply it by your base color and plug it into the Base Color slot.

Thank You

Eric Ketchum

Okay… So I am fully aware of how these features work or should work (since we are working with UE4 for 2 years now^^, so I have quite some experience with the engine).

SSAO also gets masked away in direct light as well, so I am not sure why I would want to add it to the base color and break physical based rendering :wink:

My question is this: right now, when I turn off SSAO and just plug in a material AO, it “should” theoretically be fully visible in indirect light, which is not the case with dynamic lighting in 4.4.3. So I was wondering if its just broken or has been removed on purpose.

I have some images to illustrate this:

so in this image you can see I set the Material AO to be completely black.
This means that the object should be completely black in indirect light and the texture should only be visible in direct light.

The next screenshot shows you that this is clearly not working:

So yeah…I would just like to know whats up with this :wink: Will see, someone else in our company also asked something similar on the UDN, so there might as well be an update on it

PS: multiplying the AO texture with the Base Color does not provide indirect specular masking :wink:

Unfortunately material AO couldn’t fit in the gbuffer anymore. It is now multiplied with the lightmap, stationary sky light and reflection capture specular. Other dynamic indirect lighting such as ambient cube and movable sky is no longer affected. We may be able to correct that in the future but for now it was a trade off to get more shading models.

Ahhh…thanks a lot Brian! That was the answer I was looking for :slight_smile: (I mean…not really, but you know what I mean^^)

Yeah…I mean its not too bad when you can use DFAO, but right now it just has too many limitations with foliage, vertex animation and non uniformly scaled meshes (which is a reason for not using it atm, but lets see what the future brings^^)

Anyway…thanks for the official clarification on that. Very appreciated!

PS: will continue discussing this over at the UDN

Just curious why the AO feature would be removed, reduced or be on the table for removal ? When AO data conveys a huge amount of important visual data from ZBrush sculpts, especially for characters. This dramatically reduces the quality of a characters or creatures face for example. Forcing artists to bake this into the base color ? Sounds like a decision made by a programming person with little knowledge of how important AO is to the overall image of the artwork.

It was not removed as a feature, it was removed from Gbuffer in favor of tighter and more efficient packing and is now applied in a slightly different way.

If slightly different means invisible ? When I drag an AO map to the AO node nothing much happens. AO should instantly work, be visible, and reliable show up every time regardless of the scene’s lighting.

Hi Daedalus51, I just tried this in 4.19 and it worked, so I guess they’ve fixed that bug since your post.

I just tried it in 4.19 and it only works if the Skylight is set to Stationary. this means Material AO and DFAO are mutually exclusive :confused:

Material AO is stored in lightmaps, if you have static lighting enabled in the project settings.

If, however, static lighting is disabled, Material AO will affect movable skylights and what not.

Have you tried it in 4.19? I tested it and as I said, Material AO only worked if the Skylight is set to Stationary but not if set to Movable

Yes, it works in 4.19 with movable skylight.

hey Deathrey, still doesn’t work for me

both my directional light and my skylight are movable.

this is the AO in my Landscape material, there is no change at all if I modify this value.

this is how it looks. notice how the shadows cast onto the Landscape are all blueish from the skylight while AO should be making them dark.

… which is exactly what happens if I set my skylight to be stationary:

in this case changing the material AO param does make a difference. here’s how it looks if I change it to 0.5

as you can see the shadows got less dark now because the AO material param actually works. but if I set the skylight to movable again, this AO darkening is lost and it just goes full sky-lit again.

do you have something specific set up to make it work? it’s clear that the standard setup is not enough to get material AO with a movable skylight. I could use something more than “yes, it works” :wink:

The only specific thing is to disable static lighting.