+3 votes

Hi,

my name is Andreas Löw, I develop TexturePacker - a sprite sheet packer and optimization tool.
Recently I get more and more requests for support for Godot engine... I am new to Godot engine and currently trying to find a starting point. Or a complete solution if somebody is able to deliver it ;-)

How I'd image the things should work (from a users view)

1) Somebody packs the sprite sheet in TexturePacker, presses publish
2) User switches to Godot, sprite sheets and sprites are reloaded and refreshed, animations play,...

I'd really like to avoid that users have to perform manual steps to get the updated sprites.

I would also like to support as many features from TexturePacker as possible.

1. Using irregular sprite sheets with trimmed sprites (transparency removed to save space)
seems to be possible by creating .tres files of type "AtlasTexture" with region and margin. Initially creating the .tres files works but the preview images don't update. The other problem is to know the ids.

2. Rotated sprites (optional, but would improve packing)
there seems no way to tell Godot that a region is rotated

3. Pivot points (optional)
there seems to be no way to transport the pivot point from the AtlasTexture to the sprite...

4. Polygon mesh sprites + polygon packing
TexturePacker can create sprite meshes instead of rectangular sprites. This creates less overdraw and improves the performance of games. It also allows very tight packing of the sprites. I've seen in a tweet that Godot is going to get mesh support. Is there already some way to set meshes? Especially for sprites and sprite animations?

Is creating the .tres files an option at all? Or do I have to follow another path?

I'd really be happy if somebody could lend me a hand on this. I'm also able to pay some amount of money for somebody delivering a solution.

Best
Andreas

in Engine by (15 points)

Hi Andreas,

I have used texture packer before. Top notch tool! Plz post this on some of the other sites as well (e.g. Godot reddit, etc.) for more exposure. I would love to see TP have Godot 3 option. =)

1 Answer

+1 vote

Since most functionally you need is already covered or being worked on by the engine devs I think you could just create an editor plugin to create the tres files and setup the sprite pivot. You can use json hash or array as intermediate format.
Once mesh sprites land on stable you can add support for that.
The only missing thing would be rotated sprites but I don't think it's worth creating a module just for that.

Creating editor plugins: http://docs.godotengine.org/en/3.0/tutorials/plugins/editor/making_plugins.html

If you want to hire someone, the devs usually hang out in #godotengine-devel on Freenode. They'll be able to recommend someone. http://webchat.freenode.net/?channels=#godotengine

by (116 points)

Thanks. I've meanwhile managed to create the plugin. Works except for some smaller bugs in Godot's UI which don't update the sheets immediately.

I am currently polishing the importer to submit it to the asset library.

I've created an extended intermediate format that also supports multipack with 2 exporters: 1 for TileSets and one for sprite sheets (AtlasTexture).

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.