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

Unity's Sprite Editor not chopping the images neatly?

Discussion in '2D' started by HaydarLion, Dec 16, 2015.

  1. HaydarLion

    HaydarLion

    Joined:
    Sep 17, 2014
    Posts:
    62
    Hi all,

    I have a sprite sheet composed of sprites of 16 x 16 pixels. I use unity's sprite editor to chop them up to separate sprites and placed them down and this is how they looked:

    a.png

    Is there a way to remove all these extra lines showing up in my sprites?

    Notes: The image is being imported without generating mip maps, and a "point" filter mode, and the format is ARGB 32 bit.

    Thanks
     
    Last edited: Dec 16, 2015
  2. FranticThumbs

    FranticThumbs

    Joined:
    Mar 5, 2015
    Posts:
    51
    have you checked your image to make sure that there's no line/image there? And I believe for pixel art, point mode is best, but I could be wrong
     
  3. HaydarLion

    HaydarLion

    Joined:
    Sep 17, 2014
    Posts:
    62
    Yes it's in point mode, and yes that line doesnt exist in my sprite sheet. You can tell on that image because that's the same sprite 4 times, the line is only appearing twice.

    Another thing I noticed is resizing the screen removes those extra lines for some of the sprites but adds them to others. I need them to not appear no matter what the resolution is.
     
    Last edited: Dec 16, 2015
  4. MightySheep

    MightySheep

    Joined:
    Sep 23, 2015
    Posts:
    21
    you need to find a pixel perfect camera script, it is lying somewhere on the forum, that should fit exactly one pixel in-game to one pixel on screen, getting rid of those weird lines.
     
  5. HaydarLion

    HaydarLion

    Joined:
    Sep 17, 2014
    Posts:
    62
    I should also mention that it appears to be "bleeding" over from the tile next to it. For example, in that image, the tile to the side is white.
     
  6. LiberLogic969

    LiberLogic969

    Joined:
    Jun 29, 2014
    Posts:
    138
    Are your sprites set to True Color? You may also want to go to Edit->Quality Settings and turn off Anti Aliasing for all the quality levels. Another thing you should also try is to make a Material and set it to the Sprites->Default shader and then Tick the Pixel Snap checkbox. Add that material to all your sprite renderers.
     
  7. HaydarLion

    HaydarLion

    Joined:
    Sep 17, 2014
    Posts:
    62
    Setting it to True Color had no effect.
    Disabling anti-aliasing somewhat solved the problem I'm encountering, but now the images "jitter" every so slightly as I move my camera around, and still had occasional lines showing up.
    Using a pixel-snap material with anti-aliasing caused the the images to hold still more, but then made the extra lines there no matter how my camera moved (previous, moving my camera would make the lines go on and off). Using it without anti-aliasing caused the occasional lines to be there all the time.
     
  8. LiberLogic969

    LiberLogic969

    Joined:
    Jun 29, 2014
    Posts:
    138
    Thats odd. I have sprites that are 16x16 and having True Color, Point Mode, Pixel Snap, and No AA together fixed the same kind of problem for me :( Is your camera moving in Update or FixedUpdate?
     
  9. HaydarLion

    HaydarLion

    Joined:
    Sep 17, 2014
    Posts:
    62
    It's moving in update. But I don't think it's related to the problem because when I move the camera around in the editor, the problem can be seen.