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

Blurry Pixel Art

Discussion in '2D' started by CobaltTheFox, Apr 22, 2019.

  1. CobaltTheFox

    CobaltTheFox

    Joined:
    May 29, 2015
    Posts:
    27
    I have a piece of pixel art that looks really nice but every time I try to import it into unity it becomes very blurry. When I have it imported and open it in the sprite editor it looks fine, but when I put it into the scene and look at it in both the Game and Scene tabs it is blurry.


    This is the sprite: https://drive.google.com/open?id=1TpfQM3nw74aj92uzQbXqfTkuvxbqW-Zb
    And these are the import settings: https://drive.google.com/open?id=1tfxXcklaQN05GfPBNtNZrlmEOLPdVhBD

    Any help would be greatly appreciated.
     
  2. CobaltTheFox

    CobaltTheFox

    Joined:
    May 29, 2015
    Posts:
    27
    I found that changing the Pixels Per Unit from 100 to 40 seems to fix the problem. Is that normal or is there another way I should handle this?
     
  3. Rockaso

    Rockaso

    Joined:
    Oct 31, 2016
    Posts:
    85
    I use Pixels Per Unit at 10 and it looks good
     
    APSchmidtOfOld likes this.
  4. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    The Pixels Per Unit setting is going to effect how the sprite is displayed in an orthographic (2D) camera. Changing the PPU setting to properly match the settings on the camera will give you the 1x1 pixel display you are most likely looking for. (and eliminate the blurring)
     
  5. CobaltTheFox

    CobaltTheFox

    Joined:
    May 29, 2015
    Posts:
    27
    How do I go about making sure that I have a 1x1 pixel display?
     
  6. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,454
  7. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    In Unity, you first need to make sure that your camera is orthographic. You've got two basic objects, orthographic and perspective. Orthographic is what you normally go with when you are doing 2D, and perspective is the default camera for 3D. For pixel-accuracy, you definitely want to stick with orthographic.

    On the orthographic camera, there is a setting called camera height. What camera height boils down to is that it is half of the overall vertical coverage of the camera, in Unity units. So if the camera height says 5, that means that the overall vertical coverage of the camera is 10 Unity units. You take the pixel height that you're targeting, and divide it by twice the camera height. (Pixel Height) / (Camera Height * 2). The product of that little equation will give you how many pixels per Unity unit you need to target to get 1x1 pixel display.
     
  8. arsenthecreator

    arsenthecreator

    Joined:
    Apr 19, 2020
    Posts:
    1
    this will fix it. Just change filter setting on the sprite to no filter
     
    JClay91, letgoka, NavyOtter and 3 others like this.
  9. lojzl

    lojzl

    Joined:
    Jan 25, 2020
    Posts:
    1
    set filter mode to pont(no filter)
     
    joaovetori and MrPapayaMan like this.
  10. bennettyu82

    bennettyu82

    Joined:
    Aug 17, 2020
    Posts:
    5
    Hello, I don't know if you still need help with this, but what I do is I change the Filter Mode from Bilinear to Point. upload_2021-3-3_9-15-43.png upload_2021-3-3_9-16-9.png
     
  11. NYX128

    NYX128

    Joined:
    Aug 2, 2020
    Posts:
    8
    If you want to know why this works, here's a quick explanation:
    If you use bilinear filter, it will interpolate the pixel colors and thus it won't look as CRISP as before.
    Point makes sure to only sample colors per pixel and not mix them.
     
  12. fishedoutnow

    fishedoutnow

    Joined:
    Jun 1, 2023
    Posts:
    1
    I have found two main settings causing the problem:

    1. Filter mode set to "Bilinear
    This setting is found on the art. (Inspector)

    2. HDR set to "Use setting from Universal Pipeline Asset"
    This can be found on the camera under camera, output.
     
  13. Bricied

    Bricied

    Joined:
    Apr 11, 2023
    Posts:
    5
    Hi @CobaltTheFox,
    Hope so you're doing good, becoming blurry in Unity could be due to the import settings and the way Unity handles the image's resolution. From the provided import settings screenshot, it seems like you have the Filter Mode set to "Bilinear" and the Compression set to "Default." These settings might cause the image to appear blurry when scaled or displayed in the scene.

    To maintain the pixel art's sharpness, you can try adjusting the import settings as follows:

    1. Change the Filter Mode to "Point" instead of "Bilinear." This ensures that Unity doesn't apply any interpolation to the pixels, preserving their original sharpness.

    2. Set the Compression to "None" or "Disable." This prevents Unity from compressing the image, which can introduce artifacts and affect the quality of the pixel art.
    Additionally, ensure that the Pixels Per Unit value matches your intended scale for the pixel art in the scene. This value affects how Unity maps the pixels to the scene's units, and setting it correctly helps maintain the desired sharpness.

    By applying these import settings changes, you should see an improvement in the clarity of your pixel art when viewed in the Game and Scene tabs of Unity.

    Cheers,
    Bryce June
     
  14. nicsollars

    nicsollars

    Joined:
    Jun 2, 2023
    Posts:
    1
    This worked for me ….


    Click on Assets
    Right click on your sprite
    Click on “select dependencies”
    (In Texture settings)
    On inspector settings on the right of the screen scroll down to “Filter mode” - change to Point (no filter)
    Scroll down and click on “apply”