Download

Can ZFighting be ignored when not visible?

Can I ignore when ZFighting occurs and it’s not visible? For instance, if I have crates that I want to stack perfectly beside/on top of eachother, and the ZFing occurs underneath/inside the objects. Or perhaps if instead of making one large wall I break it up into parts, and each part has a face on each side and are lined up beside each other. If I move my camera into some of the objects, I can see the fighting occurring, but if I’m playing normally, it’s not possible to be seen. Do I need to plan ahead and model my objects with some sides faceless that I know will be stacked/lined up, or does it not matter? I’d also like to know about this subject with Market content; is it acceptable to have things you know are to be lined up (such as counters, etc) with faces on all sides, or should I delete the side faces that won’t be seen? (I already know that technique to save polys, but not sure if someone would wonder why content they just purchased was chopped off in ways.

Z-fighting is only an issue if you see it, if it’s not visible then you don’t need to worry about it. Generally you want to not have faces that won’t be seen, but for buildings the unseen faces can help control lighting.

Ah ok that’s good, thanks!

Hi, by “if you see it” do you mean in the viewport editor BEFORE you hit play mode, or during play mode?

Asking because I’ve seen zfighting happen while im editing, but when I hit play it disappears and seems to look as it should

Zfighting will happen if two polygons are sharing the same space, so it will happen no matter what in that case. But it also happens as you zoom out with faces that are really close together. As you zoom out the depth precision gets lower and faces that weren’t in the same space end up in the same depth and have the z-fighting happen. Where you don’t need to worry about z-fighting is when say two crates are right next to each other and the sides that are touching are in the same space, you can’t see those faces anyways so it doesn’t matter that they’re in the same space.