Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

SSAO messes with normal maps

I noticed this issue already in 4.8.0 hoping it would be fixed in 4.8.1 but it isn't.

The SSAO is for some weird reason doing something on normal maps, it darkens it somehow and it blends in and out based on distance:

alt text

Here it is with SSAO off:

alt text

This is on a landscape but it also happens on regular meshes.

Also, this SSAO glitch is still not fixed, maybe it is related: https://answers.unrealengine.com/questions/244646/ssao-wave-wobbling-glitch.html

Product Version: UE 4.8
wersdfsd.gif (4.0 MB)
more ▼

asked Jun 26 '15 at 12:30 PM in Bug Reports

avatar image

950 105 150 202

avatar image Lovecraft_K ♦♦ STAFF Jun 26 '15 at 07:10 PM

Hi Davision -

The behavior you are showing is expected. SSAO will start to fill in more information from the normal map as you get closer to the object. You can (and should) adjust the Ambient Occlusion settings in the Post Process Volume (or Camera) to give the smooth transition that you are looking for as well as control the intensity of AO based on the normal map.

Thank You

Eric Ketchum

avatar image Davision Jun 29 '15 at 01:32 PM

How can that be intended? I mean it doesn't look like Ambient Occlusion, it looks just like dirty darken a certain direction of the normal map.

I tried playing around with the settings but nothing lets me "control the intensity of AO based on the normal map." The fading in and out also remains very obvious no matter the distance values. Is there any setting that just lets me turn off this normal map darkening by SSAO?

avatar image AndrewHurley Jul 06 '15 at 03:28 PM

Hey Davision,

In order to control the SSAO, you need to edit the settings within your post process volume. The individual settings within the Ambient Occlusion of your post process volume are explained in the documentation below.

Ambient Occlusion



alt text

Use these settings to find your desired Ambient Occlusion.

ssao.png (42.8 kB)
avatar image Davision Jul 08 '15 at 03:49 PM

I tried all those settings, there is nothing that lets me get rid of the normal map darkening by SSAO behaviour. Even when changing the fade to something very smooth it remains very obvious. Both issues make SSAO look really bad in my opinion.

avatar image AndrewHurley Jul 09 '15 at 06:09 PM

Are you using an Ambient Occlusion texture sample for the material?

As Eric mentioned this behavior is expected as you get closer to the object. There are settings within the 'World Settings' tab that you can change to disable ambient occlusion relating to Lightmass. There are also settings within the 'Project Settings' tab to allow you to turn off your ambient occlusion.

Double-check to make sure you aren't applying ambient occlusion in multiple places. There are settings within 'Skylight' actors that also allow for ambient occlusion. This deals with Distance Field AO in case you were using dynamic lighting and distance fields.

avatar image Davision Jul 10 '15 at 11:45 AM

There is another issue, the normal map SSAO darkening fades out earlier then usual mesh SSAO. Also, no matter how i change the fade out distance values the fade is always very long and starts from a really close distance.

I'm using a texture sample AO in my post processing but I always check with the post processing material off since that fx is pretty heavy.

The Distance Field AO in my skylight is greyed out so that should be off.

I found a way now to turn off the normal darking AO: In PostProcessAmbientOcclusion.usf in the shader folder: Line 32, change this to 0: #define SSAO_NORMAL_AFFECTED 0 But the fading is then even more extreme with the mesh AO which might be because it is wip as it says in the comment: // 0:does not use normals (slightly faster, lower quality, WIP = not finished), 1: uses normals (slower but higher quality)

The worst of all issues is this anyway and even though it was mentioned before it got fixed it isn't so in 4.81: https://answers.unrealengine.com/questions/244646/ssao-wave-wobbling-glitch.html I would appreciate any update you can give me on that issue as well.

Looking at all these issues is there any chance we can get the good old SSAO of UE3 in UE4? I shipped a game with that and using SSAO heavily with it and had no problems. Maybe it would be really easy to get that code over and it could be then a alternative that the user can set.

avatar image AndrewHurley Jul 10 '15 at 05:49 PM

The other issue you are mentioning is directly related to the WIP, so that will continue to be improved upon. The issue you linked that Eric assisted you with has also been fixed internally, and should make it into 4.9. I say 'should' because there is no guarantee as the bugs that are integrated are based on priority which is determined by their importance by our developers.

Since there are multiple ways to implement Ambient Occlusion, more so than there were in UE3, we will most likely not be stepping backwards; however, this does not mean we are not trying hard to improve the AO implementations we have in place currently.


Andrew Hurley

avatar image Slavq Jul 10 '15 at 11:54 PM

I have the same problem, besides mine is even darker (probably because stronger normal map) and it looks really bad... Is it possible to prevent (through editor, i don't have C++ project) AO from affecting normal maps? If not, i will have to totally disable AO :(

avatar image Davision Jul 14 '15 at 06:01 PM

Actually it is just a shader file of the editor that you can simply edit with a texteditor, this is the path: UE4\Unreal Engine\4.8\Engine\Shaders\PostProcessAmbientOcclusion.usf

avatar image AndrewHurley Jul 12 '15 at 03:54 PM

Try unchecking this option within your 'Projects Settings'

alt text

avatar image Slavq Jul 12 '15 at 04:35 PM

Thanks, but this actually turns off this non-problematic part of AO (mostly around/below meshes) and it doesn't change AO appearance on normal maps. Only totally disabling AO fixes the dark shadows on normal maps. So... Something like an inverse of this checkbox function would fix that (disable normal map AO, but leave the bigger shadows on ground around meshes)

avatar image Adam.Williams Apr 16 '19 at 01:19 PM

I see this thread has been dead for years, but i'm seeing this problem, too. Exactly the same thing :(

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Is you project using baked lighting, or is it fully dynamic?

If it is dynamic you can use a different AO method (the one I like to use with outdoor scenes) called Distance Field Ambient Occlusion. You will need to do some small preliminary set up, but it is a great new feature and provide accurate and performant results.

Distance Field Ambient Occlusion



Andrew Hurley

more ▼

answered Jul 13 '15 at 03:36 PM

avatar image Slavq Jul 13 '15 at 04:42 PM

My project uses baked lighting (with stationary light), but I'll consider switching to DFAO. Sadly it costs 3x+ more than SSAO, but it definitely looks better. Well, I'll play around with this one and test it's performance hit... Thanks for the hint :)

avatar image AndrewHurley Jul 13 '15 at 05:04 PM

You can definitely still use it with Stationary lights! I would also take a look at the Skylight actor and it's distance field ambient occlusion as well. One of my test beds are set up to have one dominant directional light as well as a skylight actor. I use the Ambient Occlusion within the Skylight actor as this is the ambient fill light for my outdoor scene. You can control it's intensity directly which can yield some great results!

avatar image Davision Jul 14 '15 at 06:04 PM

While DFAO is interesting I prefer SSAO since performance is better and I like to use it as another stylization effect on top that I could easily adjust. I'm aiming for a painterly look and not realistic. Well, I just wait for the improved fixed SSAO.

avatar image AndrewHurley Jul 14 '15 at 08:32 PM

Hey Davision,

I did some further investigation and reading in our documentation and discovered some settings that could be causing part of the issue. Like with all sliders, you will want to have the correct values relative to your project, but take a look at the documentation below as well as the image where I have highlighted some options within the 'World Settings' tab.

This will only apply if you are using Ambient Occlusion with lightmass (baked lighting and shadows), but hopefully are able to find some pertinent information within the documentation.


World Settings - Lightmass

alt text

Let me know if these were helpful.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question