Z-Depth problem with transulent material

This is an odd problem that may have been around for a while, but I just noticed it. When one of my characters passes in front of another, if the the hair of one is in front of the other, then the z-depth doesn’t seem to sort properly.

76781-weird+z-depth+problem1.jpg

Here you can see that when the hair bun of the front character is not over the hair of the rear character, the problem goes away.

76782-weird+z-depth+problem+2.jpg

They are set up the same:

Hey ,

Within the ‘Translucency’ section of your material, set the ‘Lighting Mode’ to ‘Volumetric Directional’. Use the image below as reference.

77025-volumetricdirectional.png

Since this is being applied to hair, you will also benefit from checking the ‘Responsive AA’

The main thing you will want to be changing however is the ‘Translucency Sorting Priority’ of your characters hair mesh.

This can be found in the ‘Rendering’ section in the details tab of your characters mesh. Depending on whether or not the hair is part of its own object or part of the skeleton I am not sure.

Translucent objects with a lower sort priority draw behind objects with a higher priority. Translucent objects with the same priority are rendered from back-to-front based on their bounds origin.

Ignored if the object is not translucent. The default priority is zero. Warning: This should never be set to a non-default value unless you know what you are doing, as it will prevent the renderer from sorting correctly. It is especially problematic on dynamic gameplay effects.

Below is an example of how two translucent objects can be sorted in view based on their priority.

Sort Priority of 0

Sort Priority of 1

Here you can see the clear difference when a translucent object with a higher priority is drawn behind another another translucent object with a low priority or none.

Let me know if this was helpful or if you have further questions.

Cheers,

Hi, anyone know how to fix this in newer UE4 builds? That “separate translucency” option is missing now in 19.2 so I’m not sure how to fix this z fighting issue.