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

Pixels change when rotating sprite

Discussion in '2D' started by VortexGamer, Apr 29, 2015.

  1. VortexGamer

    VortexGamer

    Joined:
    Apr 27, 2015
    Posts:
    49
    Hi, My pixels change wierdly when rotating a sprite, It makes it look bad The attached file is when it is rotated!
    Any fixes
     

    Attached Files:

  2. Watapax

    Watapax

    Joined:
    Sep 3, 2013
    Posts:
    34
    Chek the Filter Mode of the Sprite Asset in the inspector, try "Point"
     
  3. VortexGamer

    VortexGamer

    Joined:
    Apr 27, 2015
    Posts:
    49
    It is already point
     
  4. originalterrox

    originalterrox

    Joined:
    Feb 6, 2015
    Posts:
    40
    How about Generate Mips?
    You'll just need to test the settings and be aware of the difference between the scale of the original image and output image.
     
  5. VortexGamer

    VortexGamer

    Joined:
    Apr 27, 2015
    Posts:
    49
    I bascally tested evrything but nothing happens
     
  6. VortexGamer

    VortexGamer

    Joined:
    Apr 27, 2015
    Posts:
    49
  7. kuchaku

    kuchaku

    Joined:
    Oct 14, 2014
    Posts:
    37
    This is a common result if the resolution of a game is pixel perfect. Pixels are are square, so pixel art are a bunch of big squares. When you rotate a square, it is no longer asquare (some kind of diamond) and has to be approximated into something else.

    You can reduce the effect of something like this by either using higher resolution artwork (where each square is not so visible as a square) or by having pixel in reality be 4 to 8 pixels so when they rotate it can approximate the diamond shape that would occur when a square is rotated more accurately.

    There are a few algorithms I've found that attempt to maintain the 'grid like' structure of a rotation, with no transparency by guessing which solid pixels to approximate where, but I don't believe any are applicable to real time use in Unity.

    Generally speaking the higher the resolution you're using, the better off your rotations will end up which, kind of counteracts the strengths of pixel art for many and some shun the use of rotation at all in pixel art for these reasons.