Pixel perfect texture perfect in Maya preview, not so perfect in Unity :)

I am making pixel art models so I am trying to make a pixel perfect texture but Unity is resisting really hard :slight_smile:

After playing a lot in settings I managed to get close to perfection, except for one little thing. There is a half pixel border on my model for some reason. It appears that my texture is not fitted on the model well, while in Maya it looks perfect. I am using pixel snapping in Maya UV editor, so it should be fine. How could I fix this issue?

I tried workaround by setting offset, but it never fully covers the border, and it makes a seam on the other side. And this type of hack would be a pain on multiple models anyway.

Texture is 512x512, with following import settings:
Non Power of 2: None,
Wrap Mode: Clamp,
Filter Mode: Point,
RGB 24 bit
Max Size same as texture size,
Mip Maps are off.
Shader is Unlit/Texture.

On screenshot there are two off the same models snaped to each other and the dark line is the border on the edge of each of those models. Texture is so nice and sharp, but that dark line is making me suffer :slight_smile:

Thanks for your help.

edit: fixed the image, sorry

Dilate the texture around your UV boarders if you can. I can’t see exactly what’s going on because the link doesn’t work, but it sounds like that would fix your problem. Might also help to set your power of 2 to closest.

1 Like

I fixed the sceenshot. Dilating just fills the black border that shouldn’t be there in the first place, in result that one pixel is streched. If there is no cure for that then I can live with it, but I don’t understand why wouldn’t it just be perfect if everything works in Maya.

1 Like

Oh, it tiles. Then change from clamp to repeat.

Changing from clamp to repeat didn’t solve the issue :frowning: Setting power of 2 to closest blurs entire texture.

I don’t think its the same issue I had exactly, but I had some visible seams on floor tiles which were perfect in the texture and in Max, but had visible seams in Unity. I changed the filter mode of the texture to “Point” and the seam disappeared.

Are you completely sure there isn’t a 1 pixel border around your texture? Are you also sure that the texture actually is 512x512 and not 513x513?