Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

grass texture banding

Discussion in 'Editor & General Support' started by boxy, Jan 10, 2008.

  1. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    I'm getting this straight line banding at the top of a grass (fern) map. I remember Garen said to change Repeat setting to Clamp but that hasn't done anything. The map is imported at 512x256 DXT5. If I knock that down to 256x128 it goes, but then so does all the leaf detail. Any ideas?
    Thanks
    Boxy

     
  2. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    I have the same issue from time to time. Its suddenly there... stays... then its gone the next day... Changing the texture to another, then back again helps somtimes.

    The textures i used where 256 x 256. But i havent set the texture to clamp. I will check that.
     
  3. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    It does seem that downgrading to 256 is the only way I can get rid of it at the mo but I don't really want to loose the texture quality if possible. I'll see if it just goes :)
    Cheers Alpha
    Boxy
     
  4. Ricko

    Ricko

    Joined:
    Dec 9, 2007
    Posts:
    169
    Its possible for this to be caused by a filter artifact if you downsized the texture in an image application, like photoshop for example. I'm sure you've already checked that but it wasn't mentioned in the post so I thought I'd mention it.

    Ricko
     
  5. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    I have checked for that several times... its not the texture (i believe) because it somtimes happens... next time you load, the effect is gone...
     
  6. Ricko

    Ricko

    Joined:
    Dec 9, 2007
    Posts:
    169
    Have you tried turning off generate mipmaps in the import settings? Some filter somewhere along the way is causing it. My guess is mipmap or LOD generation. Does the effect go away when you get closer or farther? Does it go away if the import format is set to RGBA instead of DXT5? I'm just trying to think through all the possible causes.

    Ricko
     
  7. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    Very good idea! I will try that too!
     
  8. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    Ok, the answer lies not within Unity but within the 2D graphic application.

    Save the image without including any color profile or other meta-data... and whoosh... issue gone. Thats the whole trick. The file-format needs to be .tif
    Dont know why, but it works.

    Why the effect was appearing and disappearing was also solved... just different photoshop-settings on my two comps... it can be so easy...

    [edit] You may need to clear the border pixels with full black... it seems that they get messed up by the profiles.

    [edit again] It does NOT need to be a .tif. Use any format you like, sorry...
     
  9. Ricko

    Ricko

    Joined:
    Dec 9, 2007
    Posts:
    169
    Just out of curiousity, what file format were you using before?

    Ricko
     
  10. Dom

    Dom

    Joined:
    Jul 10, 2007
    Posts:
    91
    If you down-scale an image in photoshop you have different settings for the re-sampling. The standard one is bicubic and will create a 1-pixel border. I use bilinear to prevent this.

    Mipmap stuff can of course be another reason, besides border or clamp, mirror is also a nice option. It helps me often with mipmap issues.
     
  11. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    I was using .psd. And i will keep that. Its the best for working with photoshop and it imports nativly to unity even with layer effects and stuff. While testing, i just forgot to clear the border, so i asumed it did not work...

    Thanks! Good hint.

    Frank
     
  12. br0kenp0ly

    br0kenp0ly

    Joined:
    Jun 3, 2008
    Posts:
    481
    Hi guys!
    I`ve had so many problems with seams in my grass-billboards as well and struggled a lot with it last week. I tried all the methods mentioned above, but with no luck.

    I finally managed to find out why it didn`t work though, and I hope some of the Unity-guys can confirm this. It seems that Unity makes some kind of texture sheet when you add images/textures/models to the detail object panel and the placement of those textures seem a little off now and then. There must be a bug within this texture-sheet, as some textures work better than others.

    Oh well.. I`m glad it finally worked, but hopes this thing will be a little more stable in the next version of Unity :)


    Roald