Exponential Height Fog and Metahumans: how to solve hair and eyes artifacts?

Hi!

Getting crazy trying to solve this; after a myriad of attempts tweaking parameters here and there had no success.

I’m having issues with a Metahuman hair and eyes when using Environment Height Fog.

Hair (left: exponential heigh fog ON, notice it looks like they’re reflecting light; putting roughness at 1 and speculars at 0 didn’t change anything; right: exponential heigh fog OFF):

Eyes (exponential fog where they look bright and as if the iris was missing, on the left):

Worthwhile to mention the metahuman sits directly under a spotlight in both cases.

If anybody has a solution for this, or can just address me in a right direction to improve things… I’d be extremely grateful.

Cheers,

f

3 Likes

We’ve run into this too.

The issue is the occlusion material, it has “Apply Fogging” enabled, but it blurs and darkens whatever is behind it, which already had fog applied to it, so you end up with twice the amount of fog.

Depending on your scene simply disabling “Apply Fogging” from the Occlusion base material could make it look better, though most times it will simply look like the occlusion is placed on top of the fog, which is weird in its own way.

The proper solution for this would be to not apply fog to the eye itself, but that would require an engine change since you can’t disable fog on Opaque materials.

Alternatively, and what we did, is to make the occlusion material Opacity a parameter instead of a fixed value and allow it to be controlled in the sequencer so we can tweak it for whatever scenes need it. You could also do some logic to control it, based on distance to camera and other factors, but the simple control was enough for our use cases.

3 Likes

Hi @Code351 , first of all, thanks a lot for your answer!

I’ve indeed found a translucent “eye_occlusion” material, and disabling “Apply Fogging” does the trick. Half problem solved!

The other half is, the hair: hair materials are not translucent, so you can’t really disable the “Apply Fogging” option, which is grayed out for them. Any lead / hint on how to solve the hair issue?

Thanks in advance,

f

2 Likes

please~What can solve this problem

In our case, we animate the fog density, but it’s a antique problem, when any one on Epic can solve this? :sob:
!::: Screenshot_1|690x177

1 Like

We found a palliative solution for the eyes to continue using the Foggy flag leaving the eyes better integrated.

The main problem is the Unlit mode of the material, so we change it to Default lit and then,
controlled the opacity to still have a pseudo-occlusion effect without mess with the fog.

Here is a step to step to fix it out in the master material:

Our results before the fix:

After the fix:

Hope this could be useful!

4 Likes

Great fix, thank you @rbaralti !

1 Like

Thanks for posting @rbaralti - your fix works great!

For the eye shading, it is possible to split the eye occlusion material into two materials that apply the “Blur” part and the “Shadow” part of the Eye Occlusion individually. The “Blur” material (which reads back from the scene with fog already applied) can then be set to not apply fog, the shadow part (which can be implemented using a Modulate blend mode) can be set to still apply fog so that it responds correctly.

I had better results using this method, a good workaround,

Thank you, it helped. UE5.4 has already been released, but the problem is still there, you have to solve it manually

Christ what a bunch of stupid ■■■■, really. How is this still possible in version 5.4?