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. Dismiss Notice

Pixel art distorting in Unity even with point filter and no compression

Discussion in '2D' started by Varniro, Dec 31, 2020.

  1. Varniro

    Varniro

    Joined:
    Dec 25, 2018
    Posts:
    2
    Hey,
    I am using pixel art for my Unity game, for all the sprites I have set the filter to point and compression to none but I still experience distortion in the width of lines in my sprites as you can see in the sprites given below, these screenshots were taken with the game window zoom set 1x so that cannot be the reason of distortion.I have already tried using pixel perfect camera but there was no improvement in distortion.

    upload_2020-12-31_14-15-16.png
    Notice the uneven breadth of the horizontal lines in the above picture,the picture below shows how its supposed to look like.
    upload_2020-12-31_14-17-48.png
    Here is another example(notice how in the arm for the in-game character the breadth of the upper line and bottom line are different)
    upload_2020-12-31_14-20-39.png upload_2020-12-31_14-21-51.png
    In-game^^ Original^^

    So, if there is a setting that can be changed in unity or perhaps even an external package or any other solution to this please tell me.
    Thanks in advanced!
     
  2. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    the game window will always distort your sprites
     
  3. Varniro

    Varniro

    Joined:
    Dec 25, 2018
    Posts:
    2
    Umm, what do you mean by that? It cannot be solved? Or the window just distorts the art but it won't be distorted in the actual exported game? Please explain.
     
  4. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    it distorts in window but does not distort in the exported game

    think of it like this

    lets say your window is 320x320 pixels on your screen

    and you want to display a sprite that is 400 pixels long inside that window
    it wont fit and hast to be resized to fit in the small display area
    lets say it is resized by 2 and it becomes 200 pixels long so now it fits
    however 1 pixel cannot be divided by 2 so there was some calculation to decide
    what the sprite should look like when scaled down

    the result of theses calcutations are what you call distortion