Objects disappearing behind each other

I have a simple scene with a terrain mesh and some trees on it. For some reason, the terrain mesh is either appearing completely behind the trees or completely in front of them, depending on the view angle.

Here it is behind the trees (the roots should be hidden under the ground):

Here it is in front of the trees:

It pops between these two states when I pan the camera above and below a certain height.

Does anyone know why this could be happening?

Are any of your materials using translucency?

Yes, all the materials use translucency. Is there some specific setting causing this to happen?

You can use this information here Using Transparency | Unreal Engine Documentation . Using translucency this heavily shouldn’t be necessary, since I don’t see any parts of the meshes that are actually less than opaque. Setting the material blend mode to “Masked” instead of translucent should be helpful.

1 Like

Ah, seems like this might be down to translucency sort priority, but I’m not sure how I could fix that, since the terrain needs to be both behind and in front of the trees (in front of the roots, but behind the trunks), so I can’t easily assign it a sort priority number.

The reason I’m using translucent materials is that the materials can be switched from looking as they do above (more of a standard diffuse look) to an X-Ray kinda look which is using a shader that is transparent in the centre with fresnel glowing edges. I’m blending between the two with a parameter. However, since its encapsulated by a single material, the domain has to be set to translucent.

Maybe there’s an alternative way to go about this…