Ambient Occlusion output problem with shadowing

Ambient Occlusion effect is hardly visible when enabling lights cast shadows.
How can I avoid this and get shadows and normal AO results at the same time?

Tried to figure this problem within native code but couldn’t find a fix.

below is a screenshot with shadow disabled. AO is visible.

with shadow enabled. box mesh gets shadow from CSM while AO on face mesh and box mesh goes really weak

Hi STEIN84,

The amount of AO may appear to be “weak,” but it is the same for both, so long as you’ve not adjusted anything between the two images with the post process settings.

You can use the view mode > Buffer Visualizations > Ambient Occlusion to look at only the AO in the scene without any other lighting influences to see that they are the same.

Here is an example I set up similarly to yours.

In this I’ve got the first two images are with lighting and the boxes on the left casting shadow and then disable shadow casting. The final two are the AO for both with shadow cast enabled and disabled which show the same result.

25404-output_filxmr.gif

You can always adjust the settings for the AO directly in your Post Process volume details panel settings. Try tweaking these settings until you get a result you’re happy with.

Thank you!

Tim

Hi Tim. Thanks for the answer but I think I didn’t explain about the problem well.

  1. The difference occurs when I enable / disable the light source cast shadow option, not static meshes

  2. I’ve checked the AO buffer with visualizetexture console command and it was fine in both states so I thought it has something to do with the scene color blending or other processes.

  3. Found this issue in 4.4 QA but the screenshots above were taken in 4.7 preview version editor (didn’t modify anything / results are all the same)

  4. Environment : default empty map /
    unbound postprocess volume with AO amount 1.0 /
    the only difference between two is LightSource(directional light) casts shadow or not.

25605-disabled.png

25606-enabled.png

The difference is too significant to assume it as just getting weak.
Thanks for the help :slight_smile:

Hi STEIN,

This all appears to be the intended functionality. I checked in 4.5-our latest internal build with all the same results. The DFAO that can be visualized via the DFAO visualize setting in the viewport show flags does not show any change whether the light source is casting shadows or not.

In the normal lit view when shadows are disabled the ambient occlusion is able to not be washed out by the light source.

Thank you!

Tim

I was wondering if it’s intended behavior. Thank you Tim.