1
\$\begingroup\$

If found a cool sprite sheet on the internet but its irregular. enter image description here

Is there any way besides manually cutting sprites to extract the separate pngs? I need to pack them then again into the Texture Atlas under proper names.

Maybe theres some smart online tool that uses deep learning or something like that?

\$\endgroup\$
2
  • 2
    \$\begingroup\$ This sheet looks like it's laid out on a regular grid. So, if you're OK having some objects placed as multiple tiles, you should be able to just split this using its grid frequency. \$\endgroup\$
    – DMGregory
    Commented Jul 30, 2019 at 14:35
  • 2
    \$\begingroup\$ That sheet isn't irregular, it's 32x32 with some objects consisting of more than one tile. Source: I happened to work with this exact tileset before. \$\endgroup\$
    – Philipp
    Commented Jul 31, 2019 at 8:39

3 Answers 3

2
\$\begingroup\$

There is the way, which is partially automated:

  1. Open sprite sheet with Photoshop
  2. Using the slice tool make one big slice that'll contain the entire image
  3. Right-click it and split this slice into a grid (it's 32x32 pix I presume)
  4. Join small slices into a bigger one (this have to be done by hand) where needed
  5. Export every slice as a separate file using File -> Export As...

There are also online editors which allow you to do the same, like Photopea, but I'm afraid it can't slice image automatically. However, you can go to Edit -> Preferences... menu and make yourself a 32x32 pix guide-grid. Then you'll have to slice image manually, but it will be easier since each of slice rect borders will snap to grid lines.

\$\endgroup\$
3
\$\begingroup\$

Since you found the picture online, without any json file attached or any other information, its not possible to cut this into multiple sprites automatically. You'd have to do it by hand.

\$\endgroup\$
1
  • \$\begingroup\$ Do you know any tool if Json and png exist? \$\endgroup\$
    – Davoud
    Commented Mar 1, 2022 at 8:05
2
\$\begingroup\$

You can use Leshy's tools to split non uniform spritesheets: https://www.leshylabs.com/apps/sstool/

Your spritesheet is 32x32. I've used it before:

OP's image with 32x32 px grid overlay

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .