Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
Game Design

Unity 2D Sprite Splicing

Brundonian
Thursday, July 8, 2021 - 09:35

Hey,

I've found a tileset here that I really love and I'd like to use it on my personal hobby game. Link below:

https://opengameart.org/content/lpc-victorian-buildings

The tilesets I have been working with prior to the above link have included their cell sizes, but for obvious reasons the above links' assets don't have set cell sizes. The cells are varying sizes, yet the 3 asset files included are rather large (683px Wide / 2048px Long) and the automatic splice tool does not do the tileset any justice.

Any advice for a Unity noob like myself?

Thanks.

  • Log in or register to post comments
MedicineStorm
joined 13 years 4 months ago
Friday, July 9, 2021 - 08:29
MedicineStorm's picture

The LPC set is based on 32x32 tiles, so - although many features like large buildings do not fit within a single 32x32 tile - they should always conform to multiples of 32. I generally use GIMP to splice out large multi-tile sprites like that:

  1. download GIMP and run it.
  2. File menu > Open, select the sprite sheet
  3. Image menu > Configure Grid...
  4. Spacing: horizontal 32, vertical 32. Ok
  5. View menu > Show Grid, also View menu > Snap to Grid.
  6. Select the rectangle tool [R]
  7. draw a selection box around the sprite(s) you want to splice out.
  8. Ctrl-X, Ctrl-C, Ctrl-V all the standard copy/paste shortcuts. put it wherever you want or
  9. File menu > New, choose the resolution of the sprite you copied to clipboard
  10. paste it into a new image.
  11. File menu > Export As...

I'm sure there are plenty of free imaging tools for splicing out large multi-tile sprites. Perhaps some other artists around here will suggest something that works even better. I think Tiled supports mulit-tiled sprites in a spritesheet in an even simpler way, but I'm not sure it's useful for extracting the sprites, more for manipulating the sprites and using them in a level/map based on the tileset. Still, I believe there are lots of documented methods of importing Tiled maps into Unity.

--Medicine Storm

 

  • Log in or register to post comments
bluecarrot16
joined 11 years 2 months ago
Saturday, July 10, 2021 - 07:06

Just to elaborate: these tileset images are really intended to be used like, well, tiles---you assemble multiple 32x32 px tiles into a larger image. I usually use Tiled https://www.mapeditor.org for this, and if you download Tiled and the example scene on my submission, you can see how the preview image was built up from tiles. Unity has a similar function, I believe it's this:  https://docs.unity3d.com/Manual/class-Tilemap.html . Of course, if you just want a few static objects, it would be easiest to cut them out as MedicineStorm suggests. 

Hope that helps!

  • Log in or register to post comments