Black interference patterns on random surfaces

(problem was present in 4.11 also, at least. I would have thought this would have come up before but I can’t find it anyway, so apologies if I repeat a question.)

I have a problem with black interference patterns appearing in a material, as per the following photo:

http://imgur.com/AaCka8B.jpg

The pattern changes as you move the camera position.

The material is a bog-standard, nothing fancy one, based on the starter materials:

http://imgur.com/wmS8KEd.jpg

This also happens with other materials - some even simpler.

The material in question is applied to a large (but not very complex) mesh representing a small building:

http://imgur.com/DJibvsQ.jpg

When I click on the building in the editor (so that the orange outline appears around it), the interference patterns disappear, until I click onto something else.

The pattern only appears on some of the walls.

I’ve checked for duplicate polygons (which can cause that kind of jazzing) but there’s only one poly in the affected areas, and only one copy of the mesh placed in the level. I’ve rebuilt the whole level with ‘high’ quality lighting, restarted the editor, and so on. The artifacts also appear when testing the level in a new process. I started creating the level (and materials) in an older version of the 4.xx engine, so possibly there are some compatibility issues. I also have collision hulls (generic convex hulls, though all cuboids, I think) imported with the mesh (from Lightwave - yeah, I know) using the UCX_ prefix in the layer names. Those collision hulls overlay the visible polygons (though that shouldn’t in theory cause a problem?).

This is probably something very stupid and obvious, but does anyone have any pointers?

Thanks in advance.

That looks like a typical z-fighting issue. Most likely you have a duplicate co-plannar face in the area where this happens. Maybe you misnamed one of your collision meshes and it is being a part of the render mesh?

Thank you for your prompt reply.

That was my first thought, though I checked and in the bits of the original model which weren’t in UCX layers, there is only a single (single-sided) polygon in the relevant areas. And there is no apparent difference in the original model between areas where this z-fighting is happening, and areas where it is not.

On further reflection, I’m not sure this happened prior to 4.11 (or possibly 4.10). I’ll try re-importing the mesh to see if that makes a difference.

Ok, looking more closely at the collision data in the editor, there is something very odd going on with that. The original collision hulls were simple non-overlapping cuboids, and now they’re all over the shop. I’m not sure of the difference between the purple and cyan lines, but I’ll look that up…

This is the collision model in UCX_… layers

Ok, maybe blue lines are the visible mesh outlines, and purple is the collision hull, so the picture above is consistent with what it should be.

I noticed that the z-fighting was only happening on one of the two triangles that a rectangular wall had been decomposed into on import. I tried triangulating everything in Lightwave before import, and now the z-fighting happens to the whole wall (both triangles). I am super sure that there is only one copy of the relevant poly in the non UCX bit of the file.

I then tried reimporting the mesh without any collision hull data at all (and everything else compressed into a single, fully-triangulated layer), and still I’m getting the z-fighting but only one some parts.

and the z-fighting happens with the default texture applied also. I am at a total loss to understand what’s going on. Here is a link to an .fbx of the building without any collision data in case anyone wants to take a look. This is the non-triangulated version. And yeah, I suck at modelling.

Ok, I think I fixed it. The dodgy wall was very, very, very slightly non-planar, and that apparently causes the engine to bork (even though the wall is decomposed into triangles, which can’t be non-planar…).

Thanks for your help - and yes, I suck at modelling…

Actually I’m not sure it’s being non-planar that’s necessarily the problem - in other problem areas, everything seemed planar, but adjacent walls were not welded together. When I welded everything, the z-fighting effect stopped, but then I got a whole load of horrible lighting issues, e.g.

(the lighting was much more uniform and even before, and now seems to be a mix of internal and external light)