Search Unity

Automatic sprite slice fails with small sprites?

Discussion in '2D' started by mgear, Nov 13, 2019.

  1. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,629
    Is this known issue / limitation?

    See those connected sprites, even though there is plenty of space in between,
    so it must be some minimum height issue?

    upload_2019-11-13_12-17-39.png
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    1,498
    @mgear

    I haven't noticed this before, but now that I saw this question, I did a quick test - seems like 4x4 pixel block is actually the smallest block the editor auto slicing can isolate. It doesn't seem to matter if these are aligned to 8x8 tiles for example. 4x4 blobs get picked as separate slice. Seems like if you create a blob with bounding box of 3x3 or 4x3 (or smaller), it will melt to close by blobs. If its bounding box is 4x4 pixels, it won't melt.

    slicing.png

    Edit: so if your "equals" and "minus" symbols are 3x4 and 1x4 pixels in size (for example), these will melt to near by pixel areas it seems. My test image was a 32x32 pixels image.
     
    Last edited: Nov 13, 2019
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,629
    yeah that seems to be the case.. i guess ill arrange them on a grid to split by fixed size, thanks!
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,629
    eses likes this.
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,629
    apparently that's the way it is going to stay.

    personally i would expect (pixel) sprite tool to allow using any sized sprites (even 1x1 like bullets, sparkles etc),
    i mean if you have random artifacts in your texture sheet, you need to fix that on your image. (at most the engine could warn that are you sure about generating 1 million sprites if thats the case)

    well, i guess can always make your own sprite slicer tool to handle smaller sprites too.
     
    eses likes this.