Mesh distancefields, that nightmare.

Hello everyone,

I want to combine baked GI with DFAO. The first part is working very well but the second… not at all.

As you can see it’s totally unusable. It looks really bad and with the “r.AOGlobalDistanceField 0” command it becomes 5 times more expensive (and also way too dark).

My meshes are uniform (except the roof, wich is the base cube stretched and surprisingly this is the one working the best here…)

And because it’s not enough there is a weird ghost trail behind the character :

I want to mention that there is no motion blur and the AA is set to low.

I’m using the 4.21 version with a gtx 1080.

The result might be very good if it worked correctly so any idea on how to fix this please ? :slight_smile:

Is there any chance you are using temporal AA (that would account for the character artifacts)? For the wall, have you played with “Distance Field Resolution Scale” under the build settings in the mesh editor? I remember getting similar artifacts when I used Unreal’s built in cube mesh, using my own and playing with the resolution scale fixed it.

I’m using the default AA but in low which makes it inexistant (i think). I will set it to a true 0 and see if it makes any change.

Except for the Roof but the other meshes are custom made with an actual resolution of 0.5. I also tried with 3 but it makes no difference.

your meshes are uniform, but what’s their actor scale anyway?

I think you mean how stretched they are ? If yes then they are at 1:1:1.

yeah that’s what I meant. those issues are common when the actors are scaled, but sadly it’s not the case here

Are you using compressed distance fields and/or 8bit distance fields?

Also, check Override Self-Shadow Bias and try adjusting the Distance Field Self-Shadow Bias on those static meshes.

So i just tried with “r.DefaultFeature.AntiAliasing 0” and the problem is still here.

I was using compressed distancefields. After unticking it the result is still the same.

I tried with 0, 1, 10 and nothing changed.

The ugly DFAO is now gone ! It was the strecthed roof that caused weird AO (whereas it was clean on itself). Even with 8 bit and compress distancefields the DFAO is clean.

I remade the roof thanks to you :slight_smile:

The traces are still here tho :frowning: any idea on how to fix it please ?