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

Sprite quality on large sprites

Discussion in '2D' started by mihakinova, Oct 27, 2015.

  1. mihakinova

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    85
    I already posted this on answers but got no reply so I'm trying my luck here.

    I'm having problems with 2D sprites in my game. I'm building for iOS and I'm getting jagged edges on my sprites (check attached image).

    If you look at the green bush & background you can clearly see the jagged edges (the green & blue backgrounds are separate layers, the green one having transparency). It really doesn't look like the standard anti-aliasing jaggedness to me...

    You can see that the cow doesn't have the jaggedness.

    All of the assets have the same settings: Bilenear filtering, MipMaps off and Truecolor as the format. The only difference is that the background assets, which are bigger, have MaxSize set to 4096, while the smaller assets have it set to 2048 (both are bigger than the actual assets). None of the sprites are scaled in the scene.

    Here is the strange part. The jaggedness escalates from the bottom left towards the upper right corner. So the bottom left corner has virtually no jaggedness while the upper right corner has the most jaggedness. The bigger the sprite the more you can see the jaggedness. It does not seem to be proportional to the size of the sprite, so you can't see it on smaller ones.

    I worked around the problem by cutting larger images into multiple smaller ones and positioning each one individually.

    This problem is present in the latest patch build and in the 5.3 beta version.

    Any ideas?
     

    Attached Files:

    • S1.png
      S1.png
      File size:
      40.5 KB
      Views:
      902
  2. VorpalSilence

    VorpalSilence

    Joined:
    Oct 22, 2015
    Posts:
    13
    The two things I would look at first with this problem are 1 changing Bilinear to point. and 2. Changing the pixels to unity units ratio. (This might cause you to have to change the scale of image but sometimes fixes these types of issues in same way that it does with GUI text.)
     
  3. mihakinova

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    85
    Thanks for the suggestion, unfortunately it did not work.

    Setting the filter mode to point only magnified the effect of the jaggedness and changing the PPU value had no effect on the quality.

    I noticed this only happens with sprites. And it only happens on iPads (it may also be present on iPhones, but it's so small that I didn't notice it).
    If I set the texture type to Texture, put it on a plane as a material, and position the plane as the background this does not happen.

    Any ideas?
     
  4. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    What if you locate the sprite always at whole pixel/whole integer coordinates (pixelsnap?)
     
  5. mihakinova

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    85
    Most of my bigger sprites are static and are located at (0, 0, 0), as they are usually used for backgrounds. All of my levels have a static, non-animated camera.
    I can confirm that this does not help and that the problem still occurs.