Search Unity

Seams in tiling texture sheet

Discussion in 'Formats & External Tools' started by Manishtushu, Sep 3, 2010.

  1. Manishtushu

    Manishtushu

    Joined:
    Aug 24, 2010
    Posts:
    23
    I'm getting this seam in my mapping, I'm sure it's because the UV map is picking pixels a little outside its boundaries... but how do I fix it?



    That is supposed to be a tiling texture, but it is getting seams (you can see the seams on the left) There is no seam in photoshop, the problem seems to be that the UV map is picking pixels outside the area it should have been.



    The result in Unity.

    The only solution I can think of so far is to shrink the UV by 2 pixels make a repeating line of pixels for the border. While the seam isn't as noticeable when doing that, there is still a line of blurred pixels where the tiles meet.

    I'd very much like to hear from how other people create these texture sheets, too. Thanks.
     
  2. oblivionfeet

    oblivionfeet

    Joined:
    Jul 24, 2010
    Posts:
    481
    Try not have your UV map right up against the edges, and always have a gutter/border around the UV's with expanded pixels, to avoid such issues like this.
     
  3. Manishtushu

    Manishtushu

    Joined:
    Aug 24, 2010
    Posts:
    23
    Thanks for the reply! Yes, it looks like having a one pixel border is the only way to fix this. I'm going to try to cut just one line of pixels from the edges and duplicate both, to see if that tiles correctly (it seems like it wants to blend in between either outside edge).
     
  4. oblivionfeet

    oblivionfeet

    Joined:
    Jul 24, 2010
    Posts:
    481
    It's an old problem in general (not just a Unity issue), tbh you don't notice it after a while and just automatically go over the edges and avoid the borders as a force of habit.
     
  5. hmacyt

    hmacyt

    Joined:
    Jul 1, 2010
    Posts:
    203
    ALWAYS ALWAYS PAD YOUR EDGES

    Its like game art texturing rule #5

    mipmaps will sample 1-4 pixels outside of your uv's when its zoomed farther out.
     
  6. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    no, 10-16 pixel is better. But all depends what you are working on.

    Mipmap will reduce by 2 your texture on each level.

    If you are on level mimpmap 4 you already lose 8 pixels.

    http://en.wikipedia.org/wiki/Mipmap

    And more you cam direction is parallel to the poly, more the mipmapping is heavy.
    If you are perfectly front a polygon the mipmapping doesn't affect your texture.

    Distance also affect the mipmapping.
    If you are very far away from you poly, the mipmap level will be the smaller one. then on the 8 level texture you will lost 16 pixels!