How to use non-grid spritesheet?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By zeech
:warning: Old Version Published before Godot 3 was released.

Hi, I’m trying to use a spritesheet I’ve found off the web. However, it’s been packed “efficiently” and isn’t in a regular grid.

What’s the easiest way to use this spritesheet?

I’ve been using GIMP to cut paste each frame into a separate file, and loading into a Godot AnimatedSprite / Spriteframes. But this is extremely time consuming and error prone.

Is there any way to use the spritesheet in Godot directly by specifying coordinates for each frame? Or is there a better (free) art tool out there that can help me to decompose the spritesheet more easily?

How do people work with these sorts of spritesheets?

:bust_in_silhouette: Reply From: Zylann

As you probably know, making a tileset in Godot 2.1.4 involves creating a scene that will contain a sprite for every tile.

You can assign your atlas on each sprite, and then check the “region” checkbox so that you will be able to specify a custom region of the atlas.
When a sprite is selected, you can do that visually by opening the “Texture Region” tab at the bottom of the editor.

The Texture Region editor has various modes to help you frame the tiles. You can use pixel-snap to manually do it, or you can also use “auto slice” mode, which will attempt to frame all tiles, if they are rectangular and separated by transparent pixels.

If your atlas doesn’t contain rectangular tiles (i.e it expects some kind of UV-mapping), then you can’t use that, and you will need to change the texture.
In this latter case, it would be a feature to request on Github, and support for non-rectangular sprites (like 2D meshes).