1
votes

I am having some trouble with rendering sprites in Unity, now before anything I have searched around on google and all the answers haven't worked for me, so here is my problem.

I have a tilesheet which has sprites at the size of 16 by 16, the settings for this image is

Sprites (2D and UI)
Multiple
25 Pixels per unit
Generate Mip Maps off/on (tried both)
Filter mode point

I created myself a gameobject. This gameobject simply had a sprite render to of course show a sprite and a custom material for lighting,

The material settings are

Sprites/Diffuse
Tiling X:1 Y:1
Offset X:0 Y:0
Tint : #CCC
Pixel Snap : True

Now the image below is the out come, if you look very closely you can see there is a random line on the left hand side and one in the middle, it just looks like a few random colours from a sprite.

enter image description here

Now if I change my material from Sprites/Diffuse to Sprites/Default my lighting no longer works but my sprites become perfect as you can see

enter image description here

Can anyone please give me a hand with this. If you need anymore information please just let me know

1
Is it possible that some of your pixels have transparency? I'm not sure if you're using alpha or not, but it looks like the lighting is clipping through that line. It could also have to do with anything else in that area clipping into the sprite. If you move the gameobject and light source around, does the line stay in the same spot? - user986122
I have just converted my image to a jpeg and that didn't solve it, I also have tried moving my light source around and there are still odd lines between my tiles - Canvas
Are you sure it looks perfect in the bottom image? The leftmost partial square in the second row of complete squares looks like it has a seam. The left half doesn't match the right half. - Douglas Zare
The tiles are a random selection of sprites when the level starts. and yea it looks correct. At the very top and bottom are different sprites so you may think it isn't perfect but don't worry, it is in my eyes :) - Canvas

1 Answers

2
votes

I found a list of solutions here

http://forum.unity3d.com/threads/tile-map-tearing-problems.225777/#post-1507246

I just followed the Extrusion one and it works fine now, but it does seem like a little hack :(