Lighting problem. Caused by distance field AO?

Hey, thanks for checking out my thread.

I’m having a few problems with the lighting in my level.

I’m using completely dynamic lighting + distance field AO.

Dependant on the current location of the character and the view direction, the shadows ubruptly change between a darker/brighter tone.

  • For some reason whenever I equip a torch, the shadows are constant no matter where I look.

brighter

darker

On the screens it’s not that noticeable, ingame though it is extremely irritating.

It seems to be caused by distance field AO. When I disable “Allow Mesh Distance Field Representation” and restart the editor, it’s not present anymore. Also it started appearing when I first enabled Distance Field AO. Unfortunately I don’t even have the slightest idea how to fix it :confused: maybe you know? Thank you in advance!

Another problem I’m having with my lighting is the following (This one is solved):

7d58dcdd95.jpg

The lighting between the tiles is cut off.

This happens both with static and dynamic lighting, on every map including the example-maps, and with the example walls. I’m having this problem since the release of UE4. I remember having read a thread about it where somebody had the same problem some days after release, and someone replied, that Epic is working on it. Since then I haven’t found any updates about it - still having the problem though, which decreases the quality of my scene pretty drastically. Are there any news about this?

Thank you for reading :slight_smile:

EDIT: And here a video, on the screens it is indeed very hard to see:

I can barely tell the difference between the top two shots. You said it’s the shadows that flicker, do they all flicker together, like the whole screen getting brighter and darker? That is not something I have seen before.

On the bottom, what lighting setup is that? Is the light a stationary light or Movable? It looks to me like your normal is rounded which causes the N dot L of diffuse lighting to create that gradient. For those modular pieces to fit next to each other with dynamic lighting, the normal needs to be flat. Use the GBuffer overview mode instead of Lit to look at the normals.

btw a bunch of improvements have been made to Distance Field AO that will be in 1.5, especially with animating foliage. However I don’t have confidence that it fixed the issue you are seeing as I don’t understand it yet.

Thank you for taking the time :slight_smile:

Yes, all of the shadows change at the same time.

It’s a movable directional light and a movable skylight.

I think I found the reason for the bad tiling. It seems to be blender’s smooth shading. When I set it to flat and export, the tiling is fine. Do you know how I can have smooth objects and still nice tiling?

You should learn about vertex normals and flat vs smooth shading in blender, because you’re going to run into this problem again and again if you don’t understand why it happens in the first place. To fix the tiling you can use an edge split modifier on the mesh, turn off edge angle and turn on marked sharp. Then go into your mesh and select edges you want to have sharp lighting (i.e, the borders between your tiles), make sure you have apply modifiers checked in the export options.

Thank you very much. That’s how I can fix it. But I will look into normals and Blender’s smooth shading, you are right.

Any ideas about my first problem? :slight_smile:

Bump.

I can’t find a solution myself for this, and it is pretty annoying :confused:

To be honest i cant see any difference between those two screenshots. It could help us see the problem better if you can record a video. Also try deleting the light source and create a new one.

Here you go - YouTube
I hope this makes it a little easier to spot. The quality isn’t perfect, but I think it’s enough to see what I mean.

Deleting the skylight or setting it to anything other than movable fixes it, which confirmes to me, that it’s caused by DFAO. Deleting the directional light doesn’t make a difference.

Oh, now i see. I havent even been able to use DFAO since it came out because it crashes the computer for me. But as far as i know it doesnt work with Landscape and doesnt work well with foliage yet so it’s quite likely caused by DFAO.

Thanks for the video. I’d guess it’s coming from some mesh that wasn’t handled nicely. Try Show->Visualize->Distance Field AO and anything that is black had a bad distance field generated (mesh backfaces were facing outward and without a two-sided material on those faces).

I can’t really tell if DFAO is doing anything in your scene other than the artifact, is it?

Btw I am aware of DFAO crashing GPU’s but haven’t been able to track it down yet =( It mostly happens on AMD for me, and kindof randomly which makes it hard to figure out.

Actually DFAO works pretty well. But I disabled it on the objects I used for foliage, since it 1. caused some weird artifacts and 2. had a heavy FPS-cost. That’s why you can’t see it in the video. Apart from that, there was only one object, DFAO had trouble with, and for this I already disabled it. Apart of those that I disabled myself and the landscape, everything is white.

EDIT: I just noticed something weird. When I do show->Visualize->Visualize Distance Field AO, the problem is still there. But instead of making everything brighter, it just disables the visualization of DFAO and the screen has color again and everything. This only happens to the DFAO-visualization. Not to any of the others.

Thanks for the info, . I had reported it when it was still in preview built here and it’s been crashing just like Sean describes there. Pretty disappointing really. :\ But at least now i know that it’s not easy to fix so i can forget about it.

Any updates on this? Is it actually a bug, and if so, will there be a fix anytime soon?

I don’t have enough info yet, since I can’t reproduce it. Does it happen in a small test level with the feature enabled? If you can send me the smallest possible map that reproduces it, I can probably track it down.

Alright. Here we go.

I can’t attach it, directly (“Invalid file”), so I uploaded it to mediafire. I hope you are fine with this.

http://www.mediafire.com/download/qlvvoyv1v9j34m4/LightIssueReproduce.umap

Some notes, that might be interesting:

  • Whenever I am close to a static mesh (There seems to actually be some sort of invisible sphere around the meshes. Foliage doesn’t count) the Shadows are darker, else they are brighter. The mesh has to be within the camerea-view.

  • Deleting every static mesh results in everything being brighter.

I hope this helps.

Is it possible for anyone to reproduce the issue on the map?

Here’s what I get on an AMD 6870 Catalyst version 14.4
(I moved the chair down a bit + lighting only)

temp.jpg

It must be something specific to your video card and driver version. DFAO is an early feature with a lot of complex passes so I’m not surprised.

What video card and driver version are you on? dxdiag works too.

Have you tried moving away from the chair (With normal lighting)? DFAO works fine for me too on the scene and everything like I described

This applies to the chair on the map I uploaded.

I’m using a NVIDIA GeForce 680. I now use the latest driver and the problem persists (340.52).

Thanks for investigating this :slight_smile:

Yes, I flew all around and never got any artifacts. A bunch of artists here are going to start using DFAO soon, so hopefully I’ll get better repros on these video card specific artifacts and be able to track it down.

btw I appreciate your efforts, thanks