Rendering artifacts at vertex seams and object seams

The image below shows the issue I am having. The green circle is a seam of a single objects vertices and the red circles are where 2 different objects meet. My scene is dead simple with only 3 meshes (planes): one for the ceiling, walls and floor. When moving around the skybox showing through is much more distracting and prominent.

How can I keep the sky from showing through?

244158--8769--$photo_236.jpg

I had this problem once. Try turning your near clip plane up and see if that works.

I get this and other similar problems when I turn on texture filtering. bilinear/trilinear filtering seems to cause this for a lot of my levels. Probably something to do with my texture atlases. I just disabled the filtering and all my artifaces went away.

@jackshiels, where is the near clip plane setting located?

@bpatters, I have all texture import options set to default and the locations in question are using a tileable texture (with a lightmap blended on top)

Do these artifacts appear when built to the iPhone? Are you using pixel lights in the Editor? This has nothing to do with texture settings… it happens due to overlapping geometry and is only an issue with pixel lights which the iPhone does not support. So try building to the device and I can almost guarantee that the issue will disappear.

@aNTeNNa trEE, the screenshot I posted is from the device. It has the artifacts on both an iPod touch 2G and a 3GS. In the editor, it looks fine. There are no lights in the scene at all. Everything is baked into the textures.

On my machine it’s caused by Bilinear and trilinear filtering. Bilinear is the default for imported textures.

It happens both in the editor and on the device. I use forced vertex lighting for rendering.

I think these issues are unrelated. Bilinear filtering will show this problem if your textures don’t have a good color on their edges. Mipmaps will show this problem if your texture map has widely-varying areas of color. The last type of case where I’ve seen it is where you don’t have your vertices welded - if you just have planes that line up in your modeling app, that won’t translate well to Unity, due to floating point error. You either need to overlap the planes (which will still show the problem, except it won’t show the skybox – just one texture of the other), or preferably, merge their verts. This last bit is a big pain, because I often want flat surfaces that connect, but are separate meshes. Oh well.

None of these problems are specific to the handheld, however, and will show up in the Editor, so I don’t know what this problem is.

So, changing the texture import settings had no effect: bi, tri and none all showed the artifacts. It looks like overlapping the meshes does keep the skybox from bleeding through. I still get artifacts where two faces in the same mesh meet though (the green circle in the image from my original post). I tried removing the textures and just using a material color and I still get the artifacts at the seems. This is especially ugly at the corners of all the walls. The wall is a single mesh with 1 or 2 faces per wall. I went back through my model and made sure there were no extra verts but all looks fine. Any ideas what else this could be?

As Jessy said, welding/merging the vertices will make the artifacts disappear. This is not a texture issue :wink: