Why does enabling DFAO create shadowy afterimages around my character?

My exterior lighting solution currently involves nothing but a movable skylight, movable directional light, sky sphere, and a sphere reflection capture. It mostly looks fine, but whenever the skylight’s shadows are enabled I notice a bunch of artifacting around any moving character. It looks a lot like the glitchy motion blur TemporalAA sometimes causes, but the blur is all black and shadowy. Disabling skylight shadows or turning DFAO off entirely gets rid of the effect, but that’s not an acceptable solution since I’m trying to power my entire project with GI. I’ve tried systematically enabling and disabling almost everything that isn’t DFAO in the hopes that it’s an unfortunate interaction between systems, but as far as I can tell it’s linked directly to DFAO; has anyone else experienced and dealt with this?

I can’t get a gif showing this in motion, since the compression tends to hide the blur, but I took a screenshot:

The character is walking right-left, and all of the shadow behind their character’s upper body is undesired and linked to the presence of DFAO. The blur behaves a lot like AA glitches, where it’s strongest when there’s a strong color contrast and the character moves quickly.

Does it still appear when you change the aa to off or FXAA? I suspect it’s the Temporal AA.

That’s a good thought- I already tried changing it from temporal to FXAA with no effect, after you suggested it I also tried MSAA and no AA at all, but all four settings result in the same blurriness behind you.

Edited to add: on a lark, I also tried flooding the area with point lights and turning them up to ludicrous intensities. The more intense the interior lighting the less pronounced the effect gets, if I completely wash out the player’s surroundings (7 point lights each set to 50k intensity) the streaks disappear entirely.

I have the same problem. But I don’t want to flood the whole Map with lights -.-

DFAO is amortized over several frames (much like temporal anti-aliasing – minus the jitter, in this case). The current UE4 implementation has a fair bit of ghosting, but it’s still ages beyond a former implementation that Epic tried.

Raildex, do you also have weird, kinda splotchy/shiny shadow artifacting in darker areas? That’s another issue I’ve noticed linked to DFAO being on, and I’m trying to figure out if they’re linked or completely unrelated.

ETA: I just made a brand-new 4.14 project and reproduced my level set up (walls/floors/ceiling, movable directional + skylight, reflection capture) and it doesn’t show any of the weird shadow distortions and ghosting I’m discussing, so it must be linked to something weird I’m doing in my main project; it started out in 4.6 and has been updated since then, there’s no way something from the legacy system could’ve been carried over to cause the shadow issues, right?

Hmm, I spent the afternoon painstakingly re-creating my project in a brand-new 4.14 project and importing everything over, and apparently the blurriness is something I’m doing wrong, not a legacy issue; once all of my assets were in place, the same kind of artifacting popped up; left-hand side is with skylight shadows on, right is shadows off:

458f2bb83b302f28ad2db86d8fae60d046b17fce.jpeg

What does the ‘Mesh Distance Fields’ view look like under View->Visualize?

Good question; I took three quick screenshots; the only lighting in the scene is a movable directional light and movable skylight (whose shadows seem to be the root of the problem):

No visualization, here’s how it looks during gameplay:

Mesh distance fields visualized:

DFAO visualized:

Edited to add: I think I must be doing something very trivial wrong, because it’s quite easy to reproduce this in a new project. If it’s at all helpful, I can consistently reproduce this sort of artifacting in about 2 minutes:

  1. Create a new Blueprint project in UE 4.14, using the Third Person template (no C++).
  2. Go to project settings>rendering, turn “Generate mesh distance fields” on and restart project
  3. In the ThirdPersonExampleMap that the project comes with, locate the directional light (named Light Source) and skylight (SkyLight), and change both lights from Stationary to Movable.
  4. Duplicate the floor mesh and drag it up to serve as an ad-hoc ceiling (since shadows and dark spaces display the most artifacting).
  5. Play and look at the shadows; mine artifact horribly

You’re not alone, I get the same visual garbage.

Ooh, thank you for trying to repro it! I’m still half-convinced that I’m just missing a core step not mentioned anywhere in A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums , but it’s really reassuring to hear that I’m not the only system/user who’s seeing this.

I think your meshes are too thin for DFAO. Try making the meshes thicker or increasing the DistanceFieldResolutionScale of the assets to something like 3. Make sure the meshes are closed as well.

Hmm thanks, I’ll try re-fabricating a few assets and see if it clears up… is there a rule of thumb I’m unaware of for determining geometry thickness/scale, or is it just scale up until it stops behaving oddly? :slight_smile:

About 3x times thicker should be good from what I’ve seen. Try to keep walls about a foot or 30cm thick to be safe, and see if that works.

Alright, thank you for the recommendation :slight_smile:

I dont want to necro a thread, but my thread generated 0 traffic, I got all of this to work without a landscape on top of the meshes, I am making a cave and when the landscape goes above the rocks and such it creates a ranodm square. Any way around this?