Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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

Discussion in 'General Graphics' started by Hoku, Apr 25, 2015.

  1. Hoku

    Hoku

    Joined:
    Apr 25, 2015
    Posts:
    3
    I am making pixel art models so I am trying to make a pixel perfect texture but Unity is resisting really hard :)

    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 :)

    Thanks for your help.



    edit: fixed the image, sorry
     
    Last edited: Apr 25, 2015
  2. echo4papa

    echo4papa

    Joined:
    Mar 26, 2015
    Posts:
    158
    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.
     
    theANMATOR2b likes this.
  3. Hoku

    Hoku

    Joined:
    Apr 25, 2015
    Posts:
    3
    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.
     
    echo4papa likes this.
  4. echo4papa

    echo4papa

    Joined:
    Mar 26, 2015
    Posts:
    158
    Oh, it tiles. Then change from clamp to repeat.
     
  5. Hoku

    Hoku

    Joined:
    Apr 25, 2015
    Posts:
    3
    Changing from clamp to repeat didn't solve the issue :( Setting power of 2 to closest blurs entire texture.
     
  6. misterlee

    misterlee

    Joined:
    Sep 19, 2014
    Posts:
    54
    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.
     
  7. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    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?